mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Merge pull request #10919 from Godmartinz/gh10866-checkin_time_always_show_12am
Fixed #10866 - Checkin time always shows 12am
This commit is contained in:
commit
b73542664b
|
@ -106,9 +106,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');
|
||||
}
|
||||
|
||||
if(!empty($asset->licenseseats->all())){
|
||||
|
|
|
@ -115,6 +115,10 @@ trait Loggable
|
|||
$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