Three currency transaction?
Stephen J. Gowdy
gowdy at slac.stanford.edu
Fri Nov 18 13:21:05 EST 2005
Hi Derek,
That worked and it didn't need to leave any transaction in the new
account either, much better than what I was doing before. Here is the new
transaction;
<gnc:transaction version="2.0.0">
<trn:id type="guid">f9fba10434e8ebbb8755daa434d6f7f9</trn:id>
<trn:currency>
<cmdty:space>ISO4217</cmdty:space>
<cmdty:id>EUR</cmdty:id>
</trn:currency>
<trn:date-posted>
<ts:date>2005-07-10 00:00:00 -0700</ts:date>
</trn:date-posted>
<trn:date-entered>
<ts:date>2005-11-18 10:11:26 -0800</ts:date>
<ts:ns>355101000</ts:ns>
</trn:date-entered>
<trn:description>Rotonda</trn:description>
<trn:splits>
<trn:split>
<split:id type="guid">30d20d9ed34d53c31290da0fb7322156</split:id>
<split:reconciled-state>n</split:reconciled-state>
<split:value>1400/100</split:value>
<split:quantity>1679/100</split:quantity>
<split:account
type="guid">e94d501def7eb251cb4bd4b2747ea132</split:account>
</trn:split>
<trn:split>
<split:id type="guid">a2c5bfedf5b6b60452d27e12fb38d6f7</split:id>
<split:reconciled-state>n</split:reconciled-state>
<split:value>-1400/100</split:value>
<split:quantity>-991/100</split:quantity>
<split:account
type="guid">b60a55e7293de9c707a65c7a08619372</split:account>
</trn:split>
</trn:splits>
</gnc:transaction>
Thanks!
regards,
Stephen.
On Fri, 18 Nov 2005, Derek Atkins wrote:
> Hi.
>
> So, to help you parse this transaction....
>
> Quoting "Stephen J. Gowdy" <gowdy at slac.stanford.edu>:
>
> > Hi Derek,
> > I used the UK Credit card in GBP to enter it. Here is the xml for
> > it if that helps any;
> >
> [snip]
> > <trn:currency>
> > <cmdty:space>ISO4217</cmdty:space>
> > <cmdty:id>GBP</cmdty:id>
> > </trn:currency>
>
> This means that the common currency is GBP. All splits have a GBP amount
> and the transaction is "balanced" based on that GBP amount. I.e. all <value>
> amounts are denoted in GBP.
>
> > <trn:split>
> > <split:value>991/100</split:value>
> > <split:quantity>1400/100</split:quantity>
> > <split:account
> > type="guid">35f26b37201b8b0c19eb154136cac189</split:account>
>
> This split is to some account (most likely your EUR account) and you spent
> 1.40 EUR which implies 9.91 GBP. I'm assuming that the account currency
> for the account with this guid (35f2...c189) is EUR.
>
> > </trn:split>
> > <trn:split>
> <split:value>-991/100</split:value>
> > <split:quantity>-991/100</split:quantity>
> > <split:account
> > type="guid">b60a55e7293de9c707a65c7a08619372</split:account>
>
> This is the balancing split; again for 9.91 GBP (assuming that the account
> with guid 660a...9372 has a currency of GBP).
>
> So, what you have here is a perfectly value multi-currency transaction.
> When you view this txn from the GBP account it should should you 9.91.
> When you view it from the EUR account it should show you 14.00.
>
> > I was about to enter a new transaction in the Currency:Euros
> > account to transfer the value to an Expense account and I noticed the
> > amount listed there was a GBP number and not as I expected a USD amount
> > (and that was also why exchange rate was the GBP->EUR instead of the
> > USD->EUR one). I thought perhaps I should create a Currency:Eur-GBP
> > account which was "trading" Euros but with a base currency of GBP but I
> > don't see a way to do that.
>
> Don't use Currency Accounts. In general you don't need them, and most
> of the time you're just going to cause yourself grief.
>
> > To be clear, I'm talking about two different transactions with two
> > currencies involved in each one. One is EUR<->GBP and the other EUR<->USD.
>
> Why do you have the EUR<->USD? In fact, why do you have EUR at all?
> All your accounts are in USD and GBP. One thing you could do is create
> a EUR Asset account (NOT type Currency, type Asset, or Bank).. And use THAT
> to go between. Open up your EUR account and create a split transaction..
> One Split goes to your GBP credit card, and the other to the USD Expense
> Account.
> Then you'd get your two exchange rates (EUR<->GBP and EUR<->USD).
>
> Note, however, that this might not work, as there are some known bugs
> with multi-split multi-currency transactions.
>
> -derek
>
> > regards,
> >
> > Stephen.
> >
> > On Thu, 17 Nov 2005, Derek Atkins wrote:
> >
> >> There are some "known bugs" in tri-currency transactions.. Getting
> >> all the corner cases right is... challenging. So, unfortunately,
> >> there isn't a good answer for you right now.
> >>
> >> What I /can/ say is that whenever you are looking at an account,
> >> the values are ALL in the CURRENT currency, not the currency of
> >> the split. So if you open up the GBP account, all values will
> >> be shown in GBP.
> >>
> >> I'll also note that Currency Accounts are... deprecated.
> >> At the same time, there's a major question about how you entered
> >> the transaction. Which account did you use to enter it? And
> >> what is your current locale (LANG)?
> >>
> >> -derek
> >>
> >> "Stephen J. Gowdy" <gowdy at slac.stanford.edu> writes:
> >>
> >> > Hi All,
> >> > I'm guessing this is unusual and that is why it doesn't seem to
> >> > work. I have a UK credit card (GBP) that I used in Italy (EUR) and my
> >> > expense accounts (and my default currency) are in USD. I have a Currency
> >> > account in EUR which is how I usually deal with foreign transactions with
> >> > my US cards (so I can express the EUR value somewhere).
> >> > So I posted a transaction for 14 EURs to my UK credit card. THe
> >> > card was debited GBP 9.91. The line in the Credit Card Account is;
> >> >
> >> > 10/7/2005 Rotunda Currency:Euros 9.91 <balance>
> >> >
> >> > then in the Currency:Euros account;
> >> >
> >> > 10/7/2005 Rotunda Li..:Credit.. 14.00 .707 9.91 <balance>
> >> >
> >> > So it is assuming that the 9.91 was in Dollars, even though the
> >> > Li..:Credit..:MBNA has a GBP currency.
> >> > Is there some way this is suppose to work?
> >> >
> >> > regards,
> >> >
> >> > Stephen.
> >>
> >>
> >
> > --
> > /------------------------------------+-------------------------\
> > |Stephen J. Gowdy | SLAC, MailStop 34, |
> > |http://www.slac.stanford.edu/~gowdy/ | 2575 Sand Hill Road, |
> > |http://calendar.yahoo.com/gowdy | Menlo Park CA 94025, USA |
> > |EMail: gowdy at slac.stanford.edu | Tel: +1 650 926 3144 |
> > \------------------------------------+-------------------------/
> >
>
>
>
>
--
/------------------------------------+-------------------------\
|Stephen J. Gowdy | SLAC, MailStop 34, |
|http://www.slac.stanford.edu/~gowdy/ | 2575 Sand Hill Road, |
|http://calendar.yahoo.com/gowdy | Menlo Park CA 94025, USA |
|EMail: gowdy at slac.stanford.edu | Tel: +1 650 926 3144 |
\------------------------------------+-------------------------/
More information about the gnucash-user
mailing list