From 98d18c00a3a20866e7f9ecff2dfc13f0a0d69e7c Mon Sep 17 00:00:00 2001 From: Deon George Date: Mon, 19 May 2025 07:52:59 +1000 Subject: [PATCH] Fix for when an invoice item doesnt have any start/stop dates --- .../backend/adminlte/service/widget/billinghistory.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/theme/backend/adminlte/service/widget/billinghistory.blade.php b/resources/views/theme/backend/adminlte/service/widget/billinghistory.blade.php index 6bb7dcb..431d8a5 100644 --- a/resources/views/theme/backend/adminlte/service/widget/billinghistory.blade.php +++ b/resources/views/theme/backend/adminlte/service/widget/billinghistory.blade.php @@ -15,8 +15,8 @@ @foreach($o->invoiced_items_active->groupBy('invoice_id') as $oo) {{ $x->invoice_id }} - {{ ($y=$oo->where('item_type',0))->min('start_at')->format('Y-m-d') }} - {{ $y->max('stop_at')->format('Y-m-d') }} + {{ ($y=$oo->where('item_type',0))->min('start_at')?->format('Y-m-d') }} + {{ $y->max('stop_at')?->format('Y-m-d') }} {{ number_format($y->sum('total'),2) }} {{ number_format($oo->where('item_type','<>',0)->sum('total'),2) }} {{ number_format($oo->sum('total'),2) }}