GNOME Bugzilla – Bug 129062
1/1000000 fraction traded yields .00001 accuracy
Last modified: 2018-06-29 20:39:39 UTC
i'm using gnucash 1.8.8 on debian sid, and the fraction traded doesn't seem to be represented correctly. in the commodity editor i have Fraction traded: 1000000. whenever i open gnucash, however, those accounts have only been saved with a .00001 share accuracy. i've also tried setting the Smallest Fraction field in the account editor, but that has no effect either.
Yea, there are a number of places that limit entries to 1/100000 This should get fixed.
Created attachment 28006 [details] [review] temporary patch to extend default rounding from 1/100000 to 1/1000000
I have found that with all fraction values set to 1/1000000, data are written to the XML file correctly. On reading, values are rounded to 1/100000. After a little digging, I found that I could modify get_commodity_denom() in engine/Transaction.c (context diff is attached) to get more correct behavior, though probably not the right fix. I suspect the best fix will be to retrieve the actual fraction setting from the account, though this information does not seem to be available at the time the values are read from the XML file (i.e., (Split *)s->acc == NULL).
*** This bug has been marked as a duplicate of 122878 ***
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=129062. Please update any external references or bookmarks.