Fix for when an invoice item doesnt have any start/stop dates
This commit is contained in:
parent
3ae588041f
commit
98d18c00a3
@ -15,8 +15,8 @@
|
||||
@foreach($o->invoiced_items_active->groupBy('invoice_id') as $oo)
|
||||
<tr>
|
||||
<td><a href="{{ url('u/invoice',($x=$oo->first())->invoice_id) }}">{{ $x->invoice_id }}</a></td>
|
||||
<td>{{ ($y=$oo->where('item_type',0))->min('start_at')->format('Y-m-d') }}</td>
|
||||
<td>{{ $y->max('stop_at')->format('Y-m-d') }}</td>
|
||||
<td>{{ ($y=$oo->where('item_type',0))->min('start_at')?->format('Y-m-d') }}</td>
|
||||
<td>{{ $y->max('stop_at')?->format('Y-m-d') }}</td>
|
||||
<th>{{ number_format($y->sum('total'),2) }}</th>
|
||||
<th>{{ number_format($oo->where('item_type','<>',0)->sum('total'),2) }}</th>
|
||||
<td class="text-right">{{ number_format($oo->sum('total'),2) }}</td>
|
||||
|
Loading…
x
Reference in New Issue
Block a user