Proposal: financial statement definitions over the balance ledger - #52
Merged
Conversation
A balance report describes the numbers a statutory statement reads from, but not the statement: its output is one row per dimension value, so the whole account-to-line mapping - and the arithmetic between lines - falls outside the format. Proposes `kind: statement`: an `account` field the lines select on, and a `lines` list whose entries are either a selector plus a measure or arithmetic over other lines' codes. The observable rule worth stating normatively is the Net measures': an account's two sides are netted BEFORE a line sums it, which is what lets one account appear in both the asset and the liability section and land in whichever its balance puts it. Refs eclipse-dirigible/dirigible#6909.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
proposals/0021-financial-statement-definitions.md. Proposal-first, per CONTRIBUTING — the version document is untouched.The gap
A balance report describes opening / period / closing debit and credit totals over a signed ledger, per dimension, between two runtime dates. A statutory statement — a balance sheet, an income statement — is a fixed line structure over the same ledger, where each line is a formula over the chart of accounts and some lines are arithmetic over other lines.
Those are different shapes, and the whole mapping between them falls outside the format today: an account-level balance is the raw material, and turning it into a balance sheet happens in a hand-written query or a spreadsheet. It is the last ledger report family with nothing in the format behind it, and the one most clearly a declaration rather than code — a jurisdiction change or a chart extension is a mapping edit.
The shape
What the proposal states normatively
The rule that carries the most weight is the
Netmeasures': an account's two sides are netted before a line sums it, and only what remains on the named side is kept. That is observable, not an implementation detail — it is what lets one settlement account appear in both the asset and the liability section of a statement and contribute to whichever one its actual balance puts it on. Netting after the sum would report gross turnover, which is a different figure and is what the four plain measures are for.Alongside it: the rows are the declared lines in the authored order (statutory codes do not sort into their own structure), an empty line renders as zero rather than disappearing, and a range selector compares equally long code prefixes (
60-69takes601and6999; comparing whole codes would drop both).Boundary
The statement's numbers are the format's contribution. The legally mandated print layout stays a hand-authored print template — the same boundary between model and document designer the format already draws.
Left open deliberately
Whether a statement's lines should additionally be maintainable as seeded, tenant-editable data is a genuine second question, and the proposal says so rather than deciding it: the authored form is what makes a statement reviewable and versioned with the model, and a tenant-editable variant can be layered over the same semantics later.
Implementation
Eclipse Dirigible: eclipse-dirigible/dirigible#6912 (issue eclipse-dirigible/dirigible#6909). The emitted query is exercised against a real ledger on both of that project's CI databases.