mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Fixed #8726 - disallow archived assets to be checked out
This commit is contained in:
parent
8a65081768
commit
f0e04ab9e4
|
@ -244,11 +244,12 @@ class Asset extends Depreciable
|
|||
*/
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue