// frontend/src/routes/invoices/[id]/+page.svelte
{formatDate(invoice.date)}
{invoice.id}
{formatDate(invoice.date_paid)}
{invoice.payment_type ? invoice.payment_type.charAt(0).toUpperCase() + invoice.payment_type.slice(1).replace('_', ' ') : 'Not specified'}
{customer.billing_contact_first_name} {customer.billing_contact_last_name}
{customer.billing_email}
{customer.billing_street_address}
{customer.billing_city}, {customer.billing_state} {customer.billing_zip_code}
| Account | Description | Amount |
|---|---|---|
| {typeof revenue.account === 'object' ? revenue.account.name : accounts.find(a => a.id === revenue.account)?.name || 'Unknown Account'} | Monthly Service ({formatDate(revenue.start_date)} - {revenue.end_date ? formatDate(revenue.end_date) : 'Ongoing'}) | {formatCurrency(revenue.amount)} |
| Project | Date | Amount |
|---|---|---|
| Project for {typeof project.customer === 'object' ? project.customer.name : customer?.name || 'Unknown Customer'} | {formatDate(project.date)} | {formatCurrency(project.amount || 0)} |
No items attached to this invoice.
{formatDate(invoice.date_paid)}
Payment Method:
{invoice.payment_type ? invoice.payment_type.charAt(0).toUpperCase() + invoice.payment_type.slice(1).replace('_', ' ') : 'Not specified'}
Primary Contact:
{customer.primary_contact_first_name} {customer.primary_contact_last_name}
{customer.primary_contact_phone}
{customer.primary_contact_email}
Billing Contact:
{customer.billing_contact_first_name} {customer.billing_contact_last_name}
{customer.billing_email}