Chart of accounts
:::info Status Outline — expand with a full worked example (e.g. adding a new account, a new subconto type, and posting from a new document). :::
:::tip Use the shipped skills
Prefer post-to-accounting (in your scaffolded repo's .claude/skills/) to wire a document's
OnSubmitAsync to post, declare a new account, or add a new subconto-postable entity. Adding
account/subconto picker fields to a Dto (for manual-posting documents or report filters,
when the account is a runtime user choice rather than fixed in code) is a separate skill,
add-account-subconto-field.
:::
The chart-of-accounts / posting subsystem (Kandra.Persistence/Accounting, Acc_ tables) is
Kandra's double-entry-style accounting engine. It's deliberately independent from the
register engine — see
Reference: Chart of Accounts / Posting for why, and don't
try to unify the two.
Posting from a document
Only from OnSubmitAsync, via ISubmitScope, same chokepoint as register writers:
IPostingService is a keyed DI service, not constructor-injectable.
Subconto (dimension slots)
ISubconto implementors are narrow by design — Item, Warehouse, Counterparty,
Waybill, GoodsReceipt in the reference configuration. Grep , ISubconto directly rather
than trusting a general description of "everything postable" — the actual list is short and
worth re-checking against source before you assume a type participates.
Build an account-with-subconto reference with the fluent builder:
var accountRef = chart.AsOf(accountCode).With(subcontoValue1, subcontoValue2).Build();
SubcontoSlot is the EntityRef stored in ISubcontoSet.Values — there's no separate
IRootEntity wrapper instance to construct.
Viewing posted transactions
The account transactions viewer is a 5th "View" tab, generic across every posting-capable
document, built from a 3-service split (reader/resolver/orchestrator) — no new generator
project was needed since PostingTransactionRecord is one universal row shape.
Manual posting
AccountTransaction is a standalone document for hand-entered postings not tied to a
business document (opening balances, adjustments).
See also
- Reference: Chart of Accounts / Posting
- Platform doc:
docs/chart-of-accounts-posting-subsystem.md