OpeningState
ResponseWhere the books start: account balances, open invoices, prepayments and the asset register at one date. One document, replaced as a whole and checked as a whole: debits equal credits, and open invoices, prepayments and assets tie to their accounts, in the book currency (an invoice or an advance in another currency at its book value); a credit note is never an open item (it is netted into the balances).
Returned in responses. Its enums are open: tolerate values not listed here, which later versions may add.
Attributes
7The balances date: every balance is as of the end of this day, and the books continue from the next. The same date as the organization's opening_date. Null while no opening state is set.
Account balances; debits equal credits. Accounts left out start at zero.
6 attributes of each item
The currency (ISO 4217) the account is kept in, its currency marker. Only on an account that has one, and then only that currency (FX_ACCOUNT_CURRENCY_MISMATCH); on any other account omitted, null or the book currency. Read back as the marker, null on an account without one.
On an account with a currency marker, its balance in that currency, signed as the debit balance (positive for a debit, negative for a credit, the side debit or credit is on).
Details
Required there whenever debit or credit is not 0 (FX_ACCOUNT_CURRENCY_MISMATCH), so the account's balance in its currency starts from the opening and not from zero. With debit and credit both 0, the book figure is worked out as foreign_amount at exchange_rate, rounded to the cent (5 000,00 USD at 1,1750 is a debit of 4 255,32). A balance of 0 has a book figure of 0 (EXCHANGE_RATE_OVERRIDE_INVALID). Refused on an account without a marker (FX_ACCOUNT_CURRENCY_MISMATCH). Read back as stored; with as_of, the account's balance in its currency on that day. Null on an account without a marker.
The rate the balance is held at, in ExchangeRate's direction (only on an account with a currency marker). Omitted or null: with a book figure stated in debit or credit, the rate the two amounts imply; without one, the ECB rate of the balances date (the opening state's date: cash and other monetary items are carried at the closing rate), the newest rate at or before it, at most 7 days back (EXCHANGE_RATE_MISSING when the bank has none).
Details
1 is refused (OPENING_STATE_FOREIGN_RATE_OF_ONE). Read back as stored; null with as_of and on an account without a marker or with a balance of 0.
Receivables and payables still open at the date, which add up to the receivable and payable account balances.
11 attributes of each item
A receivable (sales invoice) or a payable (purchase invoice).
Known values (open: expect new ones) sales_invoice, purchase_invoice
Currency (ISO 4217): the book currency or another currency the company has activated (CURRENCY_NOT_ACTIVE). What is still open of a foreign invoice ties to the receivable or payable balance in the book currency, at its rate: the ECB rate of the balances date (EXCHANGE_RATE_MISSING when the bank has none), or the rate sent as exchange_rate.
Your own id for the invoice, unique among the organization's sales (or purchase) invoices; the created invoice carries it.
The rate the invoice was booked at in the source system, in ExchangeRate's direction; what is still open of it ties to the receivable or payable balance at this rate.
Details
Omitted or null: the ECB rate of the balances date (the opening state's date, the end of that day: the previous year-end closing rate, RTJ 1 p 94), the newest rate at or before it, at most 7 days back; never the invoice's own date nor the day before the balances date. On an invoice in the book currency only 1 is accepted (EXCHANGE_RATE_OVERRIDE_INVALID); on a foreign invoice 1 is refused (OPENING_STATE_FOREIGN_RATE_OF_ONE: it would book the amounts unconverted). Read back as the invoice's stored rate, 1 in the book currency, null on a foreign invoice that has none yet.
What is still open of it in the book currency, the figure that ties to the receivable or payable balance. Omitted or null: total less amount_paid, each converted at exchange_rate.
Details
Stated on an invoice in another currency: the source books' own figure, stored as it is, so later payments release exactly it (a cut-over of books where each payment released its own part can be a cent away from converting the open amount once). On an invoice in the book currency only total less amount_paid is accepted (EXCHANGE_RATE_OVERRIDE_INVALID); negative is refused (OPENING_STATE_NEGATIVE_AMOUNT). Read back as stored; with as_of, what the ledger holds open on that day (the book total less what each payment and credit note released), so the document ties to the cent. Null on an invoice in another currency that has no rate yet.
Advances held at the date, which add up, per account, to that account's balance (received ones on the credit side, paid ones on the debit side).
9 attributes of each item
Received from a customer, or paid to a supplier.
Known values (open: expect new ones) received, paid
The amount still held at the opening date, in currency; greater than zero.
The account that holds it (received advances, paid advances); not the receivable or payable account.
Currency (ISO 4217) of amount: the book currency or another currency the company has activated (CURRENCY_NOT_ACTIVE). Omitted: the book currency.
The rate the advance is held at, in ExchangeRate's direction. Omitted or null: the ECB rate of the advance's own date, the day it was paid (it is never revalued, so the source books hold it at that day's euros), the newest rate at or before it, at most 7 days back (EXCHANGE_RATE_MISSING when the bank has none).
Details
On an advance in the book currency only 1 is accepted (EXCHANGE_RATE_OVERRIDE_INVALID); on one in another currency 1 is refused (OPENING_STATE_FOREIGN_RATE_OF_ONE). Read back as stored, 1 in the book currency.
What it is held at in the book currency, the figure that ties to its account's balance. Omitted or null: amount at exchange_rate. Stated on an advance in another currency: the source books' own figure, stored as it is (an advance part used before the cut-over holds the book value its uses left, not its remaining amount at the rate); greater than zero (OPENING_STATE_PREPAYMENT_INVALID).
Details
On an advance in the book currency only amount is accepted (EXCHANGE_RATE_OVERRIDE_INVALID). Read back as stored; with as_of, what the ledger holds of it on that day. Null on an advance in another currency that has no book value yet.
The asset register, which adds up to the asset and accumulated-depreciation account balances.
15 attributes of each item
The fixed-asset group; it supplies the depreciation and expense accounts.
Depreciation method. none is never depreciated (land). New values may be added: treat a value you do not know as valid, not as an error.
Known values (open: expect new ones) straight_line, declining_balance, none
Yearly rate in percent for declining_balance, e.g. 40.
Depreciation charged before the opening date.
The last day the brought-forward depreciation covers (the months after it are charged by the runs here); null for an asset that is not depreciated or whose depreciation starts after the opening date.
Dimension values on its depreciation postings.
When the opening state was last replaced; null when never, and with as_of.
The sections this token's scopes do not reach, answered empty: open_invoices (invoices:read and contacts:read), prepayments (payments:read and contacts:read), fixed_assets (assets:read).
Known values (open: expect new ones) open_invoices, prepayments, fixed_assets