@foreach($o->invoiced_items_active->groupBy('invoice_id') as $oo) @endforeach
Invoice Start Stop Service Extras Total
{{ $x->invoice_id }} {{ ($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) }}
@section('page-styles') @css(datatables,bootstrap4) @append @section('page-scripts') @js(datatables,bootstrap4) @append