Fixed depreciation API call

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2022-09-29 17:07:42 -07:00
parent 2b7c8cf82b
commit 36484d50ef

View file

@ -20,14 +20,13 @@ class DepreciationsTransformer
return (new DatatablesTransformer)->transformDatatables($array, $total);
}
public function transformDepreciation(Depreciation $depreciation, Depreciable $monthly_depreciation)
public function transformDepreciation(Depreciation $depreciation)
{
$array = [
'id' => (int) $depreciation->id,
'name' => e($depreciation->name),
'months' => $depreciation->months.' '.trans('general.months'),
'depreciation_min' => $depreciation->depreciation_min,
'monthly_depreciation' => $monthly_depreciation->getMonthlyDepreciation(),
'created_at' => Helper::getFormattedDateObject($depreciation->created_at, 'datetime'),
'updated_at' => Helper::getFormattedDateObject($depreciation->updated_at, 'datetime')
];