Core Concepts

This is an overview of the concepts used in the Ledger system.

Debits and Credits

These terms can be counterintuitive because they use the shareholder's or business owner's frame of reference. A debit is something owed to the shareholders, a credit is something that reduces what is owed, in effect reducing the value of the business to the shareholders.

Accounting systems categorize each account with a balance as either a debit or credit account. For example, cash in the bank is money that belongs to shareholders, so that is classified as a debit account; Office expenses represent funds spent to operate the business, so this is classified as a credit account.

Double Entry Accounting

Abivia Ledger implements a double entry accounting system. This means that for every transaction, debits and credits must be in balance. If the business purchases a box of paper for $100 with cash (a debit account), then the account representing cash decreases by $100 and the account representing office expenses (a credit account) increases by $100.

Double-entry systems are the only way to maintain an accurate representation of the financial state of a business. Many single entry systems can generate revenue or expenses without a balancing transaction and this makes errors extremely hard to identify.


A currency is a unit of value. Abivia Ledger supports arbitrary currencies, each identified by a unique code and number of decimal places to track (for example: USD, 2 or BTC, 8). The ledger uses fixed precision math so that there is no loss to rounding errors.

In the Ledger, currencies are maintained in separate accounts. There is no provision for converting between currencies.


The ledger is a record of Accounts and the amounts associated with those Accounts. Accounts can be organized in a tree hierarchy. For example the "revenue" Account might have sub-accounts for "sales" and "investment income", the sales Account might have sub-accounts for each product line or sales channel (retail, online, etc.)


An Account is a repository for balances. Accounts can have one balance for each Domain and Currency. Accounts can be category Accounts that do not have balances but instead serve for reporting purposes. Non-category Accounts can be either debit or credit Accounts, also for reporting purposes. Each account balance is either a debit (positive), credit (negative), or zero.

Each Account has a unique identifier and an associated name. Most accounting systems assign identifiers that reflect their position in the hierarchy, so that Account 1100 is known to be a subaccount for account 1000.

Starting with version 1.2, accounts now have an associated tax code. Tax codes represent a standardized numbering system required by tax authorities.

Chart of Accounts

The overall structure of Accounts is called the Chart of Accounts. A chart can take several forms, depending on the needs of the business. While there is a common overall structure shared by almost all charts, the details are highly specific to the business. Abivia Ledger supports chart templates to facilitate the easy creation of skeleton charts that can then be customized to fit the application. Contributions of new templates are welcome.


Domains are separate partitions in the ledger, and the ledger must contain at least one. Any organizational unit that maintains its own books is considered to be a Domain. Example domains are departments, divisions, business units, subsidiaries. Transactions are always confined to a single Domain. By default, a new ledger that does not define a default Domain will be provided with the "MAIN" Domain. Requests that don't include a Domain are assumed to be in the default domain.


A journal is a record of transactions that have been applied to the ledger. By default, there is a single General Journal that records all transactions. Journal transactions are confined to a single domain and single currency. Transactions have a single source Account and one or more target Accounts. If the source amount is a debit, then the total of amounts in the target credit account(s) must equal the debit amount. If the source amount is a credit, then the total of amounts in the target debit account(s) must equal the credit amount.


In some cases there is a need to separate journal transactions by type. For example, local legislation may require all sales transactions to be recorded separately. Sub-journals provide this capability. Any journal transaction can identify the sub-journal that the transaction should be recorded into.

Audit Trail

An audit trail is a record of all operations that result in a material change to the contents of the Ledger. Abivia Ledger uses Laravel's logging system for this purpose. If the application needs to maintain a separate audit trail, create a new channel and then set LEDGER_LOG_CHANNEL in the environment to the name of the channel.