#96 Add total column to Invoices and Invoice Reports
This commit is contained in:
parent
20dd032b40
commit
5bec1fc3d8
@ -183,6 +183,11 @@ public static function table(Table $table): Table
|
||||
})
|
||||
->alignRight(),
|
||||
|
||||
TextColumn::make('total')
|
||||
->money()
|
||||
->alignRight()
|
||||
->weight(FontWeight::Medium),
|
||||
|
||||
TextColumn::make('balance')
|
||||
->getStateUsing(fn (Invoice $record) => $record->remainingBalance())
|
||||
->money()
|
||||
|
@ -72,7 +72,7 @@
|
||||
</div>
|
||||
<br>
|
||||
<div>
|
||||
${{number_format($invoiceReport->balance, 2)}}
|
||||
${{number_format($invoiceReport->invoices->sum(fn ($invoice) => $invoice->remainingBalance()) , 2)}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -87,6 +87,7 @@
|
||||
<th class="text-end">Subtotal</th>
|
||||
<th class="text-end">GST/HST</th>
|
||||
<th class="text-end">PST</th>
|
||||
<th class="text-end">Total</th>
|
||||
<th class="text-end">Balance</th>
|
||||
<th class="text-end">Status</th>
|
||||
</tr>
|
||||
@ -107,7 +108,8 @@
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td class="text-end">{{!$invoice->has_pst ? '$'.number_format($invoice->pst_amount, 2) : '-'}}</td>
|
||||
<td class="text-end">{{$invoice->has_pst ? '$'.number_format($invoice->pst_amount, 2) : '-'}}</td>
|
||||
<td class="text-end">${{number_format($invoice->total, 2)}}</td>
|
||||
<td class="text-end">${{number_format($invoice->remainingBalance(), 2)}}</td>
|
||||
<td class="text-end">{{$invoice->status->value}}</td>
|
||||
</tr>
|
||||
|
Loading…
x
Reference in New Issue
Block a user