Finance — Overview
Finance is the business layer that tracks money after Booking or Subscription creates a payment obligation:
Billing,Invoice,CreditNote, finance transaction, invoice manager, and accounting sync.
Finance does not decide which sessions a customer can book. It turns Booking/Subscription data → financial documents → tracks processing state → data for Payment, CreditNote, reporting, Xero sync.
Quick model
What Finance covers
| Area | One line |
|---|---|
| Billing | Groups booking/enrollment into charge obligations, keeps PaymentOptionId, split rule, currency/context. |
| Invoice | Receivable document with a lifecycle from creation, issue, approve, lock, to paid/cancel. |
| CreditNote | Negative adjustment or refund document, linking invoice/booking to balance finances. |
| FinanceTransaction | Projection for invoice manager, search, booking number sync, and credit-note allocation sync. |
| Invoice Manager | Admin surface to view, filter, lock, process invoices and the integrity rules around booking id. |
| Preview Billing Diff | Simulates the financial difference when editing a confirmed booking, without writing data. |
| Accounting sync | Sync to a provider such as Xero, including account settings and provider sync lifecycle. |
| Invoice email & reminder | Sends invoice email single/batch without PDF and automatic debt reminders ≤3 rules/BU (OnInvoiceDate/BeforeDueDate/AfterDueDate). |
| Invoice notification & tracking | Invoice_Fully_Paid notification when moving to Paid, marks Viewed when the customer opens the invoice, tags Processing when the invoice is locked. |
| Subsidy | Subsidy affects eligibility/finance, including allocation batch/estimation and site licence setup (SWN/Program ID). |
| Subscription Enrichment boundary | Enrichment fees belong to Booking Billing/Reconciliation; Subscription Billing only creates invoices from the schedule/add-on. |
Suggested reading
- Core concepts
- Architecture & data
- Edit Booking with/without Preview Billing Diff
- Preview Billing Diff — code flow
- Data & read/write tables
- Subsidy
- Common cases
Related
- Booking creates billing/invoice after submit/confirm.
- Payment collects money based on invoice/payment option.
- Platform receives EntityEvent/history from invoice, credit note and transaction.
- Subscription creates recurring billing schedule and invoice by schedule.
Current implementation
- Closure Day credit reverses only money already invoiced but not yet credited, preserving source tax, currency and line type; a converted no-charge line remains permanently zero and is not re-invoiced.
- Invoice Manager exposes read-only Booking Info by
BillingId; Booking IDs link to billing and can hand off to Booking Manager with the billing filter applied. - Preview Billing Difference, invoice-setting preview and confirm share the billing calculation core; preview does not persist and confirm commits atomically.
- Subscription Billing does not read or add Enrichment
TermBookingLineamounts toEnrollmentBillingSchedule,SubscriptionTermBillingSchedule, or Subscription invoice lines. Booking reconciliation is the only charge path for an Enrichment occurrence.
Real-world example: A closure-day line totals $120, but $80 was invoiced and $20 credited. → Credit only $60 more, not $120; the resulting line stays zero after conversion.