From 8a1ffb90142b3624bb4d034d4d6639a2ad9c16df Mon Sep 17 00:00:00 2001 From: snipe Date: Fri, 23 Oct 2015 17:55:03 -0700 Subject: [PATCH] Save de-normed values for last checkout and expected_checkin --- app/models/Asset.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/models/Asset.php b/app/models/Asset.php index c398191c8a..7a308c3436 100755 --- a/app/models/Asset.php +++ b/app/models/Asset.php @@ -27,6 +27,13 @@ class Asset extends Depreciable * Checkout asset */ public function checkOutToUser($user, $admin, $checkout_at = null, $expected_checkin = null, $note = null, $name = null) { + + if ($expected_checkin) { + $this->expected_checkin = $expected_checkin ; + } + + $this->last_checkout = $checkout_at; + $this->assigneduser()->associate($user); $this->name = $name;