mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 14:27:33 -08:00
Set last_checkin in ui and api controllers
This commit is contained in:
parent
8b2716d2b7
commit
489d30c685
|
@ -905,6 +905,7 @@ class AssetsController extends Controller
|
||||||
|
|
||||||
$asset->expected_checkin = null;
|
$asset->expected_checkin = null;
|
||||||
$asset->last_checkout = null;
|
$asset->last_checkout = null;
|
||||||
|
$asset->last_checkin = now();
|
||||||
$asset->assigned_to = null;
|
$asset->assigned_to = null;
|
||||||
$asset->assignedTo()->disassociate($asset);
|
$asset->assignedTo()->disassociate($asset);
|
||||||
$asset->accepted = null;
|
$asset->accepted = null;
|
||||||
|
|
|
@ -68,6 +68,7 @@ class AssetCheckinController extends Controller
|
||||||
|
|
||||||
$asset->expected_checkin = null;
|
$asset->expected_checkin = null;
|
||||||
$asset->last_checkout = null;
|
$asset->last_checkout = null;
|
||||||
|
$asset->last_checkin = now();
|
||||||
$asset->assigned_to = null;
|
$asset->assigned_to = null;
|
||||||
$asset->assignedTo()->disassociate($asset);
|
$asset->assignedTo()->disassociate($asset);
|
||||||
$asset->assigned_type = null;
|
$asset->assigned_type = null;
|
||||||
|
|
|
@ -73,6 +73,7 @@ class Asset extends Depreciable
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
'purchase_date' => 'date',
|
'purchase_date' => 'date',
|
||||||
'last_checkout' => 'datetime',
|
'last_checkout' => 'datetime',
|
||||||
|
'last_checkin' => 'datetime',
|
||||||
'expected_checkin' => 'date',
|
'expected_checkin' => 'date',
|
||||||
'last_audit_date' => 'datetime',
|
'last_audit_date' => 'datetime',
|
||||||
'next_audit_date' => 'date',
|
'next_audit_date' => 'date',
|
||||||
|
|
Loading…
Reference in a new issue