After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 529494 - Wrong fractional precision in register with multi-currency transactions
Wrong fractional precision in register with multi-currency transactions
Status: VERIFIED FIXED
Product: GnuCash
Classification: Other
Component: Register
2.2.x
Other Windows
: Normal minor
: ---
Assigned To: David Hampton
Chris Shoemaker
Depends on:
Blocks: backport
 
 
Reported: 2008-04-23 07:30 UTC by Daniel Harding
Modified: 2018-06-29 22:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use register's currency for fraction rather than transaction's (3.04 KB, patch)
2008-04-23 07:32 UTC, Daniel Harding
committed Details | Review

Description Daniel Harding 2008-04-23 07:30:34 UTC
If a transaction has splits with two different currencies, and those currencies have different fractions, the transaction will display incorrectly in at least one of the registers.  Instead of using the fraction of the currency for the values displayed in the register, it will use the fraction of the transaction's primary currency.

For example, assume there is a transaction whose primary currency is US Dollars, and which has a split whose currency is the Chilean Peso, whose fraction precision is 1 rather than 100.  In that case when the transaction is displayed in the register corresponding to the Chilean Peso split, the values of the transaction will be displayed with two decimal points, rather than none as expected.
Comment 1 Daniel Harding 2008-04-23 07:32:42 UTC
Created attachment 109742 [details] [review]
Use register's currency for fraction rather than transaction's

This patch replaces the function gnc_split_value_print_info, which returns the print info for the currency of the split's transaction, with a new function, gnc_split_register_print_info, which returns the print info for the split register's default account.  That way the amounts displayed in the register use the fraction of the register's account, rather than the fraction of the transaction's currency.
Comment 2 Christian Stimming 2008-10-25 20:32:28 UTC
Committed to trunk as r17656, awaiting back-port.
Comment 3 Christian Stimming 2008-10-25 20:32:49 UTC
Committed to trunk as r17656, awaiting back-port.
Comment 4 John Ralls 2018-06-29 22:03:44 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=529494. Please update any external references or bookmarks.