From baa7e7d5615893c6277e8af1d1daa7231232ba38 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Tue, 16 Jul 2024 20:27:38 -0700 Subject: [PATCH] clean up --- app/Models/Depreciable.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Models/Depreciable.php b/app/Models/Depreciable.php index d382a65d6..02b319eeb 100644 --- a/app/Models/Depreciable.php +++ b/app/Models/Depreciable.php @@ -67,7 +67,7 @@ class Depreciable extends SnipeModel * @return float|int */ public function getLinearDepreciatedValue() // TODO - for testing it might be nice to have an optional $relative_to param here, defaulted to 'now' - { ; + { if (($this->get_depreciation()) && ($this->purchase_date)) { $months_passed = ($this->purchase_date->diff(now())->m)+($this->purchase_date->diff(now())->y*12); } else { @@ -76,7 +76,7 @@ class Depreciable extends SnipeModel if ($months_passed >= $this->get_depreciation()->months){ //if there is a floor use it - if(!$this->get_depreciation()->depreciation_min == null) { + if((!$this->get_depreciation()->depreciation_min) === null) { $current_value = $this->calculateDepreciation();