Fix display of supplier products and offerings - wasnt including all services
This commit is contained in:
@@ -33,17 +33,17 @@
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($xx=$offering->items->with(['products.product.services'])->get() as $oo)
|
||||
@foreach($xx=$offering->items->with(['products.products.services'])->get() as $oo)
|
||||
<tr>
|
||||
<td>{{ $oo->id }}</td>
|
||||
<td>{{ $oo->name_short }}</td>
|
||||
<td>{{ $oo->name_detail }}</td>
|
||||
<td>{{ $oo->name }}</td>
|
||||
<td>{{ $oo->name_long }}</td>
|
||||
<td class="text-right">{{ $oo->active ? 'YES' : 'NO' }}</td>
|
||||
<td class="text-right">{{ number_format($oo->setup_cost_taxable,2) }}</td>
|
||||
<td class="text-right">{{ number_format($oo->base_cost_taxable,2) }}</td>
|
||||
<td class="text-right">{{ number_format($oo->products->count()) }}</td>
|
||||
<td class="text-right">{{ number_format($oo->products->pluck('product')->filter()->count()) }}</td>
|
||||
<td class="text-right">{{ number_format(($x=$oo->products->pluck('product.services')->flatten()->filter())->count()) }}</td>
|
||||
<td class="text-right">{{ number_format($oo->products->pluck('products')->filter()->count()) }}</td>
|
||||
<td class="text-right">{{ number_format(($x=$oo->products->pluck('products')->flatten()->pluck('services')->flatten()->filter())->count()) }}</td>
|
||||
<td class="text-right">{{ number_format($x->where('active')->count()) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@@ -54,8 +54,8 @@
|
||||
<th colspan="3">TOTALS</th>
|
||||
<td class="text-right" colspan="3">{{ $xx->where('active',TRUE)->count() }}</td>
|
||||
<td class="text-right">{{ number_format(($x=$xx->pluck('products')->flatten()->filter())->count()) }}</td>
|
||||
<td class="text-right">{{ number_format($x->pluck('product')->filter()->count()) }}</td>
|
||||
<td class="text-right">{{ number_format(($xxx=$x->pluck('product.services')->flatten()->filter())->count()) }}</td>
|
||||
<td class="text-right">{{ number_format($x->pluck('products')->filter()->count()) }}</td>
|
||||
<td class="text-right">{{ number_format(($xxx=$x->pluck('products')->flatten()->pluck('services')->flatten()->filter())->count()) }}</td>
|
||||
<td class="text-right">{{ number_format($xxx->where('active')->count()) }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
@@ -34,9 +34,8 @@
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($xx=$offering->items->with(['products.product.services','products.product.type.supplied','products.product.description'])->get() as $oo)
|
||||
@foreach($oo->products->pluck('product')->filter() as $po)
|
||||
|
||||
@foreach($xx=$offering->items->with(['products.products.services','products.products.type.supplied','products.products.translate'])->get() as $oo)
|
||||
@foreach($oo->products->pluck('products')->flatten()->filter() as $po)
|
||||
<tr>
|
||||
<td><a href="{{ url('a/supplier/product/addedit',[$po->supplier->id,$po->supplied->id,$po->supplied->category]) }}">{{ $po->lid }}</a></td>
|
||||
<td>{{ $po->name_short }}</td>
|
||||
@@ -59,7 +58,7 @@
|
||||
<th colspan="3">TOTALS</th>
|
||||
<td class="text-right">{{ $xx->where('active',TRUE)->count() }}</td>
|
||||
<th colspan="5"> </th>
|
||||
<td class="text-right">{{ number_format(($xxx=$xx->pluck('products')->flatten()->pluck('product.services')->flatten()->filter())->count()) }}</td>
|
||||
<td class="text-right">{{ number_format(($xxx=$xx->pluck('products')->flatten()->pluck('products')->flatten()->pluck('services')->flatten()->filter())->count()) }}</td>
|
||||
<td class="text-right">{{ number_format($xxx->where('active')->count()) }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
Reference in New Issue
Block a user