Skip to content

Commit a4729a7

Browse files
committed
Fix implemented by using existing function from Depreciable trait, hence addressing the floor value
1 parent b3996f1 commit a4729a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/Http/Transformers/DepreciationReportTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function transformAsset(Asset $asset)
6363
*/
6464
if (($asset->model) && ($asset->model->depreciation) && ($asset->model->depreciation->months !== 0)) {
6565
$depreciated_value = Helper::formatCurrencyOutput($asset->getDepreciatedValue());
66-
$monthly_depreciation =Helper::formatCurrencyOutput($asset->purchase_cost / $asset->model->depreciation->months);
66+
$monthly_depreciation =Helper::formatCurrencyOutput($asset->getMonthlyDepreciation());
6767
$diff = Helper::formatCurrencyOutput(($asset->purchase_cost - $asset->getDepreciatedValue()));
6868
}
6969
else if($asset->model->eol !== null) {

0 commit comments

Comments
 (0)