Merge pull request from fashberg/iss8580

Fixed : ReportsController called method on NULL Object
This commit is contained in:
snipe 2020-10-22 13:00:08 -07:00 committed by GitHub
commit 153f849ef7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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')) {