GNOME Bugzilla – Bug 657402
Max fraction is too low e.g. for Bitcoin
Last modified: 2018-06-29 23:00:31 UTC
Created attachment 194786 [details] demonstrating both problems Currently, there is no way to track Bitcoins accurately because the maximum number of digits which Gnucash appears to be six. Bitcoins are spec'd to have eight digits to the right of the decimal point. This applies both to new commodities and the test currencies.
Created attachment 197837 [details] Test_1.gnucash Hello, for misusing XXX/XTS you are right, they are hardcoded in src/engine/iso-4217-currencies.scm. Should I fix. But I have no problem to enter amounts with 8 decimals in an account of type funds with your BTC commodity as you can see in my updated file.
Looking at the numbers in your test file's Assets:Coins account: * the number of shares is rounded to 6 decimals even though the asset in question has 8. * 100.123460 != 100.123457. Where does the first number come from? Nobody told gnucash to round off at five digits AFAICT.
Indeed, the opening transaction contains: <split:value>1234568/1000000</split:value> <split:quantity>12345678/100000000</split:quantity> So the value is always rounded despite the commodity is declared with 8 decimals - while the quantity is accepted; and as follow up on the other side: <split:value>-1234568/1000000</split:value> <split:quantity>-1234568/1000000</split:quantity> Hm, we should ask the engine devs. FYI: There is already a separate bug 648829 against the SQL backend. Bug 690479 has a precise descripion and possible workarounds of the by bitcoin required precision. Links from the following duplicate: http://gnucash.uservoice.com/forums/101223-feature-request/suggestions/2277730-bitcoin and http://www.reddit.com/r/Bitcoin/comments/152r33/gnucash_should_support_bitcoin/
As workaround Warlord suggested on IRC [http://lists.gnucash.org/logs/2013/02/2013-02-26.html#T12:56:20] to track in milli-Bitcoins: So you record 1.23456789BTC as 1234.56789 mBTC
*** Bug 720561 has been marked as a duplicate of this bug. ***
GnuCash bug tracking has moved to a new Bugzilla host. The new URL for this bug is https://bugs.gnucash.org/show_bug.cgi?id=657402. Please continue processing the bug there and please update any external references or bookmarks.