diff --git a/app/Filament/Admin/Resources/InvoiceResource.php b/app/Filament/Admin/Resources/InvoiceResource.php index e4f5163..bbd84a5 100644 --- a/app/Filament/Admin/Resources/InvoiceResource.php +++ b/app/Filament/Admin/Resources/InvoiceResource.php @@ -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() diff --git a/resources/views/pdf/invoice-report.blade.php b/resources/views/pdf/invoice-report.blade.php index b33de01..2f79c04 100644 --- a/resources/views/pdf/invoice-report.blade.php +++ b/resources/views/pdf/invoice-report.blade.php @@ -72,7 +72,7 @@
- ${{number_format($invoiceReport->balance, 2)}} + ${{number_format($invoiceReport->invoices->sum(fn ($invoice) => $invoice->remainingBalance()) , 2)}}
@@ -87,6 +87,7 @@ Subtotal GST/HST PST + Total Balance Status @@ -107,7 +108,8 @@ @endif - {{!$invoice->has_pst ? '$'.number_format($invoice->pst_amount, 2) : '-'}} + {{$invoice->has_pst ? '$'.number_format($invoice->pst_amount, 2) : '-'}} + ${{number_format($invoice->total, 2)}} ${{number_format($invoice->remainingBalance(), 2)}} {{$invoice->status->value}}