mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
fixes action_date for check-in not including H:i:s
This commit is contained in:
parent
0cb4caa4cf
commit
3eb7a87a66
|
@ -105,9 +105,9 @@ class AssetCheckinController extends Controller
|
|||
$asset->location_id = e($request->get('location_id'));
|
||||
}
|
||||
|
||||
$checkin_at = date('Y-m-d');
|
||||
if($request->filled('checkin_at')){
|
||||
$checkin_at = $request->input('checkin_at');
|
||||
$checkin_at = date('Y-m-d H:i:s');
|
||||
if (($request->filled('checkin_at')) && ($request->get('checkin_at') != date('Y-m-d'))) {
|
||||
$checkin_at = $request->get('checkin_at');
|
||||
}
|
||||
|
||||
// Was the asset updated?
|
||||
|
|
|
@ -116,6 +116,9 @@ trait Loggable
|
|||
$log->location_id = null;
|
||||
$log->note = $note;
|
||||
$log->action_date = $action_date;
|
||||
if (! $log->action_date) {
|
||||
$log->action_date = date('Y-m-d H:i:s');
|
||||
}
|
||||
|
||||
if (Auth::user()) {
|
||||
$log->user_id = Auth::user()->id;
|
||||
|
|
Loading…
Reference in a new issue