Merge pull request #13207 from Godmartinz/half_year_dep_fix

adds half_year fix from jdickerson71388
This commit is contained in:
snipe 2023-06-28 15:12:30 +01:00 committed by GitHub
commit 4278471d81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -127,7 +127,7 @@ class Depreciable extends SnipeModel
$yearsPast = 0;
}
return round($yearsPast / $deprecationYears * $this->purchase_cost, 2);
return $this->purchase_cost - round($yearsPast / $deprecationYears * $this->purchase_cost, 2);
}
/**