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 581192 - --add-price-quotes doesn't get currency quotes
--add-price-quotes doesn't get currency quotes
Status: RESOLVED DUPLICATE of bug 568945
Product: GnuCash
Classification: Other
Component: Engine
2.2.x
Other All
: Normal minor
: ---
Assigned To: Derek Atkins
Derek Atkins
Depends on:
Blocks:
 
 
Reported: 2009-05-03 16:33 UTC by Philippe Duchenne
Modified: 2018-06-29 22:21 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Philippe Duchenne 2009-05-03 16:33:30 UTC
Please describe the problem:
(From gnucash-user list :
 http://lists.gnucash.org/pipermail/gnucash-user/2009-April/029560.html )

When using the command line "gnucash --add-price-quotes ..." to get online quotes, currencies are not updated; while clicking on "Get quotes" from UI do update them.

Steps to reproduce:
1. Set a cron job as documented in the Concepts Guide ( http://svn.gnucash.org/docs/guide/invest-stockprice1.html#invest-stockprice-auto2 )
2. 
3. 


Actual results:
Shares quotes are updated, but not the currency quotes.

Expected results:
Have the currencies updated as well.

Does this happen every time?
Yes.

Other information:
Comment 1 Philippe Duchenne 2009-05-06 16:52:17 UTC
I have to rectify this bug report a bit.

I've just discovered that --add-price-quotes DOES retrieve the quotes for currency, but not the same way as when clicking on "Get quotes" from UI.

With the command line, I get the latest EUR-USD exchange rate; whereas from the Quotes Editor, I get the latest USD-EUR exchange rate.

As my default currency for GnuCash is EURO, I /think/ that it's only the USD-EUR that used for conversion calculation.  (Or does GnuCash fall back to EUR-USD when the quote is more recent than the one for USD-EUR ?)
So I wondered if there is a way to automate the update the USD-EUR quote when a new EUR-USD is added (and the opposite).

Someone on the gnucash-user list suggest that this is probably a bug that has been fixed with bug #568945
Can somebody confirm ?
Comment 2 Philippe Duchenne 2009-05-06 18:02:15 UTC
(In reply to comment #1)
> (Or does GnuCash fall back to EUR-USD when the quote is more 
> recent than the one for USD-EUR ?)

I did some manual check to confirm this.  The value reported in euro from the register, the Portfolio report, and the Advanced Portfolio report shows that GnuCash use the USD-EUR rate for exchange, even if the EUR-USD rate is more recent.

So having a mechanism to automatically update the USD-EUR when a more recent EUR-USD rate is added (and the other way around) would be welcome.
Comment 3 Derek Atkins 2009-05-07 16:16:48 UTC
Closed per user request..

*** This bug has been marked as a duplicate of 568945 ***
Comment 4 Philippe Duchenne 2009-05-08 15:42:41 UTC
The workaround to get the right exchange rates for your own currency using GnuCash < 2.2.9 on command line is to push the LC_MONETARY env variable for the command.

Example:
Let's say you are in France, and want to retrieve online quotes and exchange rates in euro.  The command to use in a crontab would be:

env LC_MONETARY="fr_FR.UTF-8" gnucash --add-price-quotes /Path/YourGnuCashFile

Comment 5 John Ralls 2018-06-29 22:21:14 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=581192. Please update any external references or bookmarks.