tutorial on multi-currency accounting
Mike Alexander
mta at umich.edu
Wed Mar 7 02:10:29 EST 2007
--On March 7, 2007 12:29:04 AM -0400 Peter Selinger
<selinger at mathstat.dal.ca> wrote:
>> You mean the old 1.8 currency accounts? No, I don't use them. I
>> don't recall what they were like and I'm not sure if it's a good
>> idea to recycle them for this purpose or not. Right now it creates
>> top level Imbalance-xxx accounts for this just like it does for
>> value imbalances. I will probably change this to look for a
>> Currency place-holder account and find (or create) an income
>> account below this as suggested in Peter's document.
>
> I wonder whether, in this particular instance, an Imbalance account or
> a Currency account (as defined in my document) is more appropriate.
>
> Is the purpose to "fix" a transaction that is not balanced? By putting
> it into a Currency account, you would be effectively inventing an
> exchange that may not have actually have taken place, and an (implied)
> exchange rate. By putting it under Imbalance, you are asking the user
> to fix it.
>
> On the other hand, if the purpose is to "convert" a set of accounts
> that used to use the old currency method, and that was already
> balanced under the old system, then putting these as Imbalances would
> create a huge mess for the user to clean up by hand. In this case, it
> would be better to create the correct splits into Currency accounts,
> perhaps using the exchange rate info that was saved with the
> transaction.
You'll note that one of the things I did not do was to turn off the
exchange rate prompt when entering a transaction involving more than
one commodity. This is because it is important to have reasonable
exchange rates defined for such transactions if you are to maintain the
rule that the transaction must be balanced in the transaction currency
as well as in each commodity in the transaction individually.
The transaction balancing code in xaccTransGetImbalance assumes all
exchange rates are correct. A transaction involving more than one
commodity has an implied exchange rate between the commodities which
can be determined by comparing the amount and value fields of the
various splits. This is used to create the new splits to balance the
individual commodity amounts in the transaction. The bottom line is
that the balancing split will be created using the exchange rate
specified when the transaction was entered which I think is the best we
can do.
I don't think it matters too much whether the splits created go into an
Imbalance account or into a currency account. It's not that hard to
clean things up. After scrubbing some transactions you can just delete
the account the splits went into and you'll get a prompt asking where
they should be moved to. Or if you want to move a few splits you can
use a find register to edit them easily. On the other hand this
scrubbing will happen automatically as you enter transactions with
multiple commodities if you don't create the balancing splits yourself,
so it would be best to make it work as well as possible.
Mike
More information about the gnucash-devel
mailing list