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 339127 - The applet only supports US Dollars
The applet only supports US Dollars
Status: RESOLVED FIXED
Product: gnome-applets
Classification: Other
Component: invest-applet
git master
Other All
: Normal normal
: ---
Assigned To: Enrico Minack
gnome-applets Maintainers
: 339128 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-04-20 08:29 UTC by Mattias Eriksson
Modified: 2010-07-12 19:09 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
adds multi-currency support: automatic conversion of foreign currencies into a local one (29.58 KB, patch)
2010-02-17 18:18 UTC, Enrico Minack
none Details | Review
positions balance (213.99 KB, image/png)
2010-02-18 18:56 UTC, Matteo Zandi
  Details
extension of the previous patch, also makes the applet tooltip support currencies (32.44 KB, patch)
2010-03-03 16:30 UTC, Enrico Minack
none Details | Review
Shows currency support with no overall currency configured (71.91 KB, image/png)
2010-03-03 16:31 UTC, Enrico Minack
  Details
Shows currency support with an overall currency configured (65.99 KB, image/png)
2010-03-03 16:32 UTC, Enrico Minack
  Details

Description Mattias Eriksson 2006-04-20 08:29:49 UTC
Please describe the problem:
Since yahoo uses the currency of the stock market the applet will be very
confusing to use. Example. A stock in the oslo stock market will be specified in
NOK on yahoo, the applet asks for US Dollars. If you calc the cost in US Dollars
thigs will however be totally messed up since the applet will use the NOK value
from yahoo. 
I suggest to just drop the $ sign and let the use specify the currency per stock
entry.

Steps to reproduce:
1. 
2. 
3. 


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Raphael Slinckx 2006-05-21 15:52:33 UTC
*** Bug 339128 has been marked as a duplicate of this bug. ***
Comment 2 Raphael Slinckx 2006-05-21 15:53:02 UTC
from above bug:
It would be nice to be able to specify the currency to display and recalculate
the stock value in to that value depending on the current value of the
currency.

Example. I'm from sweden. I buy a stock in Euro (€). It would then be nice if
it
could calculate the value of my stocks and +/- from Euro to SEK when it is
shown.
This might also be required to be able to handle the case when I buy different
stocks in USD and EUR, to calculate the total value.
Comment 3 Raphael Slinckx 2007-05-07 13:09:36 UTC
This require some heavy change in the codebase to convert the values to the right currency, and thus download the conversion rates and so on.

Patches welcome :)
Comment 4 Enrico Minack 2010-02-17 18:18:44 UTC
Created attachment 154060 [details] [review]
adds multi-currency support: automatic conversion of foreign currencies into a local one
Comment 5 Enrico Minack 2010-02-17 18:19:50 UTC
The above patch adds the missing multi-currency support. A local currency can be specified in the preferences. When given, all shares' values are converted into that local currency and displayed in the widget. If shares are purchased in foreign currency, the exchange rate at that time has to be specified in a new field. If they were bought in the local currency, this field simply stays empty (0.0). Then, the current value and balance are properly computed in the local currency.

For more details see the related bug #609547.
Comment 6 Matteo Zandi 2010-02-17 20:24:11 UTC
Very nice, it works nicely with one minor bug: 'positions balance' is a sum of gains in different currencies and lacks the local currency indication.
Comment 7 Enrico Minack 2010-02-18 15:32:01 UTC
What do you mean, please provide a particular example that I can reproduce.
Comment 8 Matteo Zandi 2010-02-18 18:56:26 UTC
Created attachment 154160 [details]
positions balance
Comment 9 Matteo Zandi 2010-02-18 18:57:11 UTC
The applet icon has a tooltip which says what is the balance of the portfolio, as a sum of each gain for every single position. This sum is calculated as a sum of gains which is not converted in the local currency and thus might sum euros with dollars (line 257 in quotes.py).

Here you can find a test with different currencies. The applet correctly calculates single positions gains showed in the popup window together with their currency (GBp exchange rate is not found, so gain in GBp is showed, nice!).

Not considering the GBp position (+5930 GBp), gains are: +17173 EUR (+23989 USD), -827 EUR (0 DKK), -502 EUR which make a total of 15844 EUR while the tooltip shows 29417 (without specifing a currency) which is 5930+23989+0-502.

[amounts are not exact, due to market movements :) ]
Comment 10 Enrico Minack 2010-02-19 08:52:24 UTC
You are right, I totally forgot about the tool tip ;-) I will fix that.
Comment 11 Enrico Minack 2010-03-03 16:30:33 UTC
Created attachment 155147 [details] [review]
extension of the previous patch, also makes the applet tooltip support currencies

This extended patch also makes the applet tooltip support currencies.
Comment 12 Enrico Minack 2010-03-03 16:31:38 UTC
Created attachment 155148 [details]
Shows currency support with no overall currency configured
Comment 13 Enrico Minack 2010-03-03 16:32:05 UTC
Created attachment 155149 [details]
Shows currency support with an overall currency configured
Comment 15 André Klapper 2010-07-12 16:50:53 UTC
Enrico: Thanks so much for adding this!
Comment 16 Enrico Minack 2010-07-12 19:09:09 UTC
You are very much welcome! Did you test it yet?