Optimise product tables
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
<td>{{ number_format($io->total,2) }}</td>
|
||||
<td>{{ number_format($io->due,2) }}</td>
|
||||
<td class="text-right">
|
||||
<input type="text" class="text-right invoice" name="invoices[{{ $io->id }}]" value="{{ number_format(($x=$io->paymentitems->filter(function($item) use ($pid) { return $item->payment_id == $pid; })) ? $x->sum('alloc_amt') : 0,2) }}">
|
||||
<input type="text" class="text-right invoice" name="invoices[{{ $io->id }}]" value="{{ number_format(($x=$io->paymentitems->filter(function($item) use ($pid) { return $item->payment_id == $pid; })) ? $x->sum('amount') : 0,2) }}">
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
@@ -5,7 +5,7 @@
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
@if(($x=$o->payments()->where('payments.date_orig','>',\Carbon\Carbon::now()->subMonths(12)->unix())->with(['items','account'])->get())->count())
|
||||
@if(($x=$o->payments()->where('payments.created_at','>',\Carbon\Carbon::now()->subMonths(12)->unix())->with(['items','account'])->get())->count())
|
||||
<table class="table table-bordered w-100" id="payments_past">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -23,7 +23,7 @@
|
||||
<tr>
|
||||
<td>{{ $oo->account->name }}</td>
|
||||
<td>{{ $oo->sid }}</td>
|
||||
<td>{{ $oo->payment_date->format('Y-m-d') }}</td>
|
||||
<td>{{ $oo->paid_at->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>
|
||||
|
Reference in New Issue
Block a user