Debian Codegraph @

Hledger/Cli/Commands/Aregister.txt

raw
1 aregister
2
3 (areg)
4
5 Show the transactions and running balances in one account, with each
6 transaction on one line.
7
8 Flags:
9 --txn-dates filter strictly by transaction date, not posting
10 date. Warning: this can show a wrong running
11 balance.
12 --no-elide don't show only 2 commodities per amount
13 --cumulative accumulation mode: show running total from report
14 start date
15 -H --historical accumulation mode: show historical running
16 total/balance (includes postings before report
17 start date) (default)
18 --invert display all amounts with reversed sign
19 --drop=N omit N leading account name parts
20 --heading=YN show heading row above table: yes (default) or no
21 -w --width=N set output width (default: terminal width). -wN,M
22 sets description width as well.
23 --align-all guarantee alignment across all lines (slower)
24 -O --output-format=FMT select the output format. Supported formats:
25 txt, html, csv, tsv, json.
26 -o --output-file=FILE write output to FILE. A file extension matching
27 one of the above formats selects that format.
28
29 aregister shows the overall transactions affecting a particular account
30 (and any subaccounts). Each report line represents one transaction in
31 this account. Transactions before the report start date are included in
32 the running balance (--historical mode is the default). You can suppress
33 this behaviour using the --cumulative option.
34
35 This is a more "real world", bank-like view than the register command
36 (which shows individual postings, possibly from multiple accounts, not
37 necessarily in historical mode). As a quick rule of thumb:
38
39 - aregister is best when reconciling real-world asset/liability accounts
40 - register is best when reviewing individual revenues/expenses.
41
42 Note this command's non-standard, and required, first argument; it
43 specifies the account whose register will be shown. You can write the
44 account's name, or (to save typing) a case-insensitive infix regular
45 expression matching the name, which selects the alphabetically first
46 matched account. (For example, if you have assets:personal checking and
47 assets:business checking, hledger areg checking would select
48 assets:business checking.)
49
50 Transactions involving subaccounts of this account will also be shown.
51 aregister ignores depth limits, so its final total will always match a
52 historical balance report with similar arguments.
53
54 Any additional arguments are standard query arguments, which will limit
55 the transactions shown. Note some queries will disturb the running
56 balance, causing it to be different from the account's real-world
57 running balance.
58
59 An example: this shows the transactions and historical running balance
60 during july, in the first account whose name contains "checking":
61
62 $ hledger areg checking date:jul
63
64 Each aregister line item shows:
65
66 - the transaction's date (or the relevant posting's date if different,
67 see below)
68 - the names of all the other account(s) involved in this transaction
69 (probably abbreviated)
70 - the total change to this account's balance from this transaction
71 - the account's historical running balance after this transaction.
72
73 Transactions making a net change of zero are not shown by default; add
74 the -E/--empty flag to show them.
75
76 For performance reasons, column widths are chosen based on the first
77 1000 lines; this means unusually wide values in later lines can cause
78 visual discontinuities as column widths are adjusted. If you want to
79 ensure perfect alignment, at the cost of more time and memory, use the
80 --align-all flag.
81
82 By default, aregister shows a heading above the data. However, when
83 reporting in a language different from English, it is easier to omit
84 this heading and prepend your own one. For this purpose, use the
85 --heading=no option.
86
87 This command also supports the output destination and output format
88 options. The output formats supported are txt, csv, tsv (Added in 1.32),
89 html, fods (Added in 1.41) and json.
90
91 aregister and posting dates
92
93 aregister always shows one line (and date and amount) per transaction.
94 But sometimes transactions have postings with different dates. Also, not
95 all of a transaction's postings may be within the report period. To
96 resolve this, aregister shows the earliest of the transaction's date and
97 posting dates that is in-period, and the sum of the in-period postings.
98 In other words it will show a combined line item with just the earliest
99 date, and the running balance will (temporarily, until the transaction's
100 last posting) be inaccurate. Use register -H if you need to see the
101 individual postings.
102
103 There is also a --txn-dates flag, which filters strictly by transaction
104 date, ignoring posting dates. This too can cause an inaccurate running
105 balance.