GNOME Bugzilla – Bug 581192
--add-price-quotes doesn't get currency quotes
Last modified: 2018-06-29 22:21:14 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:
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 ?
(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.
Closed per user request.. *** This bug has been marked as a duplicate of 568945 ***
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
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.