Merge remote-tracking branch 'origin/develop'

This commit is contained in:
snipe 2021-01-26 22:12:39 -08:00
commit 1d9741a49e

View file

@ -246,13 +246,18 @@ class Asset extends Depreciable
*/ */
public function availableForCheckout() public function availableForCheckout()
{ {
if (
((!$this->assignedTo) && ($this->assetstatus->archived == 0)) || // This asset is not currently assigned to anyone and is not deleted...
((empty($this->assigned_to)) && if ((!$this->assigned_to) && (!$this->deleted_at)) {
(empty($this->deleted_at)) &&
(($this->assetstatus) && ($this->assetstatus->deployable == 1)))) // The asset status is not archived and is deployable
{ if (($this->assetstatus) && ($this->assetstatus->archived == '0')
return true; && ($this->assetstatus->deployable == '1'))
{
return true;
}
} }
return false; return false;
} }