@foreach(\App\Models\Supplier::offeringTypes($o) as $key => $offering)
@foreach($xx=$offering->items->with(['products.product.services'])->get() as $oo) @endforeach
Product Services
ID Product ID Product Name Active Setup Cost Base Cost Types Products Sold Active
{{ $oo->id }} {{ $oo->name_short }} {{ $oo->name_detail }} {{ $oo->active ? 'YES' : 'NO' }} {{ number_format($oo->setup_cost_taxable,2) }} {{ number_format($oo->base_cost_taxable,2) }} {{ number_format($oo->products->count()) }} {{ number_format($oo->products->pluck('product')->filter()->count()) }} {{ number_format(($x=$oo->products->pluck('product.services')->flatten()->filter())->count()) }} {{ number_format($x->where('active')->count()) }}
TOTALS {{ $xx->where('active',TRUE)->count() }} {{ number_format(($x=$xx->pluck('products')->flatten()->filter())->count()) }} {{ number_format($x->pluck('product')->filter()->count()) }} {{ number_format(($xxx=$x->pluck('product.services')->flatten()->filter())->count()) }} {{ number_format($xxx->where('active')->count()) }}
@endforeach
@section('page-scripts') @css(datatables,bootstrap4) @js(datatables,bootstrap4) @append