-
-
Notifications
You must be signed in to change notification settings - Fork 386
failed balance assertion explanation could include a breakdown of subaccounts when ==* is used #1535
Copy link
Copy link
Open
Labels
A-WISHSome kind of improvement request or proposal.Some kind of improvement request or proposal.cliCommand line parsing, options, arguments and suchlike.Command line parsing, options, arguments and suchlike.journalThe journal file format, and its features.The journal file format, and its features.needs-designTo unblock: needs more thought/planning, leading to a spec/planTo unblock: needs more thought/planning, leading to a spec/planneeds-mockup/screenshotTo unblock: needs a rough mockup, eg in plain text, or a screenshotTo unblock: needs a rough mockup, eg in plain text, or a screenshotneeds-testsTo unblock: needs more automated tests or test updatesTo unblock: needs more automated tests or test updates
Metadata
Metadata
Assignees
Labels
A-WISHSome kind of improvement request or proposal.Some kind of improvement request or proposal.cliCommand line parsing, options, arguments and suchlike.Command line parsing, options, arguments and suchlike.journalThe journal file format, and its features.The journal file format, and its features.needs-designTo unblock: needs more thought/planning, leading to a spec/planTo unblock: needs more thought/planning, leading to a spec/planneeds-mockup/screenshotTo unblock: needs a rough mockup, eg in plain text, or a screenshotTo unblock: needs a rough mockup, eg in plain text, or a screenshotneeds-testsTo unblock: needs more automated tests or test updatesTo unblock: needs more automated tests or test updates
My understanding is that ==* is very useful to check that virtual / transfer accounts are all zero at the end of the month, or beginning of the year. I call those accounts zerosum accounts.
Then I need to figure out which of the sub-accounts contributed to the assertion failure .
Putting the breakdown of those non-zero subaccount balances would save time.
I started using ==* only this month, and realized how many of my transfers account were non-zero (a typical sign of bugs in my own hledger-flow import scripts). It even found some EUR in subaccounts that were actually named with USD at the end.
Workaround (Edit 2021-04-21)
To find out the culprit(s) (in this example)
hledger bal -I --end 2018-04-02 Transfers: cur:EURnotice the date is the date from the assertion details + 1 day
(Edit 2021-04-22)
Use
regand slide the date forwards to discover whether the situation 'corrects' itself in time.hledger reg -I --end 2018-04-15 Transfers: cur:EURIf not, it's a bug (ie, the journal contains money in a transitory transfer account that is only put in, and
never taken out, or vice versa). If it does correct itself, consider changing the date of that assertions to another
day where there is less noise. Most of the time, the failure will not be a bug, but a transfer that
was still ongoing at the time the balance_assertion is checked (left the source account, but did
not arrive yet in the destination account).