In Ledger CLI's auto-postings, I can use $account
— 5.22.3 in the manual — to refer to the account matched. So a ledger like so
= ^Revenue
Liabilities:Tax 0.05
$account -0.05
2024-07-22 * Business
Revenue -500 CUR
Assets:Bank
Would yield the following output effectively
$ ledger print --generated -f file.ledger
2024/07/22 * Business
Revenue -500 CUR
Assets:Bank 500 CUR
Liabilities:Tax -25 CUR
Revenue 25 CUR
How can I achieve the same thing in HLedger?
The idea here is I want to identify revenues using multiple sub-accounts which would be subject to the same tac rule. For example Revenue:Sales:Customer 1
and Revenue:Sales:Customer 2
should be subject to the same sales tax