Merge pull request #11547 from snipe/fixes/midnight_timestamp
Applies current time to checkin date
This commit is contained in:
commit
f446314ce6
1 changed files with 3 additions and 5 deletions
|
@ -886,10 +886,8 @@ class AssetsController extends Controller
|
|||
$asset->status_id = $request->input('status_id');
|
||||
}
|
||||
|
||||
$checkin_at = null;
|
||||
if ($request->filled('checkin_at')) {
|
||||
$checkin_at = $request->input('checkin_at');
|
||||
}
|
||||
$checkin_at = $request->filled('checkin_at') ? $request->input('checkin_at').' '. date('H:i:s') : date('Y-m-d H:i:s');
|
||||
|
||||
|
||||
if ($asset->save()) {
|
||||
event(new CheckoutableCheckedIn($asset, $target, Auth::user(), $request->input('note'), $checkin_at));
|
||||
|
|
Loading…
Add table
Reference in a new issue