Skip to content

Commit

Permalink
Merge pull request #14949 from snipe/fixes/depreciation_format
Browse files Browse the repository at this point in the history
Check that there is a depreciation date before formatting
  • Loading branch information
snipe committed Jun 24, 2024
2 parents 829b560 + 468674a commit 3d32fe6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Controllers/ReportsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,7 @@ public function postCustom(CustomAssetReportRequest $request)
$diff = ($asset->purchase_cost - $depreciation);
$row[] = Helper::formatCurrencyOutput($depreciation);
$row[] = Helper::formatCurrencyOutput($diff);
$row[] = ($asset->depreciation) ? $asset->depreciated_date()->format('Y-m-d') : '';
$row[] = (($asset->depreciation) && ($asset->depreciated_date())) ? $asset->depreciated_date()->format('Y-m-d') : '';
}

if ($request->filled('checkout_date')) {
Expand Down

0 comments on commit 3d32fe6

Please sign in to comment.