[GNC] Account Hirarchy with different currencies cause online quotes to fail in some cases
John Ralls
jralls at ceridwen.us
Tue Aug 6 16:55:10 EDT 2019
> On Aug 6, 2019, at 11:06 AM, Ove <write2ove at gmail.com> wrote:
>
> Thanks very much for that John.
>
> I did as you suggested, and it fixed the original problem but exposed a
> different one.
>
> I get two currency quotes, EUR/SEK & EUR/USD from the online quote function.
>
> However since there is no SEK/USD quote , the total of my SEK Asset does not
> include the USD ammounts, e.g.
>
> Assets: €xxx (Correct, equivalent of Kr70 + $12 + €1 in Euro)
> Brokerage: Kr70 (missing the USD amount)
> USD Assets: $12
> USD Cash $4
> USD Stocks: $8
> AMZN 1 Amazon
> SEK Assets: Kr70
> SEK Cash kr40
> SEK Stocks: Kr20
> AZN.STO 1 AstraZeneca
> SEK Mutual Funds: kr10
> Handelsbanken Multiasset 50 1 Handelsbanken
> Bank Account (EUR) €1.
>
> In order to try to reset it:
> I Deleted all currency quotes,
> I un-ticked currency quotes in the Security Editor, and then re-Ticked them
> I have tried only having USD & SEK ticked, and I have tried having USD & SEK
> & EUR ticked.
> however I only receive the online quotes for EUR/USD & EUR/SEK.
> If I insert a manual quote for USD/SEK it will add up correctly.
>
> Is there a way to get Triangle quotes like this via online quotes, or is
> there another way to achieve what I want to do.
>
> Possibly also worth mentioning, when I get the two quotes for EUR/USD &
> EUR/SEK the window in Price Database looks like this:
> +Currency
> EUR(Euro)
> where + denotes the drop down triangle
> Note that there is no triangle to expand to look at what is under the EUR
> quote.
>
> Rather than what I would have expected:
> +Currency
> +SEK (Swedish Krona)
> SEK (Swedish Krona) EUR (Euro) 06/08/19
> Finance::Quote Last 0.093101
> +USD (US Dollar)
> USD (US Dollar) EUR (Euro) 06/08/19
> Finance::Quote Last 0.892777
>
>
> when I look at the gnucash XML, it looks like this:
>
> <gnc:commodity version="2.0.0">
> <cmdty:space>CURRENCY</cmdty:space>
> <cmdty:id>EUR</cmdty:id>
> <cmdty:slots>
> <slot>
> <slot:key>auto_quote_control</slot:key>
> <slot:value type="string">false</slot:value>
> </slot>
> </cmdty:slots>
> </gnc:commodity>
> <gnc:commodity version="2.0.0">
> <cmdty:space>CURRENCY</cmdty:space>
> <cmdty:id>SEK</cmdty:id>
> <cmdty:get_quotes/>
> <cmdty:quote_source>currency</cmdty:quote_source>
> <cmdty:quote_tz/>
> </gnc:commodity>
> <gnc:commodity version="2.0.0">
> <cmdty:space>CURRENCY</cmdty:space>
> <cmdty:id>USD</cmdty:id>
> <cmdty:get_quotes/>
> <cmdty:quote_source>currency</cmdty:quote_source>
> <cmdty:quote_tz/>
> </gnc:commodity>
>
> and the resulting quotes:
> <gnc:pricedb version="1">
> <price>
> <price:id type="guid">9724d1f0b2cc4c709cba5026a8a01928</price:id>
> <price:commodity>
> <cmdty:space>CURRENCY</cmdty:space>
> <cmdty:id>EUR</cmdty:id>
> </price:commodity>
> <price:currency>
> <cmdty:space>CURRENCY</cmdty:space>
> <cmdty:id>SEK</cmdty:id>
> </price:currency>
> <price:time>
> <ts:date>2019-08-06 18:53:19 +0100</ts:date>
> </price:time>
> <price:source>Finance::Quote</price:source>
> <price:type>last</price:type>
> <price:value>10741/1000</price:value>
> </price>
> <price>
> <price:id type="guid">60e4902beaab4a8f8dbf6e5227257336</price:id>
> <price:commodity>
> <cmdty:space>CURRENCY</cmdty:space>
> <cmdty:id>EUR</cmdty:id>
> </price:commodity>
> <price:currency>
> <cmdty:space>CURRENCY</cmdty:space>
> <cmdty:id>USD</cmdty:id>
> </price:currency>
> <price:time>
> <ts:date>2019-08-06 18:53:19 +0100</ts:date>
> </price:time>
> <price:source>Finance::Quote</price:source>
> <price:type>last</price:type>
> <price:value>11201/10000</price:value>
> </price>
> <price>
>
>
> Many thanks in advance.
Sorry, I don't know the answer to that and I haven't found a good answer in the relevant code.
Regards,
John Ralls
More information about the gnucash-user
mailing list