A free open source IT asset/license management system
reworked monthly depreciation variable value
Godfrey Mb9cfdf2e54bd
diff --git a/app/Http/Transformers/DepreciationReportTransformer.php b/app/Http/Transformers/DepreciationReportTransformer.phpindex a64c15d721..33d9a1f5fd 100644--- a/app/Http/Transformers/DepreciationReportTransformer.php+++ b/app/Http/Transformers/DepreciationReportTransformer.php@@ -63,12 +63,10 @@ class DepreciationReportTransformer*/if (($asset->model) && ($asset->model->depreciation)) {$depreciated_value = Helper::formatCurrencyOutput($asset->getDepreciatedValue());- if($asset->model->eol===0 || $asset->model->eol===null ){- $monthly_depreciation =Helper::formatCurrencyOutput($asset->purchase_cost / $asset->model->depreciation->months);- }+ $monthly_depreciation =Helper::formatCurrencyOutput($asset->purchase_cost / $asset->model->depreciation->months);$diff = Helper::formatCurrencyOutput(($asset->purchase_cost - $asset->getDepreciatedValue()));}- else {+ else if($asset->model->eol !== null) {$monthly_depreciation = Helper::formatCurrencyOutput(($asset->model->eol > 0 ? ($asset->purchase_cost / $asset->model->eol) : 0));}