Multi currency patch
Herbert Thoma
tma at iis.fhg.de
Mon Mar 10 12:54:57 CST 2003
> Hi,
>
> I recently bought some mutual funds which are denominated in USD,
> my default currency is EUR. Get quotes retrieves prices in USD. This
> leads to some minor problems:
>
> - In the main account tree and the reports these fund evaluate to 0.00 EUR,
> because there is no price in EUR but only in USD.
> I am working on a patch to do a "two stage" price db lookup to solve this
> problem.
Here is the patch
* src/engine/gnc-pricedb.c
* src/engine/gnc-pricedb.h:
new function gnc_pricedb_lookup_latest_any_currency,
return any available prices for given commodity regardless
of currency
* src/app-utils/gnc-ui-util.c:
do a "two stage" price lookup in gnc_ui_convert_balance_to_currency
if no price for the commodity is found in the requested currency,
then look for prices in any currency and for a exchange rate from
the price currency to the requested currency
* src/gnome/gnc-split-reg.c:
do currency conversion and show the value in the status line of
stock and mutual fund accounts
Herbert.
--
Herbert Thoma
FhG-IIS A, Studio Department
Am Weichselgarten 3, 91058 Erlangen, Germany
Phone: +49-9131-776-323
Fax: +49-9131-776-399
email: tma at iis.fhg.de
www: http://www.iis.fhg.de/-------------- next part --------------
A non-text attachment was scrubbed...
Name: gnucash-20030310-123832-herbie.diff.gz
Type: application/octet-stream
Size: 11101 bytes
Desc: not available
Url : /pipermail/attachments/20030310/ef780339/gnucash-20030310-123832-herbie.diff.obj
More information about the gnucash-patches
mailing list