[Patch] reworked advanced-portfolio.scm

Andrew Sackville-West andrew at farwestbilliards.com
Thu Feb 23 17:21:04 EST 2006


On Thu, 23 Feb 2006 22:46:13 +0100
Herbert Thoma <herbert.thoma at iis.fraunhofer.de> wrote:


> 
> Hmm, I usually do a get-quotes once a day, so I think I have
> a reasonable price.
> 
> Anyway, how do you get price data from the transaction?
> Say you buy 10 shares X for 100 EUR and the report currency is USD.
> There is no conversion rate for EUR to USD in this transaction,
> so you have to look for one in the pricedb, don't you?

Well that's the problem. There is no guarantee that there is an exchange rate in the pricedb. So, we can't get an exchange for shares with no pricedb, but the report should still provide information, isntead of just crashing. So I'm getting values for shares fromt he txns AND the pricedb and using whichever is most relevant. I guess that in a multi-commodity situation we have to fall back on the pricedb and gracefully handle it if there is none.

A

> 
>   Herbert.
> 
> > A
> > 
> -- 
> Herbert Thoma
> Group Manager Video
> Multimedia Realtime Systems Department
> Fraunhofer IIS
> Am Wolfsmantel 33, 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: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20060223/1ae72c89/attachment.bin


More information about the gnucash-devel mailing list