Merge branch 'develop' of https://github.com/snipe/snipe-it into develop
This commit is contained in:
commit
54fbd0540d
1 changed files with 4 additions and 7 deletions
|
@ -63,15 +63,12 @@ class DepreciationReportTransformer
|
||||||
*/
|
*/
|
||||||
if (($asset->model) && ($asset->model->depreciation)) {
|
if (($asset->model) && ($asset->model->depreciation)) {
|
||||||
$depreciated_value = Helper::formatCurrencyOutput($asset->getDepreciatedValue());
|
$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);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$monthly_depreciation = Helper::formatCurrencyOutput(($asset->model->eol > 0 ? ($asset->purchase_cost / $asset->model->eol) : 0));
|
|
||||||
}
|
|
||||||
$diff = Helper::formatCurrencyOutput(($asset->purchase_cost - $asset->getDepreciatedValue()));
|
$diff = Helper::formatCurrencyOutput(($asset->purchase_cost - $asset->getDepreciatedValue()));
|
||||||
}
|
}
|
||||||
|
else if($asset->model->eol !== null) {
|
||||||
|
$monthly_depreciation = Helper::formatCurrencyOutput(($asset->model->eol > 0 ? ($asset->purchase_cost / $asset->model->eol) : 0));
|
||||||
|
}
|
||||||
|
|
||||||
if ($asset->assigned) {
|
if ($asset->assigned) {
|
||||||
$checkout_target = $asset->assigned->name;
|
$checkout_target = $asset->assigned->name;
|
||||||
|
|
Loading…
Add table
Reference in a new issue