Add invoice PDF generation with dompdf

Install barryvdh/laravel-dompdf, create professional invoice Blade template
with EZSCALE branding, add download endpoints for customer billing and admin
invoice pages.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Claude Dev
2026-02-09 20:17:34 -05:00
parent 0a6780d249
commit 69e0882c81
10 changed files with 881 additions and 11 deletions

View File

@@ -120,11 +120,9 @@ function formatDateTime(dateStr: string | null): string {
<div class="d-flex gap-2">
<VBtn
v-if="invoice.invoice_pdf"
color="info"
variant="tonal"
:href="invoice.invoice_pdf"
target="_blank"
:href="`/invoices/${invoice.id}/download`"
>
<VIcon icon="tabler-download" start />
Download PDF

View File

@@ -54,7 +54,15 @@ defineProps<Props>()
</td>
<td class="text-end">${{ parseFloat(invoice.total).toFixed(2) }}</td>
<td class="text-end">
<a :href="`/billing/invoices/${invoice.id}/download`" class="text-primary text-decoration-none">Download</a>
<VBtn
:href="`/billing/invoices/${invoice.id}/download`"
color="primary"
variant="tonal"
size="small"
>
<VIcon icon="tabler-download" start />
PDF
</VBtn>
</td>
</tr>
</tbody>