Skip to main content

Subledger Accounting Data Model

The subledger accounting data model has two layers: configuration entities that define how accounting works, and transactional entities that record what actually happened.

Configuration entities​

Event classes​

An event class defines a type of accounting event the system can raise. Each event class has a unique code and is scoped to an application — either AR (Accounts Receivable) or AP (Accounts Payable).

The system seeds eight event classes:

CodeApplicationPurpose
AR_INVOICEARCustomer invoice or debit memo completed
AR_CREDIT_MEMOARCustomer credit memo completed
AR_RECEIPTARCash receipt created
AR_RECEIPT_APPLICATIONARReceipt applied to a transaction
AR_RECEIPT_REVERSALARReceipt reversed
AP_INVOICEAPSupplier invoice validated
AP_PAYMENTAPPayment applied to a supplier invoice
AP_PAYMENT_VOIDAPSupplier payment voided

Line types​

A line type defines a category of debit or credit line that appears in a subledger journal entry. Each line type has a fixed side — DR (debit) or CR (credit).

CodeNameSide
RECEIVABLEReceivableDR
REVENUERevenueCR
TAX_LIABILITYTax LiabilityCR
TAX_RECOVERABLETax RecoverableDR
CASHCashDR
UNAPPLIEDUnapplied CashDR
PAYABLEPayableCR
EXPENSEExpenseDR
REALISED_GAINRealised FX GainCR
REALISED_LOSSRealised FX LossDR

Accounting methods​

An accounting method groups a set of derivation rules into a named configuration. The system seeds a single method: STANDARD (Standard Accrual). The accounting method is assigned to a ledger, so all events processed against that ledger use its rules.

Account derivation rules​

A derivation rule tells the system where to look for the GL account for a given line type. Each rule specifies a source (e.g. CUSTOMER_SITE, ITEM, LEDGER_DEFAULT) and a priority. When deriving an account, the system walks rules from highest to lowest priority and returns the first match.

See Account Derivation for the full rule set and resolution logic.

Source accounts​

A source account maps a specific source entity (a customer site, supplier site, inventory item, tax rate, bank account, or ledger) to a GL code combination for a given line type. These are the lookup records that derivation rules search against.

Transactional entities​

Accounting events​

An accounting event records that something happened in AR or AP that requires accounting. Events are raised automatically by database triggers and start in UNPROCESSED status. Each event references the source header (AR transaction or AP transaction), the ledger, the accounting date, and the entered currency.

See Accounting Events for trigger details and the event lifecycle.

Journal entries​

A subledger journal entry is the accounting record created from a processed event. Each entry belongs to a ledger and period, and contains one or more journal lines. Entries progress through three statuses: DRAFT → FINAL → TRANSFERRED.

Journal lines​

Journal lines are the individual debit and credit rows within a journal entry. Each line records:

  • The line type (e.g. RECEIVABLE, REVENUE)
  • The GL code combination (resolved by the derivation engine)
  • Entered amounts in the transaction currency
  • Accounted amounts in the ledger's functional currency
  • The conversion rate used

Every journal entry must balance — total accounted debits must equal total accounted credits.

Entity relationships​

Further reading​