From 40dd34b5bfb1f99d19783b32ccac9b0efd23368a Mon Sep 17 00:00:00 2001 From: Minaev Dmitriy Date: Sat, 25 Aug 2018 20:18:31 +0300 Subject: [PATCH] depreciation value rounding --- app/Models/Depreciable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Depreciable.php b/app/Models/Depreciable.php index 43ea0af601..bcdd599040 100644 --- a/app/Models/Depreciable.php +++ b/app/Models/Depreciable.php @@ -114,7 +114,7 @@ class Depreciable extends SnipeModel else if($yearsPast < 0) { $yearsPast = 0; } - return $yearsPast / $deprecationYears * $this->purchase_cost; + return round($yearsPast / $deprecationYears * $this->purchase_cost, 2); } /**