osb/resources/views/theme/backend/adminlte/invoice/widget/next.blade.php

41 lines
1.3 KiB
PHP
Raw Normal View History

<!-- @todo These needs to be optimised, and change for $o = Account::class -->
2021-06-29 06:36:34 +00:00
<!-- Show next items for an invoice -->
@if(($x=$o->next_invoice_items($future))->count())
2021-06-29 06:36:34 +00:00
<div class="card">
<div class="card-body">
<table class="table">
<!-- Group by Account -->
2024-07-05 06:38:31 +00:00
@foreach ($x->groupBy('product_id') as $id => $oo)
2021-06-29 06:36:34 +00:00
<tr>
<th colspan="4">{{ $oo->first()->product->name }}</th>
<th class="text-right">${{ number_format($oo->sum('total'),2) }}</th>
</tr>
@foreach ($oo->groupBy('service_id') as $ooo)
<tr>
<td class="pt-0 pb-1" style="width: 12em;"><a href="{{ url('u/service',$ooo->first()->service_id) }}">{{ $ooo->first()->service->sid }}</a></td>
<td class="pt-0 pb-1" colspan="3">{{ $ooo->first()->service->name }}</td>
</tr>
2021-06-29 06:36:34 +00:00
@foreach ($ooo as $io)
<tr>
<td class="pt-0 pb-1">&nbsp;</td>
<td class="pt-0 pb-1">&nbsp;</td>
<td class="pt-0 pb-1">{{ $io->item_type_name }}</td>
<td class="text-right pt-0 pb-1">${{ number_format($io->total,2) }}</td>
</tr>
@endforeach
@endforeach
@endforeach
<tr>
<th class="text-right" colspan="4">TOTAL</th>
<th class="text-right">${{ number_format($x->sum('total'),2) }}</th>
</tr>
</table>
</div>
</div>
@else
<p>No items currently due to invoice.</p>
@endif