A free open source IT asset/license management system
Fix implemented by using existing function from Depreciable trait, hence addressing the floor value
iryadifarhana4729a7de894
diff --git a/app/Http/Transformers/DepreciationReportTransformer.php b/app/Http/Transformers/DepreciationReportTransformer.phpindex 00eb984fa5..0c272b784f 100644--- a/app/Http/Transformers/DepreciationReportTransformer.php+++ b/app/Http/Transformers/DepreciationReportTransformer.php@@ -63,7 +63,7 @@ class DepreciationReportTransformer*/if (($asset->model) && ($asset->model->depreciation) && ($asset->model->depreciation->months !== 0)) {$depreciated_value = Helper::formatCurrencyOutput($asset->getDepreciatedValue());- $monthly_depreciation =Helper::formatCurrencyOutput($asset->purchase_cost / $asset->model->depreciation->months);+ $monthly_depreciation =Helper::formatCurrencyOutput($asset->getMonthlyDepreciation());$diff = Helper::formatCurrencyOutput(($asset->purchase_cost - $asset->getDepreciatedValue()));}else if($asset->model->eol !== null) {