From 4cf33f38410006becd8247210257769cfdbbefdf Mon Sep 17 00:00:00 2001 From: Matt Young Date: Wed, 28 Jan 2026 15:55:58 -0600 Subject: [PATCH] Customer invoices working. --- .../Controllers/CustomerInvoiceController.php | 21 +++++ resources/views/invoices/show.blade.php | 85 +++++++++++++++++++ routes/web.php | 2 + 3 files changed, 108 insertions(+) create mode 100644 app/Http/Controllers/CustomerInvoiceController.php create mode 100644 resources/views/invoices/show.blade.php diff --git a/app/Http/Controllers/CustomerInvoiceController.php b/app/Http/Controllers/CustomerInvoiceController.php new file mode 100644 index 0000000..9a14aed --- /dev/null +++ b/app/Http/Controllers/CustomerInvoiceController.php @@ -0,0 +1,21 @@ +status === InvoiceStatus::DRAFT) { + abort(404); + } + if ($invoice->status === InvoiceStatus::VOID) { + abort(404); + } + + return view('invoices.show', compact('invoice')); + } +} diff --git a/resources/views/invoices/show.blade.php b/resources/views/invoices/show.blade.php new file mode 100644 index 0000000..2990970 --- /dev/null +++ b/resources/views/invoices/show.blade.php @@ -0,0 +1,85 @@ + + + + + + Invoice {{ $invoice->invoice_number }} + + + +
+
+

INVOICE

+

{{ $invoice->invoice_number }}

+
+
+

eBandroom

+

540 W. Louse Ave.

+

Vinita, OK 74301

+
+
+ +
+
+

Bill To

+

{{ $invoice->client->name }}

+
+
+
+ Invoice Date: + {{ $invoice->invoice_date?->format('F j, Y') }} +
+
+ Due Date: + {{ $invoice->due_date?->format('F j, Y') }} +
+
+
+ + + + + + + + + + + + + + @foreach($invoice->lines as $line) + + + + + + + + + @endforeach + + + + + + + +
SKUDescriptionSchool YearQtyUnit PriceAmount
{{ $line->sku }}{{ $line->name }}{{ $line->school_year_formatted }}{{ $line->quantity }}{{ formatMoney($line->unit_price) }}{{ formatMoney($line->amount) }}
Total{{ formatMoney($invoice->total) }}
+ +
+

Payment

+

Please make payment to:

+

eBandroom

+

540 W. Louse Ave.

+

Vinita, OK 74301

+
+ + @if($invoice->notes) +
+

Notes

+

{{ $invoice->notes }}

+
+ @endif + + \ No newline at end of file diff --git a/routes/web.php b/routes/web.php index f018d30..6f52a9c 100644 --- a/routes/web.php +++ b/routes/web.php @@ -1,5 +1,6 @@ group(function () { Route::view('invoices', 'invoices.index')->name('invoices'); Route::get('invoices/{invoice}/edit', fn (Invoice $invoice) => view('invoices.edit', compact('invoice')))->name('invoices.edit'); + Route::get('invoices/{invoice}', CustomerInvoiceController::class)->name('invoices.show'); }); // Route::view('dashboard', 'dashboard')