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 733283 - [PATCH] Loss of fractions when importing OFX investment transactions
[PATCH] Loss of fractions when importing OFX investment transactions
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Import - OFX
git-master
Other All
: Normal major
: ---
Assigned To: gnucash-import-maint
gnucash-import-maint
Depends on:
Blocks:
 
 
Reported: 2014-07-16 23:25 UTC by Jethro Beekman
Modified: 2018-06-29 23:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use transaction's currency to convert transaction amount to gnc_numeric. (969 bytes, patch)
2014-07-16 23:25 UTC, Jethro Beekman
committed Details | Review

Description Jethro Beekman 2014-07-16 23:25:13 UTC
Created attachment 280894 [details] [review]
Use transaction's currency to convert transaction amount to gnc_numeric.

When importing OFX investment transactions, the "transaction amount" is converted to a gnc_numeric using the security's commodity. This value is later used in xaccSplitSetValue() which "sets the value of this split in the transaction's commodity". This can result in the rounding of this amount if the commodity's fraction is 1/1. This patch uses the transaction's currency to do the gnc_numeric conversion.
Comment 1 Geert Janssens 2014-09-16 21:48:26 UTC
Comment on attachment 280894 [details] [review]
Use transaction's currency to convert transaction amount to gnc_numeric.

Thank you for your patch.

It looks good and passes all tests, so I have applied it to the maint branch. It will be included in the upcoming 2.6.4 release.

Thanks again and I'm already looking forward to your next contribution!
Comment 2 John Ralls 2018-06-29 23:32:03 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=733283. Please update any external references or bookmarks.