GNOME Bugzilla – Bug 779217
Transactions rounded to 5 decimal places when opening file
Last modified: 2018-06-29 23:54:51 UTC
I have an account in XAU. XAU has a fraction of 1 / 1000000. When working with it in Gnucash everything is as expected, but after saving and re-opening my file the least significant digit is lost by rounding. Example: If I create a transaction with 1.234567 After saving inside the xml file I correctly have: <split:value>1234567/1000000</split:value> But after closing gnucash and reopening the file I see: 1.234570 So 1.234567 has been rounded to 1.23457 and then the precision has be increased again to become 1.234570 After re-saving I have <split:value>1234570/1000000</split:value> in the file. I'm using the XML backend. Best regards, Anton
Forgot to mention that this was reported long time ago in bug 150524 but that bug was closed as a duplicate of another bug, but the problem isn't fixed.
I can replicate this. Examining the file shows that the stored value is correct: <trn:split> <split:id type="guid">f0f7e5ea2c2877aa19eadb2e6b6a07f3</split:id> <split:reconciled-state>n</split:reconciled-state> <split:value>1234567/1000000</split:value> <split:quantity>1234567/1000000</split:quantity> <split:account type="guid">425bb0a9897c09b1ec508dc18f6d2f87</split:account I expect that there's a SIGFIG 6 rounding in the loading code: Creating another transaction for 1.000005 oz gets rounded up to 1.000010 and the balance becomes 2.234580.
Not quite: It turned out to be the default denom in gt_currency_denom was 100000 instead of 1000000. This problem has been fixed in our software repository. The fix will go into the next software release. Once that release is available, you may want to check for a software upgrade provided by your Linux distribution.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=779217. Please update any external references or bookmarks.