-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Multiple assertions for one day #256
Comments
Unfortunately, this is an incompatibility between ledger and beancount. Assertions / balance checks work in a different way. This is covered in the manual: First, beancount evaluates balance assertions at the beginning see "Balance assertions and assignments" in guide.md |
Having said that, I'll check if ledger2beancount can avoid creating two balance checks for the same account on the same day, maybe with a conversion note about this issue. |
Thanks. I had read the doc you mentioned and understood why this happened. In my case, I have thousands of errors after conversion, so I have to delete all the balance checks to make the file usable. It would be nice if the tool can deal with it. |
What would you suggest? Skipping the balance checks and generating a warning? |
Ideally, I would hope the checks being merged and produce one balance check for one day, so the original data are preserved as much as possible. Implementation-wise, since ledger requires the transactions to be in the correct order, would it make sense to only keep the last assertion of a day? |
Unfortunately, the current code doesn't make it easy to implement this but I'll take a look. I'm on vacation at the moment but I'll try to look soon. |
I haven't had time to look into this more, although I've solidified my impression that this would require big changes. In the meantime, I suggest you use a workaround like:
|
Thanks. Yeah I've removed the balance checks as a workaround. |
Sorry, I won't have time to work on this in the near future. |
+1 I also ran into this issue. |
Sorry that I still haven't fixed this issue. I remember exactly where I was on vacation when it was filed. Long time. I actually thought about this issue a week or two ago and I think I know how to solve it. I'd like to fix it this year but I have urgent work so this seems unlikely. I'll try to get it done soon, though. @girishso you can use the workaround for now:
|
Hi, I have a ledger file where most transactions have a balance assertion. After conversion, there may be multiple assertions for the same day which causes some trouble.
The following is an example:
After conversion, I get
bean-check reports:
version:
ledger2beancount 2.6
The text was updated successfully, but these errors were encountered: