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 568945 - The gnc_pricedb_convert_balance_... methods should look for the reciprocal of the exchange rate
The gnc_pricedb_convert_balance_... methods should look for the reciprocal of...
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Engine
git-master
Other All
: Normal normal
: ---
Assigned To: Derek Atkins
Derek Atkins
: 581192 (view as bug list)
Depends on:
Blocks: backport
 
 
Reported: 2009-01-24 04:08 UTC by Mike Alexander
Modified: 2018-06-29 22:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test file to demonstrate the problem (1.49 KB, application/xml)
2009-01-24 04:11 UTC, Mike Alexander
  Details
Patch to fix the problem (2.99 KB, patch)
2009-01-24 04:14 UTC, Mike Alexander
committed Details | Review
Test file to reproduce the problem (1.49 KB, text/plain)
2009-01-24 04:16 UTC, Mike Alexander
  Details

Description Mike Alexander 2009-01-24 04:08:36 UTC
Please describe the problem:
If the price DB contains the reciprocal of the exchange rate that gnc_pricedb_convert_balance_nearest_price, gnc_pricedb_convert_balance_latest_price, and gnc_pricedb_convert_balance_latest_before need to do their conversion they don't find it and return zero.

Steps to reproduce:
1. Open the attached file GBPXAU.xac
2. Set the reporting currency to XAU
3. Note that in the Accounts page, the totals and balances in XAU are all zero


Actual results:
All the totals and balances in XAU are zero

Expected results:
Some of the should be small non-zero numbers

Does this happen every time?
Yes

Other information:
I'll attach a patch that fixes this
Comment 1 Mike Alexander 2009-01-24 04:11:16 UTC
Created attachment 127143 [details]
Test file to demonstrate the problem

Open this file and set the reporting currency to XAU.  All the XAU totals are zero in the Accounts page.
Comment 2 Mike Alexander 2009-01-24 04:14:08 UTC
Created attachment 127144 [details] [review]
Patch to fix the problem
Comment 3 Mike Alexander 2009-01-24 04:16:40 UTC
Created attachment 127145 [details]
Test file to reproduce the problem

Open this file and set the reporting currency to XAU.  Not that all the XAU values in the Accounts page are zero.

Resubmitted since telling Bugzilla that this is an XML file (which it is) badly confused it.  Let's pretend it's not XML.
Comment 4 Christian Stimming 2009-01-28 20:57:09 UTC
Trunk, r17850, waiting for back-port. Thanks!
Comment 5 Christian Stimming 2009-01-31 10:48:22 UTC
2.2-branch, r17863
Comment 6 Derek Atkins 2009-05-07 16:16:48 UTC
*** Bug 581192 has been marked as a duplicate of this bug. ***
Comment 7 John Ralls 2018-06-29 22:16:34 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=568945. Please update any external references or bookmarks.