You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NOTE: It's weird that a decimal dot is added on the left but not on the right.
If we now run:
hledger -f opening.journal balance
We get the following error:
hledger: Error: opening.journal:4:53:
| 2024-02-25 opening balances
| assets:aaa $1,000.22 = $1,000.22
| assets:bbb $-1,000.22 = $-1,000.22
4 | assets:ccc $-1,234. = $-1.234
| ^^^^^^^^^
| assets:ddd $1,234. = $1.234
| equity:opening/closing balances $0.00
Balance assertion failed in assets:ccc
In commodity $ at this point, excluding subaccounts, ignoring costs,
the expected balance is: $-1.234
but the calculated balance is: $-1,234
(difference: $1,232.766)
To troubleshoot, check this account's running balance with assertions disabled, eg:
hledger reg -I 'assets:ccc$' cur:'\$'
Yes, putting decimal-mark . into the opening.journal would fix it, but opening.journal is itself produced by hledger and not written by hand, so that's not really in my control (I can of course work around it).
If we assume that the way hledger interprets opening.journal (i.e. treating the comma in 1,234 as a decimal mark — which I think is questionable given that the other entries are all using a dot as decimal mark), then the output of hledger -f example.journal equity --opening is wrong because it does not fulfill hledger's own expectations.
The text was updated successfully, but these errors were encountered:
…lso (simonmichael#2176)
Add a trailing decimal mark when necessary to disambiguate a single
digit group mark in the balance assertion/assignment amount, also.
Version:
hledger 1.32.3, mac-aarch64
Assume we have this journal:
NOTE: There is no ambiguity about the decimal mark here (
hledger -f example.journal balance
looks good).And we then run:
hledger -f example.journal equity --opening > opening.journal
The resulting
opening.journal
looks like this:NOTE: It's weird that a decimal dot is added on the left but not on the right.
If we now run:
We get the following error:
Yes, putting
decimal-mark .
into theopening.journal
would fix it, butopening.journal
is itself produced byhledger
and not written by hand, so that's not really in my control (I can of course work around it).If we assume that the way
hledger
interpretsopening.journal
(i.e. treating the comma in1,234
as a decimal mark — which I think is questionable given that the other entries are all using a dot as decimal mark), then the output ofhledger -f example.journal equity --opening
is wrong because it does not fulfill hledger's own expectations.The text was updated successfully, but these errors were encountered: