From c50de03fd05a15577643c8e07b8b071caac1c4d4 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 3 Oct 2024 05:39:14 -1000 Subject: [PATCH] ;doc: note --infer-equity requires account declarations for `check accounts` As reported on mail list. --- hledger/hledger.m4.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hledger/hledger.m4.md b/hledger/hledger.m4.md index 750b0dcc0..a2199dd2a 100644 --- a/hledger/hledger.m4.md +++ b/hledger/hledger.m4.md @@ -1886,12 +1886,15 @@ This is convenient, but it means hledger can't warn you when you mis-spell an ac Usually you'll find that error later, as an extra account in balance reports, or an incorrect balance when reconciling. -In [strict mode], enabled with the `-s`/`--strict` flag, hledger will report an error if any transaction uses an account name that has not been declared by an [account directive](#account). Some notes: +In [strict mode], enabled with the `-s`/`--strict` flag, or when you run `hledger check accounts`, +hledger will report an error if any transaction uses an account name that has not been declared by an [account directive](#account). +Some notes: - The declaration is case-sensitive; transactions must use the correct account name capitalisation. - The account directive's scope is "whole file and below" (see [directives](#directives)). This means it affects all of the current file, and any files it includes, but not parent or sibling files. The position of account directives within the file does not matter, though it's usual to put them at the top. - Accounts can only be declared in `journal` files, but will affect [included](#include-directive) files of all types. - It's currently not possible to declare "all possible subaccounts" with a wildcard; every account posted to must be declared. +- If you use the [--infer-equity](#inferring-equity-conversion-postings) flag, you will also need declarations for the account names it generates. ### Account display order @@ -5628,6 +5631,8 @@ The equity account names will be "equity:conversion:A-B:A" and "equity:conversio where A is the alphabetically first commodity symbol. You can customise the "equity:conversion" part by declaring an account with the `V`/`Conversion` [account type](#account-types). +Note you will need to add [account declarations](#account-error-checking) for these to your journal, if you use `check accounts` or `check --strict`. + ## Combining costs and equity conversion postings Finally, you can use both the @/@@ cost notation and equity postings at the same time.