New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
balance assignments and posting dates causing wrong parsing #2025
Comments
Good catch! I agree, that seems to be going wrong somehow. |
Notes: This transaction is balanced but the assertion fails, correctly because of the posting date:
But if we make the last amount implicit, both transaction balancing and the assertion succeed, which is wrong - one or the other should fail depending on what amount is inferred (I would expect -1):
If we add any auto posting rule and run with --auto, it fails again:
|
Fixed: postings with balance assignments were being processed in parse order; now they are processed in posting date order.So now all three cases above fail, for the right reasons, regardless of --auto. Thanks for the report! |
Just for the record, I feel it's probably still possible to confuse it by having two transactions, each with multiple posting dates and assertions/assignments, which overlap each other's dates. I don't think that should be expected to work, as we process each transaction separately. But if someone wants to work up a test case, to see if the results are reasonable, that would be welcome. |
Thanks for the prompt fix! |
I have the following journal with an autoposting rule:
The
hledger bal
passes with flying colors, yethledger bal --auto
fails witheven though there are no autopostings issued by the rewrite rule.
At the same time, if I delete the rule and keep only
both
hledger bal
andhledger bal --auto
pass.I am on
I'll try to test on a current master.
The output of
is identical to the output of
hledger reg 'Assets$' --auto -I
. I'd say that toggling--auto
should not change the fail status ofhledger bal
.The text was updated successfully, but these errors were encountered: