Crate pallet_accounting
source · [−]Expand description
The main Totem Global Accounting Ledger
It handles all the ledger postings. The account number follows the chart of accounts definitions and is constructed as a concatenation of:
- Financial Statement Type Number int length 1 (Mainly Balance Sheet, Profit and Loss, and Memorandum)
- Account Category Number int length 1 (Mainly Assets, liabilities, Equity, Revenue and Expense, and non-balance sheet)
- Account Category Group number int length 1 (e.g. grouping expenses: operating expense, other opex, personnel costs)
- Accounting Group Nr concatenation of int length 4 + int length 4. The first four digits incrementing within the Category Group (e.g. range 1000-1999) for individual Accounting Group values associated with the Category Group Number. The second four digits incrementing within the group (e.g. range 10001000-10001999) for individual Accounting Groups within the group itself.
- The last 4 ints are the Accounting Subgroup Number which specify where the value is posted.
For example 250500120000011 Statement Type: Profit and Loss (2) Account Category: Expenses (5) Account Category Grp: Operating Expenses (0), Accounting Group: Services (50012000), Accounting Subgroup: Technical Assitance (0011)
In other accounting systems there are further values hierarchically below the subgroup (for example if you have multiple bank accounts), but this is not necessary in Totem as this is replaced by the notion of Identity. The key takeaway is that everything in Totem is a property of an Identity
For example in reporting Amount_ou may drill down to the detail in a heirarchical report like this: 110100010000000 Balance Sheet > Assets > Current Assets > Bank Current > CitiCorp Account (Identity) 110100010000000 Balance Sheet > Assets > Current Assets > Bank Current > Bank of America Account (Identity) Here the Ledger Account has a 1:n relationship to the identities, and therefore aggregates results
In fact this is just the rearrangement of the attributes or properties of an individual identity CitiCorp Account (Identity) has properties > Bank Current > Current Assets > Assets > Balance Sheet > 110100010000000 Bank of America Account (Identity) has properties > Bank Current > Current Assets > Assets > Balance Sheet > 110100010000000 Here the Identity has a 1:1 relationship to its properties defined in the account number that is being posted to
Totem Live Accounting Primitives
- All entities operating on the Totem Live Accounting network have XTX as the Functional Currency. This cannot be changed.
- All accounting is carried out on Accrual basis.
- Accounting periods close every block, although entities are free to choose a specific block for longer periods (month/year close is a nominated block number, periods are defined by block number ranges)
- In order to facilitate expense recognistion for example the period in which the transaction is recorded, may not necessrily be the period in which the transaction is recognised) adjustments must specify the period(block number or block range) to which they relate. By default the transaction block number and the period block number are identical on first posting.
Curency Types
The UI provides spot rate for live results for Period close reporting (also known as Reporting Currency or Presentation Currency), which is supported byt the exchange rates module. General rules for Currency conversion at Period Close follow GAAP rules and are carried out as follows:
- Revenue recognition in the period when they occur, and expenses recognised (including asset consumption) in the same period as the revenue to which they relate is recognised.
- All other expenses are recognised in the period in which they occur.
- Therefore the currency conversion for revenue and related expenses is calculated at the spot rate for the period (block) in which they are recognised.
- All other currency conversions are made at the rate for the period close. The UI can therefore present the correct conversions for any given value at any point in time.
Re-exports
pub use __tt_default_parts_6 as tt_default_parts;
Structs
Enums
Contains one variant per dispatchable that can be called by an extrinsic.
Custom dispatch errors of this pallet.
Traits
Configuration trait of this pallet.
Type Definitions
Accounting Balances.
Yay! Totem!
Type alias to Pallet
, to be used by construct_runtime
.
Detail of the accounting posting (for Audit).
Every accounting post gets an index.
Address to book the sales tax to and the tax jurisdiction (Experimental, may be deprecated in future).