mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
reworked monthly depreciation variable value
This commit is contained in:
parent
b7ad80bd31
commit
b9cfdf2e54
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue