NextRouteNextRoute

Invoices

Invoice lifecycle, line items, sequential numbering, tax calculation, and per-property billing.

Invoices

NextRoute generates invoices for your customers based on completed services. Invoices support per-property line items, configurable tax rates, and sequential numbering.

Invoice Fields

FieldDescription
invoice_numberSequential number (e.g., INV-1001, INV-1002)
customer_idThe billed customer
statusCurrent lifecycle status
subtotal_centsSum of all line items before tax
tax_centsCalculated tax amount
total_centssubtotal_cents + tax_cents
due_datePayment due date (based on payment terms)
sent_atWhen the invoice was emailed to the customer
paid_atWhen payment was recorded

Invoice Lifecycle

draft → sent → paid
              → overdue
         → void
StatusDescription
draftInvoice created but not yet sent to the customer
sentEmailed to the customer; awaiting payment
paidPayment received and recorded
overduePast the due date with no payment
voidCanceled — excluded from financial reports

Invoice Numbering

Invoice numbers are sequential per tenant, starting from INV-1001. The tenant's next_invoice_number counter auto-increments with each invoice created. Numbers are zero-padded to 4 digits (e.g., INV-0042, INV-1234).

Line Items

Each invoice contains one or more line items that break down the charges:

FieldDescription
descriptionWhat the charge is for
service_plan_idLinked plan (optional)
property_idLinked property (for multi-property customers)
quantityNumber of service occurrences
unit_price_centsPrice per occurrence
total_centsquantity × unit_price_cents

Per-Property Line Items

For customers with multiple properties, each property gets its own line item:

Invoice INV-1042 for "Acme Property Management"
├── Line: 123 Main St — Weekly Bin Cleaning × 4    $140.00
├── Line: 456 Oak Ave — Weekly Bin Cleaning × 4    $140.00
├── Line: 456 Oak Ave — Additional bin × 4          $40.00
└── Line: 789 Elm Dr — Biweekly Bin Cleaning × 2   $70.00
                                          Subtotal: $390.00
                                          Tax (8%):  $31.20
                                           Total:   $421.20

Per-Bin Pricing

If a property has more than one bin and the plan includes additional_bin_price_cents, an extra line item is added:

  • Description: "Additional bin" (or similar)
  • Quantity: number of services in the period
  • Unit price: additional_bin_price_cents
  • Total: quantity times unit price

Tax Calculation

Tax is calculated using the following priority:

  1. Plan-level tax rate — if the service plan has a tax_rate set, it is used
  2. Tenant default tax rate — falls back to tenant.default_tax_rate
  3. Zero — if neither is set

Tax is applied to the subtotal:

tax_cents = subtotal_cents × (tax_rate / 100)

Viewing & Printing Invoices

Invoices can be viewed as a printable HTML page with your business branding (logo, name, address). The print view includes:

  • Your business information and logo
  • Customer billing details
  • Line item table with quantities and pricing
  • Subtotal, tax, and total
  • Payment history (if any payments recorded)
  • Status badge (Paid, Sent, Overdue, etc.)

Click Print / Save as PDF to generate a PDF from the browser.