Merge pull request #14949 from snipe/fixes/depreciation_format

Check that there is a depreciation date before formatting
This commit is contained in:
snipe
2024-06-24 11:11:43 +01:00
committed by GitHub
+1 -1
View File
@@ -933,7 +933,7 @@ class ReportsController extends Controller
$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')) {