mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 22:37:28 -08:00
fix monthly depreciation value
This commit is contained in:
parent
5ffd1b8daa
commit
b7ad80bd31
|
@ -66,12 +66,11 @@ class DepreciationReportTransformer
|
||||||
if($asset->model->eol===0 || $asset->model->eol===null ){
|
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 {
|
||||||
$monthly_depreciation = Helper::formatCurrencyOutput(($asset->model->eol > 0 ? ($asset->purchase_cost / $asset->model->eol) : 0));
|
$monthly_depreciation = Helper::formatCurrencyOutput(($asset->model->eol > 0 ? ($asset->purchase_cost / $asset->model->eol) : 0));
|
||||||
}
|
}
|
||||||
$diff = Helper::formatCurrencyOutput(($asset->purchase_cost - $asset->getDepreciatedValue()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if ($asset->assigned) {
|
if ($asset->assigned) {
|
||||||
$checkout_target = $asset->assigned->name;
|
$checkout_target = $asset->assigned->name;
|
||||||
|
|
Loading…
Reference in a new issue