Closed mefromthepast closed 3 years ago
Thanks, that's an interesting scenario. So it seems that beancount's balance checks works the same way as hledger's =*
syntax.
I don't think there's anything ledger2beancount can do about this. I can improve the docs, though, to highlight potential issues.
Do you have any suggestions on how to improve the current behviour/status?
@mefromthepast I looked into this issue when you reported it but then got distracted with other things.
As it turns out, we can look for sub-accounts of the account specified in the assertion and print a warning. Your example will now lead to:
; - Assertion for Expenses:Subaccount may fail due to sub-accounts
I've also updated the docs to describe this problem.
hledger's =*
syntax is handled correctly and won't print the warning.
Thanks for making me aware of this issue!
Apparently,
beancount
uses cummulative amounts for assertions, whilehledger
does not add amounts from its subaccounts to the main accounts. This leads to error infava
/bean-check
when usingledger2beancount
.Sample hledger file
ledger2beancount ledger.journal > out.journal
fava out.journal