Financial Statements Views
Financial Statement Views Specification
High Level Overview of functionality
These views basically inspect the accounting blockchain storage and display in a meaningful "accountancy" way.
The idea here is to make this as flexible as possible and some read optimisations will need to be built-in to ensure that the display is always up-to-date (or as frequently as is practical).
The initial views fall into three categories:
-
Balance Sheet
-
Profit & Loss
-
Control Accounts
All will follow the same layout and proceedures for acquiring and displaying the data.
The two primary financial statement views are:
Balance Sheet consisting of
-
Assets
-
Liabilities
-
Equity
Profit and Loss consisting of
-
Revenue
-
Expenses
Various levels will be hidden in the default display, but will employ Accordion functionality to open (also known as "drill down") into the details.
The hierarchy is the same for all accounts, and it can be found in the Chart Of Accounts in the couchDB.
Every posting to an account at its most granular level is accompanied by a unique posting index. For the purposes of this issue, we should be able to drill down to that level, although how the UI handles this is open to discussion.
The levels are:
- Financial Statement Type drills down to Account Category
- Account Category drills down to Account Category Group
- Account Category Group drills down to Accounting Group
At this point there should be enough general detail and the associated values can be derived from one storage location: balanceByLedger
with a key of the Identity
and the Accounting Group
number (also known as the account number
for short). Again refer to the chart of accounts to see these values
However we can go further, and it might be better to navigate or display another window... TBD
- Accounting Group drills down to Accounting SubGroup
- Accounting SubGroup drills down to Accounting Entry Details
The Accounting Entry Details is the most granular of the accounting entries stored in the accounting module, however because these entries contain a reference hash it is possible to link to the original document from which this entry came, for example it might be an order hash or invoice or timekeeping hash. These details are found in the blockchain storage postingDetail
with the keys Identity
and the Accounting Group
and Posting Id
UI helpers
In order to get the Posting Ids and Account Numbers that are used by the Identity, there are a couple of storage helpers:
-
AccountsById
with key ofIdentity
returns the list ofAccounts Numbers
that have been posted to. -
IdAccountPostingIdList
with a key ofIdentity
andAccounts Numbers
that returns a list of posting keys
The following shows an example of an expanding view (it is not exhaustive). It should be noted that the "Reporting Currency" if for display purposes only and is taken from the user's own settings. On this point ALL the values stored on the blockchain are in fact in XTX, and therefore need to be converted using the exchange rate mechanism used elsewhere.