@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.products.services'])->get() as $oo)
{{ $oo->id }} |
{{ $oo->name }} |
{{ $oo->name_long }} |
{{ $oo->active ? 'YES' : 'NO' }} |
{{ number_format($site->taxed($oo->setup_cost),2) }} |
{{ number_format($site->taxed($oo->base_cost),2) }} |
{{ number_format($oo->products->count()) }} |
{{ number_format($oo->products->pluck('products')->filter()->count()) }} |
{{ number_format(($x=$oo->products->pluck('products')->flatten()->pluck('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('products')->filter()->count()) }} |
{{ number_format(($xxx=$x->pluck('products')->flatten()->pluck('services')->flatten()->filter())->count()) }} |
{{ number_format($xxx->where('active')->count()) }} |
@endforeach