Fix rendering of invoice items, and links to payments and add payment dates to invoice
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 37s
Create Docker Image / Final Docker Image Manifest (push) Successful in 9s

This commit is contained in:
Deon George 2024-08-11 00:36:10 +10:00
parent ef0d4dc773
commit 4c273364c7
2 changed files with 8 additions and 3 deletions

View File

@ -106,6 +106,7 @@ class Invoice extends Model implements IDs
'items_active.product:id',
'items_active.product.translate:id,product_id,name_short,name_detail',
'payment_items_active:id,amount,payment_id,invoice_id',
'payment_items_active.payment:id,paid_at',
];
/* STATIC METHODS */

View File

@ -82,8 +82,8 @@
</div>
<div class="row">
<div class="col">
<table class="table table-responsive table-striped table-hover">
<div class="col-12">
<table class="table table-striped table-hover">
<thead>
<tr>
<th>Qty</th>
@ -192,7 +192,11 @@
<tr>
<th>&nbsp;</th>
<th>Payments:</th>
<td>#{{ $o->payment_items_active->pluck('payment_id')->join(', #') }}</td>
<td>
@foreach($o->payment_items_active as $po)
<span style="white-space:nowrap;">@can('view',$po->payment)#<a href="{{ url('r/payment',$po->payment_id) }}">{{ $po->payment_id }}</a>@else #{{ $po->payment_id }} @endcan <small>{{ $po->payment->paid_at->format('Y-m-d') }}</small></span>
@endforeach
</td>
<td class="text-right">${{ number_format($o->paid,2) }}</td>
</tr>
<tr style="font-size: 145%">