diff --git a/hledger-lib/hledger_csv.m4.md b/hledger-lib/hledger_csv.m4.md index 814a768b4..29a69968a 100644 --- a/hledger-lib/hledger_csv.m4.md +++ b/hledger-lib/hledger_csv.m4.md @@ -440,6 +440,7 @@ affects ALL postings. `balanceN` sets a [balance assertion](journal.html#balance-assertions) amount (or if the posting amount is left empty, a [balance assignment](journal.html#balance-assignments)). +You may need to adjust this with the [`balance-type` rule](#balance-type). Finally, `commentN` sets a [comment](journal.html#comments) on the Nth posting. Comments can also contain [tags](journal.html#tags), as usual. @@ -617,6 +618,28 @@ include categorisation.rules ``` +## `balance-type` + +Balance assertions generated by [assigning to balanceN](#posting-field-names) +are of the simple `=` type by default, +which is a [single-commodity](https://hledger.org/journal.html#assertions-and-commodities), +[subaccount-excluding](https://hledger.org/journal.html#assertions-and-subaccounts) assertion. +You may find the subaccount-including variants more useful, +eg if you have created some virtual subaccounts of checking to help with budgeting. +You can select a different type of assertion with the `balance-type` rule: +```rules +# balance assertions will consider all commodities and all subaccounts +balance-type ==* +``` + +Here are the balance assertion types for quick reference: +``` += single commodity, exclude subaccounts +=* single commodity, include subaccounts +== multi commodity, exclude subaccounts +==* multi commodity, include subaccounts +``` + # TIPS ## Rapid feedback