Merge pull request #10920 from Godmartinz/Fixed_#10866_-_Checkin_time_always_shows_12am-master
Fixed #10866 - action_date for check-in not including H:i:s
This commit is contained in:
commit
6c1bb89776
2 changed files with 6 additions and 3 deletions
|
@ -105,9 +105,9 @@ class AssetCheckinController extends Controller
|
||||||
$asset->location_id = e($request->get('location_id'));
|
$asset->location_id = e($request->get('location_id'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$checkin_at = date('Y-m-d');
|
$checkin_at = date('Y-m-d H:i:s');
|
||||||
if($request->filled('checkin_at')){
|
if (($request->filled('checkin_at')) && ($request->get('checkin_at') != date('Y-m-d'))) {
|
||||||
$checkin_at = $request->input('checkin_at');
|
$checkin_at = $request->get('checkin_at');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Was the asset updated?
|
// Was the asset updated?
|
||||||
|
|
|
@ -116,6 +116,9 @@ trait Loggable
|
||||||
$log->location_id = null;
|
$log->location_id = null;
|
||||||
$log->note = $note;
|
$log->note = $note;
|
||||||
$log->action_date = $action_date;
|
$log->action_date = $action_date;
|
||||||
|
if (! $log->action_date) {
|
||||||
|
$log->action_date = date('Y-m-d H:i:s');
|
||||||
|
}
|
||||||
|
|
||||||
if (Auth::user()) {
|
if (Auth::user()) {
|
||||||
$log->user_id = Auth::user()->id;
|
$log->user_id = Auth::user()->id;
|
||||||
|
|
Loading…
Add table
Reference in a new issue