multi-currency transactions

Derek Atkins warlord@MIT.EDU
06 Jan 2003 10:36:23 -0500


Jan,

Thank you for your helpful comments.  Let me try to work through
them with you....

Jan Nielsen <nielsenjan@tin.it> writes:

> Assume the following simple situation:
> 
> 2 bank accounts a) AccountUS with currency USD and b) AccountGB with
> currency GBP.

Ok, this is easy enough.  You don't say what ledger type you are
using, but we can worry about that later.

> On 2/1/2003 a transaction is entered in account AccountUS withdrawing
> 10USD and transferring it to AccountGB using a To-Amount mechanism
> specifying that AccountGB will be credited 6GBP.
> 
> A ledger view of this might look like this:
> 
> -------------------------------------------------------------------
> AccountUS
> Date        Desc     Transfer        Deposit   Withdrawal   Balance
> 2/1/2003    Tx GB    AccountGB                 10.00        10.00
> 
> 
> AccountGB
> Date        Desc     Transfer        Deposit   Withdrawal   Balance
> 2/1/2       Tx GB    AccountUS       6.00                   6.00
> -------------------------------------------------------------------

Ok, so it looks like you're using the basic ledger.  This looks
perfectly normal (and even looks like how it would work now ;)

> First observation: For my personal use of gnucash it would be
> preferable that the transfer dialog is always popped up automatically
> when making a transfer between two account with different currencies
> (independently of whether it is a stored transaction or there is a
> price available from somewhere). Now, I don't personally care too much
> about whether the actual implementation underneath stores all this
> using exchange rates, all in USD, some in USD, some in GBP etc. What I
> see in the ledger is the above.

Unfortunately this is rather difficult to do.  First, you need to
understand that you do NOT want the exchange dialog to pop up every
time you enter the register.  Just because you click on the split
does not imply you want/need the exchange-rate dialog to pop up.
So, you really only want it to pop up when:

        a) the user requests it, or
        b) the register thinks it needs an exchange rate.

The problem is that there is no way to differentiate an auto-filled
transaction (a transaction that get's filled in by the register
autocompletion code) from an 'existing' transaction.  In fact, the
point of auto-completion is generally that you want the same
transaction again.

Note that except for the cases on auto-filled transactions, the
exchange-rate dialog _WILL_ pop up every time.  I'll see if there is
some way to detect this difference between an auto-filled and an
existing transaction.....

> Now, for some reason I have a need to adjust the above transaction. My
> typical need arises from having to adjust the "to-account", but I
> think this might be immaterial.

There really is no concept of "from account" and "to account" in
double-entry accounting.  There is 'credit account' and 'debit
account'... But that is immaterial. ;)

> In my example I need to adjust the AccountGB as the bank has
> communicated that they have credited my account with GBP 6.15.
> So _what I would like_ to see is:
> 
> -------------------------------------------------------------------
> AccountUS
> Date        Desc     Transfer        Deposit   Withdrawal   Balance
> 2/1/2003    Tx GB    AccountGB                 10.00        10.00
> 
> 
> AccountGB
> Date        Desc     Transfer        Deposit   Withdrawal   Balance
> 2/1/2       Tx GB    AccountUS       6.15                   6.15
> -------------------------------------------------------------------

Ok.  This means you need to change the exchange rate.

> Observation 2: The simple way to achieve this would be to simply open
> the AccountGB ledger and change the deposit amount to 6.15. However,
> in current gnucash (CVS 28122002) this also changes the AccountUS as
> follows (which I do _not_ like):

But this is not the way to achieve it.  Why should a multi-currency
transaction be any different than any other transaction?  If both
accounts were in the same currency would you expect a change in one
account NOT to affect the other one?

Think about this another way: ALL transactions are "multi-currency"
transactions, except most of them have an exchange-rate of "1".  If
you think about it that way, you can understand why the behavior is as
it is.  When you change the number in one account is _SHOULD_ change
the number in the other account.

> -------------------------------------------------------------------
> AccountUS
> Date        Desc     Transfer        Deposit   Withdrawal   Balance
> 2/1/2003    Tx GB    AccountGB                 10.25        10.25
> 
> 
> AccountGB
> Date        Desc     Transfer        Deposit   Withdrawal   Balance
> 2/1/2       Tx GB    AccountUS       6.15                   6.15
> -------------------------------------------------------------------
> 
> I think the natural use of the to-amount functionality is that a
> change made directly in the ledger should have the effect of simply
> changing one side of the equation if the original transaction has been
> made using "to-amount" (which by the way comes natural to an old
> Quicken user such as me). I do realize that this requires a flag to
> store this information, but then so be it.

To what "to-amount functionality" are you referring?  I think you
think there is more information stored then there is.  All that is
stored is a 'value' and 'amount' for each split.  There is no memory
of HOW that split was entered.  There is no memory of whether you
entered it via the transfer dialog or the register or an SX.  There is
no memory of whether you clicked the "Exchange Rate" or "To Amount"
flag in the dialog.

You've made a change in the ledger, and it changed the other account.
That is 100% correct.  I don't see any problem here, regardles of
whether it's a same-currency or multi-currency transaction.

If you want to edit each split individually, expand the transaction by
clicking the "Splits" button (or change to an Auto-split or
Transaction Journal register type).

> 3rd Observation: If this on the other hand is not possible I would
> think that using the "Edit Exchange Rate" dialog, it should be
> possible to simply change either the "Amount", "To Amount", or
> "Exchange rate" fields to obtain the same result.
> 
> I.e. the dialog should really have a multi choice of "Amount",
> "Exchange Rate" and "To Amount" where one of the three can be selected
> for editing and one (another one) for keeping fixed. E.g. to make my
> example above the method would be to select "To Amount" for editing
> and  "Amount" for keeping fixed. The result would be that the exchange
> rate changes and that the resulting ledger would be as I would like:

Well, as of 1.7.7 I've changed the behavior so that it always modifies
the 'other account'.  However, as Christian and I have been
discussing, we might want/need to pop up a dialog that asks the user
which value they want to change.  That, however, is not in 1.7.7....

> I hope this was clear(er)

Yes, and I hope my reasonings were clear, too.

> Cheers
> 
> Jan

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available