A free open source IT asset/license management system
Added location to checkout method
snipeb78679140132
diff --git a/app/Models/Asset.php b/app/Models/Asset.phpindex df0905ba52..89735ad999 100644--- a/app/Models/Asset.php+++ b/app/Models/Asset.php@@ -144,7 +144,7 @@ class Asset extends Depreciable* @return bool*///FIXME: The admin parameter is never used. Can probably be removed.- public function checkOut($target, $admin = null, $checkout_at = null, $expected_checkin = null, $note = null, $name = null)+ public function checkOut($target, $admin = null, $checkout_at = null, $expected_checkin = null, $note = null, $name = null, $location = null){if (!$target) {return false;@@ -163,6 +163,10 @@ class Asset extends Depreciable$this->name = $name;}+ if ($location != null) {+ $this->location_id = $location;+ }+if ($this->requireAcceptance()) {if(get_class($target) != User::class) {throw new CheckoutNotAllowed;