About the <trn:currency> tag in the GnuCash file

rhill rhill at raymondhill.net
Tue Mar 5 14:21:06 EST 2013

Hash: SHA1

On 13-03-05 02:41 PM, Derek Atkins wrote:
> Hi,


> Yes, it is supposed to be an actual "common currency", which binds
> each of the "Split Values".  The transaction does its double-entry
> balancing using the Split Value in the transaction currency.  The
> exchange-rate dialog also uses the transaction currency to map from
> the "Split Amount" (which is denoted in the Split Account's
> Commodity) to the Split Value.
>> However, looking at a particular file, which contains over
>> 14,000 transactions, I noticed there are two exceptions: there
>> are two transactions (which were entered very recently) where the
>> currency is not really an ISO4217 commodity, but are a STOCK
>> commodity. So that kind of invalidate my prior understanding, as
>> it appears that the field <trn:currency> can refer to any
>> commodity, not just the ones from the ISO4217 space.
> This is a bug.  How were these transactions created?  You should
> never have a transaction with a non-currency "common currency".

Given your answer, I went to look more closely at these transactions,
and I believe both were created using "Stock Split..." in the
"Actions" menu (GnuCash 2.4.11 on Linux). Many other "Stock Split..."
were entered in that particular file which did not end up having an
improper currency though, only these two.

Incidentally, one of the faulty transaction was giving me trouble
while I was trying to fix it, as seen here:
(I had to delete and re-create it), and now I understand this is quite
probably because of the currency problem.

Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/


More information about the gnucash-devel mailing list