GNOME Bugzilla – Bug 628903
Post Bill creates imbalanced transaction caused by rounding error
Last modified: 2018-06-29 22:44:15 UTC
Created attachment 169593 [details] imbalance.png After I posted a bill, I got a imbalanced transaction. It seems, while on the left side each line was rounded to full cent, on the right side, only the result was rounded.
Created attachment 169595 [details] bill.png This was the bill. You can see, the sum (Summe) is 1 ct to small. At least in the EC custom declaration, the custom fee (ZollEU) is rounded to full cent and added to the custom value (Zollwert) to calculate the import VAT (EUSt). This again is rounded to full cent and copied to the sum page. But I believe in every bill/invoice, the printed numbers of each row should sum to the total.
I suspect I introduced this with r19475, when I fixed another rounding error in function gncEntryGetValue. The problem is likely that some parts of GnuCash expect this function to return rounded results while other parts expect it to return unrounded results. I'll try to look into this as soon as possible.
The related bug in my previous comment is bug 504954. I have reverted the commit that resolved that bug. It appears rounding has some subtle side effects in GnuCash that first have to be more thoroughly investigated. I don't have time for that right now. So until I or someone else finds the time, I prefer not to change things.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=628903. Please update any external references or bookmarks.