Skip to main content

Module accounting

Expand description

Double-entry accounting kernel.

Amounts are signed integer minor units (for example cents). Posting debits and credits must be finite ledger amounts: non-negative, one-sided, and balanced per journal entry.

Structs§

Account
AccountBalance
JournalEntry
Posting
TrialBalance

Enums§

AccountType
AccountingError

Functions§

account_balances_into
Compute balances for every supplied account into caller-owned output.
trial_balance
Aggregate posting totals and account-side trial-balance totals.
validate_balanced_entry
Validate that all postings belonging to entry_id form a balanced entry.
validate_journal_entries
Validate all declared journal entries.
validate_journal_entry
Validate a journal entry’s declared posting slice and balance.