Skip to content

Commit

Permalink
Merge pull request #11896 from snipe/fixes/500_on_depreciation
Browse files Browse the repository at this point in the history
Fixed depreciation API call
  • Loading branch information
snipe committed Sep 30, 2022
2 parents 2b7c8cf + 36484d5 commit 2fd197c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/Http/Transformers/DepreciationsTransformer.php
Expand Up @@ -20,14 +20,13 @@ public function transformDepreciations(Collection $depreciations, $total)
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')
];
Expand Down

0 comments on commit 2fd197c

Please sign in to comment.