mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24: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()
|
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))))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue