Rework payment tables, enable payment editing

This commit is contained in:
Deon George
2021-07-23 17:25:26 +10:00
parent fa62a47680
commit d463239b17
19 changed files with 352 additions and 116 deletions

View File

@@ -156,38 +156,39 @@
<div class="ml-auto col-4">
<table class="table">
<tr>
<th colspan="2" style="width:50%">Subtotal:</th>
<td class="text-right">${{ number_format($o->total_sub,$o->currency()->rounding) }}</td>
<th colspan="3" style="width:50%">Subtotal:</th>
<td colspan="2" class="text-right">${{ number_format($o->total_sub,$o->currency()->rounding) }}</td>
</tr>
<tr>
<th>&nbsp;</th>
<th>Tax (GST 10%)</th>
<td class="text-right">${{ number_format($o->total_tax,$o->currency()->rounding) }}</td>
<td colspan="2" class="text-right">${{ number_format($o->total_tax,$o->currency()->rounding) }}</td>
</tr>
<tr>
<th>&nbsp;</th>
<th>Other Charges:</th>
<!-- @todo -->
<td class="text-right">$0.00</td>
<td colspan="2" class="text-right">$0.00</td>
</tr>
<tr>
<th colspan="2">Total:</th>
<td class="text-right">${{ number_format($o->total,$o->currency()->rounding) }}</td>
<td colspan="2" class="text-right">${{ number_format($o->total,$o->currency()->rounding) }}</td>
</tr>
@if($o->id)
<tr>
<th>&nbsp;</th>
<th>Payments To Clear:</th>
<td class="text-right">${{ number_format($o->paid_pending,$o->currency()->rounding) }}</td>
<td colspan="2" class="text-right">${{ number_format($o->paid_pending,$o->currency()->rounding) }}</td>
</tr>
<tr>
<th>&nbsp;</th>
<th>Payments:</th>
<td>#{{ $o->payments->pluck('id')->join(', #') }}</td>
<td class="text-right">${{ number_format($o->paid,$o->currency()->rounding) }}</td>
</tr>
<tr style="font-size: 145%">
<th colspan="2">Invoice Due:</th>
<td class="text-right">${{ number_format($o->due,$o->currency()->rounding) }}</td>
<td colspan="2" class="text-right">${{ number_format($o->due,$o->currency()->rounding) }}</td>
</tr>
@endif
</table>

View File

@@ -23,7 +23,7 @@
<tr>
<td>{{ $oo->account->name }}</td>
<td>{{ $oo->sid }}</td>
<td>{{ $oo->date_payment->format('Y-m-d') }}</td>
<td>{{ $oo->payment_date->format('Y-m-d') }}</td>
<td class="text-right">${{ number_format($oo->total,2) }}</td>
{{--<td class="text-right">${{ number_format($oo->balance,2) }}</td>--}}
<td>