;doc: journal: rewrite Account names, mention brackets/parentheses (#1915)
This commit is contained in:
parent
4ada2a3fbc
commit
6d5f37d438
@ -1129,15 +1129,47 @@ But if you accidentally leave only one space (or tab) before the amount, the amo
|
|||||||
|
|
||||||
## Account names
|
## Account names
|
||||||
|
|
||||||
Account names typically have several parts separated by a full colon, from
|
Accounts are the main way of categorising things in hledger.
|
||||||
which hledger derives a hierarchical chart of accounts. They can be
|
As in Double Entry Bookkeeping, they can represent real world accounts (such as a bank account),
|
||||||
anything you like, but in finance there are traditionally five top-level
|
or more abstract categories such as "money borrowed from Frank" or "money spent on electricity".
|
||||||
accounts: `assets`, `liabilities`, `revenue`, `expenses`, and `equity`.
|
|
||||||
|
|
||||||
Account names may contain single spaces, eg: `assets:accounts receivable`.
|
You can use any account names you like, but we usually start with the traditional accounting categories,
|
||||||
Because of this, they must always be followed by **two or more spaces** (or newline).
|
which in english are `assets`, `liabilities`, `equity`, `revenues`, `expenses`.
|
||||||
|
(You might see these referred to as A, L, E, R, X for short.)
|
||||||
|
|
||||||
Account names can be [aliased](#account-aliases).
|
For more precise reporting, we usually divide the top level accounts into more detailed subaccounts,
|
||||||
|
by writing a full colon between account name parts.
|
||||||
|
For example, from the account names `assets:bank:checking` and `expenses:food`,
|
||||||
|
hledger will infer this hierarchy of five accounts:
|
||||||
|
```
|
||||||
|
assets
|
||||||
|
assets:bank
|
||||||
|
assets:bank:checking
|
||||||
|
expenses
|
||||||
|
expenses:food
|
||||||
|
```
|
||||||
|
Shown as an outline, the hierarchical tree structure is more clear:
|
||||||
|
```
|
||||||
|
assets
|
||||||
|
bank
|
||||||
|
checking
|
||||||
|
expenses
|
||||||
|
food
|
||||||
|
```
|
||||||
|
|
||||||
|
hledger reports can summarise the account tree to any depth,
|
||||||
|
so you can go as deep as you like with subcategories,
|
||||||
|
but keeping your account names relatively simple may be best when starting out.
|
||||||
|
|
||||||
|
Account names may be capitalised or not; they may contain letters, numbers, symbols, or single spaces.
|
||||||
|
Note, when an account name and an amount are written on the same line,
|
||||||
|
they must be separated by **two or more spaces** (or tabs).
|
||||||
|
|
||||||
|
Parentheses or brackets enclosing the full account name indicate [virtual postings](#virtual-postings),
|
||||||
|
described below.
|
||||||
|
Parentheses or brackets internal to the account name have no special meaning.
|
||||||
|
|
||||||
|
Account names can be altered temporarily or permanently by [account aliases](#account-aliases).
|
||||||
|
|
||||||
## Amounts
|
## Amounts
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user