diff --git a/app/Models/Asset.php b/app/Models/Asset.php index 8404a0e1d7b0..376be08fcbcc 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -244,11 +244,12 @@ public function company() */ public function availableForCheckout() { + \Log::debug($this->assetstatus); if ( - (!$this->assignedTo) || + ((!$this->assignedTo) && ($this->assetstatus->archived == 0)) || ((empty($this->assigned_to)) && (empty($this->deleted_at)) && - (($this->assetstatus) && ($this->assetstatus->deployable == 1)))) + (($this->assetstatus) && ($this->assetstatus->deployable == 1)))) { return true; }