Checking $asset->depreciation before calling $asset->depreciated_date()
This commit is contained in:
Folke Ashberg 2020-10-22 14:22:42 +02:00
parent 338106734a
commit 5824ac3b28
No known key found for this signature in database
GPG key ID: 86D89A9771903CB2

View file

@ -682,7 +682,7 @@ class ReportsController extends Controller
$diff = ($asset->purchase_cost - $depreciation);
$row[] = Helper::formatCurrencyOutput($depreciation);
$row[] = Helper::formatCurrencyOutput($diff);
$row[] = ($asset->depreciated_date()!='') ? $asset->depreciated_date()->format('Y-m-d') : '';
$row[] = ($asset->depreciation ? $asset->depreciated_date()->format('Y-m-d') : '';
}
if ($request->filled('checkout_date')) {