ReportDefinition
ResponseA report layout: lines in a tree, each summing the accounts placed on it, folding its children, or computing a formula over other lines. Built-in statutory layouts are listed too and cannot be changed; start one of your own from a copy with based_on.
Returned in responses. Its enums are open: tolerate values not listed here, which later versions may add.
Attributes
10What kind of statement it is, as a label (balance_sheet, income_statement, cash_flow, or any text). basis decides how it is computed.
How it is computed: as_of balances at a date, flow movement over a range, account_matrix the trial balance (its lines come from the chart of accounts). Null: the layout cannot be run. New values may be added: treat a value you do not know as valid, not as an error.
Known values (open: expect new ones) as_of, flow, account_matrix
A built-in layout, shared by every organization; it cannot be changed or deleted.
The lines in display order, each parent before its children. Always on getReportDefinition; in lists only with expand=lines.
10 attributes of each item
The line's id; send it back to keep the line and its account placements.
Show the amount with the opposite sign to how the ledger nets it (debit positive), e.g. revenue as positive.
How the values are shown: money, a plain ratio or a percentage. ratio and percent need a formula, except on a subtotal grouping. New values may be added: treat a value you do not know as valid, not as an error.
Known values (open: expect new ones) currency, ratio, percent
For a computed line: other lines' codes with numbers, + - * / and parentheses. A formula line has no children.
Set by the app, never by a client: the line the statement puts this year's profit (current_year_earnings) or earlier years' unclosed result (retained_earnings) on, or where tax owed and tax prepaid swap by sign (tax_debts, tax_prepayments).
Known values (open: expect new ones) current_year_earnings, retained_earnings, tax_debts, tax_prepayments
Details
A line with a role cannot be removed (409 REPORT_DEFINITION_ROLE_LINE). New values may be added: treat a value you do not know as valid, not as an error.