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
Be smarter about rounding entries #9
Comments
Here's a good test case:
becomes
|
@blais do you by any chance remember why you added these rounding entries in the first place? Do you have a test case where they were useful? As far as I can tell, they do more harm than good, but I'm curious to see a testcase where they are useful. |
https://github.com/beancount/beancount/blob/master/beancount/parser/options.py#L289 Remove the option and they should be gone. |
@blais sorry for not giving enough context. This is about the ledger output. It adds Rounding entries explicitly:
But in my experience these rounding entries are counterproductive. I'm curious if you have a testcase where they make sense. |
I don't remember. |
I'm reopening this bug. @blais this bug is against beancount2ledger. It's a genuine bug that I need to fix (either by not generating these entries at all or only when they are needed), so please leave it open. You can unsubscribe from the bug though. |
Sorry about that. If you want to undo the work of the option, I think there is metadata on the postings which were added by that code (and if not, we should tag those auto-inserted postings with metadata). You can iterate and simply remove those postings before doing the conversion. That code should be a patch to Beancount (e.g., remove_rounding_postings()?). Don't remove the postings based on just the account name because the user might use that account explicitly. Does that make sense? |
I wonder if this is basically the same cause as beancount/beancount#246 |
Ok, I've come up with an example where a rounding entry is needed. Valid in beancount:
The second transaction will fail in ledger:
|
I'm seeing entries like, which I'm sure are not necessary, and actually make things worse:
The text was updated successfully, but these errors were encountered: