The equity:conversion account, and its variations equity:trade(s) and equity:trading, normally detected as V/Conversion type, now become ordinary E/Equity accounts if some other account is declared as V/Conversion type. This is motivated by the next commit, in which `check accounts` will stop warning about conversion accounts and their subaccounts, which means all of the above names and their subaccounts would remain always exempt from strict account checking. Now, if the user declares their own conversion account, those default accounts will become controllable by account checking again. Which at least reduces the allowlist a bit. Hopefully this won't cause hassles.
95 lines
1.7 KiB
Plaintext
95 lines
1.7 KiB
Plaintext
# * accounts command
|
|
|
|
# ** 1. basic accounts report
|
|
<
|
|
account a
|
|
|
|
2018/1/1 ; foo:
|
|
(a:aa) 1
|
|
|
|
$ hledger -f - accounts
|
|
a
|
|
a:aa
|
|
|
|
# ** 2. tree mode
|
|
$ hledger -f - accounts --tree
|
|
a
|
|
aa
|
|
|
|
# ** 3. drop in flat mode
|
|
$ hledger -f - accounts --flat --drop 1
|
|
...
|
|
aa
|
|
|
|
# ** 4. drop in tree mode
|
|
$ hledger -f - accounts --tree --drop 1
|
|
...
|
|
aa
|
|
|
|
# ** 5. filtering transactions by tag
|
|
$ hledger -f - accounts tag:foo
|
|
a:aa
|
|
|
|
# ** 6. Show account types.
|
|
<
|
|
account asset
|
|
2022-01-01
|
|
(unknown) 1
|
|
|
|
$ hledger -f - accounts --types
|
|
asset ; type: A
|
|
unknown ; type:
|
|
|
|
# ** 7. equity:conversion, and several other names, are detected as V/Conversion type by default.
|
|
<
|
|
account equity:conversion
|
|
account equity:trade
|
|
account equity:trades
|
|
account equity:trading
|
|
$ hledger -f- accounts --types
|
|
equity:conversion ; type: V
|
|
equity:trade ; type: V
|
|
equity:trades ; type: V
|
|
equity:trading ; type: V
|
|
|
|
# ** 8. If any other account name is declared with V type, those default names become just ordinary equity accounts.
|
|
<
|
|
account trade ; type: V
|
|
account equity:conversion
|
|
account equity:trade
|
|
account equity:trades
|
|
account equity:trading
|
|
$ hledger -f- accounts --types
|
|
trade ; type: V
|
|
equity:conversion ; type: E
|
|
equity:trade ; type: E
|
|
equity:trades ; type: E
|
|
equity:trading ; type: E
|
|
|
|
# ** 9. --infer-equity uses equity:conversion as its base account by default.
|
|
<
|
|
2024-01-01
|
|
a 1A
|
|
b -1B
|
|
|
|
$ hledger -f- accounts --infer-equity
|
|
a
|
|
b
|
|
equity:conversion:A-B:A
|
|
equity:conversion:A-B:B
|
|
|
|
# ** 10. With a custom conversion account declared, --infer-equity uses that instead.
|
|
<
|
|
account trade ; type:V
|
|
|
|
2024-01-01
|
|
a 1A
|
|
b -1B
|
|
|
|
$ hledger -f- accounts --infer-equity
|
|
trade
|
|
trade:A-B:A
|
|
trade:A-B:B
|
|
a
|
|
b
|