GnuCash
Contact   Instructions
Bug 797244 - Commodity categories are inconsistent
Summary: Commodity categories are inconsistent
Status: RESOLVED FIXED
Alias: None
Product: GnuCash
Classification: Unclassified
Component: Currency and Commodity (show other bugs)
Version: 3.5
Hardware: PC Windows
: Normal minor
Target Milestone: ---
Assignee: core
QA Contact: core
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-19 02:42 EDT by Matt
Modified: 2021-03-17 12:07 EDT (History)
5 users (show)

See Also:


Attachments
csv file of exchange rates. (200.34 KB, application/vnd.ms-excel)
2019-05-19 02:42 EDT, Matt
no flags Details

Description Matt 2019-05-19 02:42:15 EDT
Created attachment 373282 [details]
csv file of exchange rates.

I have a set of currency conversion data based on HKD to JPY, THB, USD, and AUD. When I import these prices, the "Price Database" shows only three currencies (AUD, HKD, and USD). The THB and JPY data gets included in the HKD data. It seems that these should be based around the "accounting currency" of the books, but gnucash does not seem to incorporate that concept.

I have attached the csv file with the exchange rate data that demonstrates the issue. (Import the Price Data then open the "Price Database" window).
Comment 1 Bob 2019-05-19 04:34:19 EDT
I imported your prices into a new file and all looks how I expect it to be. The rates between HKD to USD and AUD in your file are less than 1 and so they get converted to there reciprocal and stored under USD and AUD.

I checked also buy creating two accounts, one in HKD and one is USD and then adding a simple transaction between the two and when the transfer dialogue pops up used the fetch rate button. After this, looking in the 'Price Database' I see the fetched price under USD.
Comment 2 Mike Alexander 2019-05-19 17:27:04 EDT
This was changed in the last release of GnuCash (3.5).  The code to reverse currency exchange rates less than 1 has been removed since it is no longer necessary.  You shouldn't see this behavior in that version.
Comment 3 Bob 2019-05-20 05:37:51 EDT
Was your change to do with price retrieval?
Does that apply to the transfer dialog also as lines 1622 seem to say otherwise.

Just looking for clarification as the price importer I wrote does, see lines 284 of gnc-imp-props-price.cpp
Comment 4 Mike Alexander 2019-05-20 15:43:25 EDT
Yes, the change I mentioned affected only price retrieval using the "Get Quotes" button or equivalent.  I didn't realize there was code elsewhere to invert prices less than 1. The code in gnc-imp-props-price.cpp and in dialog-transfer.c should be changed too.  I don't have time to do that right now, but if no one else does it I'll get to it eventually.
Comment 5 Bob 2019-06-23 07:43:12 EDT
I have changed the importer and the transfer dialogue to remove the inversion for prices less than 1.

This will be in version 3.6 so please test when available and report back so this bug can be closed.
Comment 6 Geert Janssens 2021-03-17 12:07:26 EDT
No reply for almost 2 years. I'll assume the issue is fixed. Feel free to reopen if you still run into this.

Note You need to log in before you can comment on or make changes to this bug.