Skip to content

Invoicing

The Invoicing app is a comprehensive billing system. It covers the full invoicing lifecycle: managing a customer database and product catalog, generating invoices and quotations, recording payments, and tracking financial metrics like revenue, outstanding balances, and overdue amounts.

  • Invoice creation with line items, tax calculations, discounts, and shipping
  • Quotation management with conversion to invoices
  • Customer database with contact details, addresses, and balance tracking
  • Product catalog for reusable line items with pricing and tax configuration
  • Payment recording with method, receipt URLs, and notes
  • Recurring invoices with configurable intervals and next recurrence dates
  • Configurable settings — invoice/quotation/payment number prefixes, default currency, tax method, and due days
  • Financial dashboard with revenue, outstanding, overdue, and invoice count stats
RoutePurpose
/business/apps/invoicingDashboard with financial stats and recent invoices
/business/apps/invoicing/invoicesFull invoice listing
/business/apps/invoicing/invoices/newCreate a new invoice
/business/apps/invoicing/invoices/[id]Invoice detail view
/business/apps/invoicing/invoices/[id]/editEdit an existing invoice
/business/apps/invoicing/quotationsQuotation listing
/business/apps/invoicing/quotations/newCreate a new quotation
/business/apps/invoicing/customersCustomer listing
/business/apps/invoicing/customers/[id]Customer detail view
/business/apps/invoicing/catalogProduct/service catalog
/business/apps/invoicing/paymentsPayment listing
/business/apps/invoicing/settingsInvoicing configuration (prefixes, defaults)

The primary entity with customer_id, auto-generated number, hash for public access, line-item totals (subtotal, total_tax, total_discount, shipping, grand_total), paid_amount, and status (draft, sent, viewed, partial, paid, overdue, canceled). Supports recurring billing with is_recurring, recurring_interval, and next_recurrence_date.

Line items with optional catalog_item_id reference, quantity, unit_price, discount, computed discount_amount, tax_amount, subtotal, and total.

Mirrors the invoice structure with its own status lifecycle: draft, sent, accepted, declined, expired, converted. The converted_invoice_id links to the resulting invoice when a quotation is accepted.

Contact records with name, company, email, phone, full address fields, and a running balance.

Reusable products/services with name, description, price, and tax_method.

Payment records tied to invoices with amount, method, date, optional receipt_url, and a sequential number.

Per-user configuration: number prefixes (invoice_prefix, quotation_prefix, payment_prefix), auto-incrementing counters, default_currency, default_tax_method, and default_due_days.

Aggregate dashboard metrics: totalRevenue, totalOutstanding, totalOverdue, invoiceCount, paidCount, overdueCount, draftCount.

  • Stats grid — four cards: Revenue (green), Outstanding, Overdue (destructive red), and Invoice count with paid/overdue/draft breakdown
  • Quick nav grid — six icon-linked cards: Invoices, Quotations, Customers, Catalog, Payments, Settings
  • Recent invoices — uses the InvoiceCard component from $lib/apps/invoicing/modules/invoices for consistent rendering across views
  • Currency formattingIntl.NumberFormat with USD currency style
  • Services: getStats and listInvoices from $lib/apps/invoicing/services
  • Shared components: InvoiceCard from $lib/apps/invoicing/modules/invoices — a reusable card component for invoice list items
  • Platform payments: Invoices have an optional platform_payment_id linking to the platform’s payment system
  • Database: Stored in a separate ext_invoicing schema