mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 06:04:08 -08:00
Fixed #8726 - disallow archived assets to be checked out
This commit is contained in:
parent
8a65081768
commit
f0e04ab9e4
|
@ -244,8 +244,9 @@ class Asset extends Depreciable
|
||||||
*/
|
*/
|
||||||
public function availableForCheckout()
|
public function availableForCheckout()
|
||||||
{
|
{
|
||||||
|
\Log::debug($this->assetstatus);
|
||||||
if (
|
if (
|
||||||
(!$this->assignedTo) ||
|
((!$this->assignedTo) && ($this->assetstatus->archived == 0)) ||
|
||||||
((empty($this->assigned_to)) &&
|
((empty($this->assigned_to)) &&
|
||||||
(empty($this->deleted_at)) &&
|
(empty($this->deleted_at)) &&
|
||||||
(($this->assetstatus) && ($this->assetstatus->deployable == 1))))
|
(($this->assetstatus) && ($this->assetstatus->deployable == 1))))
|
||||||
|
|
Loading…
Reference in a new issue