Sales Invoice Flow Overview¶
Goal¶
The Sales Invoice flow adds a specialized invoice flow for e-commerce and
jurisdiction-aware tax handling while keeping upstream django-ledger models
upgrade-safe.
Design¶
The flow does not modify django_ledger.InvoiceModel schema. Instead, it
extends invoice behavior using related models:
SalesInvoiceProfile: one-to-one sales profile linked toInvoiceModel.SalesInvoiceTaxComponent: aggregated tax totals by tax type.SalesInvoiceLineSummary: line-level computed tax snapshot.SalesInvoiceLineTaxComponent: per-line component details (GST/PST/HST/US).SalesTaxPreset: country/region tax presets (seeded for Canada).
Routes¶
The flow is available under:
/ledger/sales-invoices/<entity-slug>//ledger/sales-invoices/<entity-slug>/create//ledger/sales-invoices/<entity-slug>/<sales_invoice_pk>//ledger/sales-invoices/<entity-slug>/<sales_invoice_pk>/edit/
Compatibility with upstream updates¶
Because the flow stores custom metadata in accounting app models and
does not fork django-ledger source code, pulling upstream package updates is
low-risk.