;doc:journal:transaction balancing, commodity directive: simplify
This commit is contained in:
parent
babaf70932
commit
67f027de33
@ -1527,7 +1527,7 @@ which are difficult or inconvenient to handle on a computer.
|
|||||||
So to be a practical accounting system, hledger allows some imprecision when checking transaction balancedness.
|
So to be a practical accounting system, hledger allows some imprecision when checking transaction balancedness.
|
||||||
The question is, how much imprecision should be allowed ?
|
The question is, how much imprecision should be allowed ?
|
||||||
|
|
||||||
hledger currently decides it based on the [commodity display styles](#commodity-display-style)(\*):
|
hledger currently decides it based on the [commodity display styles](#commodity-display-style):
|
||||||
if the postings' sum would appear to be zero when displayed with the standard display precisions, the transaction is considered balanced.
|
if the postings' sum would appear to be zero when displayed with the standard display precisions, the transaction is considered balanced.
|
||||||
|
|
||||||
Or equivalently: if the journal entry is displayed with amounts rounded to the
|
Or equivalently: if the journal entry is displayed with amounts rounded to the
|
||||||
@ -1543,11 +1543,8 @@ you might need to fix some of your journal entries (ie, add decimal digits to ma
|
|||||||
Other PTA tools (Ledger, Beancount..) have their own ways of doing it.
|
Other PTA tools (Ledger, Beancount..) have their own ways of doing it.
|
||||||
Possible improvements are discussed at [#1964](https://github.com/simonmichael/hledger/issues/1964).
|
Possible improvements are discussed at [#1964](https://github.com/simonmichael/hledger/issues/1964).
|
||||||
|
|
||||||
(\*) (If you have multiple journal files, watch out for this snag:
|
Note: if you have multiple journal files, and are relying on commodity directives to make imprecise journal entries balance,
|
||||||
`commodity` directives should be placed where they influence all files, eg in a topmost parent file.
|
the directives' placement might be important - see [`commodity` directive](#commodity-directive).
|
||||||
Related:
|
|
||||||
[`commodity` directive](#commodity-directive),
|
|
||||||
[#2135](https://github.com/simonmichael/hledger/issues/2135))
|
|
||||||
|
|
||||||
## Tags
|
## Tags
|
||||||
|
|
||||||
@ -2117,9 +2114,8 @@ Declaring commodities solves several common parsing/display problems, so we reco
|
|||||||
Note that effects 3 and 4 above end at the end of the directive's file,
|
Note that effects 3 and 4 above end at the end of the directive's file,
|
||||||
and will not affect sibling or parent files.
|
and will not affect sibling or parent files.
|
||||||
So if you are relying on them (especially 4) and using multiple files,
|
So if you are relying on them (especially 4) and using multiple files,
|
||||||
consider placing your commodity directives in a top-level parent file,
|
placing your commodity directives in a top-level parent file might be important.
|
||||||
where they can influence all the included files.
|
Or, keep your decimal marks unambiguous and your entries well balanced and precise.
|
||||||
(Though I keep mine in a `YYYY-commodities` child file without trouble.)
|
|
||||||
|
|
||||||
(Related: [#793](https://github.com/simonmichael/hledger/issues/793))
|
(Related: [#793](https://github.com/simonmichael/hledger/issues/793))
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user