@foreach(\App\Models\Supplier::offeringTypes($o) as $key => $offering)
Product |
Services |
ID |
Product ID |
Product Name |
Active |
Setup Cost |
Base Cost |
Types |
Products |
Sold |
Active |
@foreach($xx=$offering->items->with(['products.product.services'])->get() as $oo)
{{ $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()) }} |
@endforeach
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