Invoice rendering for service, and unit testing for Invoice Item quantity

This commit is contained in:
Deon George
2020-02-06 18:31:43 +09:00
parent 5f5d114f42
commit ebd4367975
14 changed files with 541 additions and 236 deletions

View File

@@ -1,19 +1,13 @@
<div class="card">
<div class="card-header">
<strong>Next Invoice Details</strong>
</div>
<table class="table">
<tr>
<th colspan="3">{{ $o->name }}</th><th class="text-right">${{ number_format($o->next_invoice_items()->sum('total'),2) }}</th>
</tr>
<div class="card-body">
<table class="table table-borderless">
<tr>
<th colspan="3">{{ $o->name }}</th><th class="text-right">${{ number_format($o->next_invoice_items()->sum('total'),2) }}</th>
</tr>
@foreach ($o->next_invoice_items() as $io)
<tr>
<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
</table>
</div>
</div>
@foreach ($o->next_invoice_items() as $io)
<tr>
<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
</table>