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

rhill rhill at raymondhill.net
Tue Mar 5 08:51:06 EST 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I am trying to understand as best as I can the exact meaning of all the
fields in the GnuCash file, so I can use the content of the file into an
(experimental so far) app.

I see that each transaction is set into a specific currency, this can be
seen through the <trn:currency> XML field. I would like to understand
why the field has been named "currency" as opposed to "commodity". My
understanding was that the field *had* to be set to a value which is a
subset of the commodities set, the "currency" commodities specifically
(the ones which space is "ISO4217")

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 puzzles me, especially that one of the two transactions has a split
which describes the movement of an amount in a specific ISO4217 currency
(I would have expected the <trn:currency> to be set to that currency),
and I would like for someone to really confirm that indeed, the
<trn:currency> field can refer to more than just an ISO4217 commodity,
or whether it is unexpected that it does so in only two transactions out
of over 14,000 in this particular file.


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

iQEcBAEBAgAGBQJRNfhFAAoJECXhSQt2FHDCAU4H/jT7zhSLRRkuH9d59bluRj3E
aNplGHh6lgXaQFVIsnDceK3lt1fYkUfM0cj+6w14Dnv2KxBVwzZR2xJwp/B1Bcma
gIEtJxFvi+KXDHK2ElRSkIqWeXKdKsjf4eZANI2mp5ptT1v+kgT6iv4LZ1LdYerX
g6E0aeDj3BHLCae8COdqT/MmrJuJIcnFxscboa7g1WSyCxI8AcAT55D9BYg/zkFQ
osG0LLrkxsN43HqwEAVEcLSuDu5w3AA6PBf2aCsaImCtU+F09+/t6yBUjmn9tI0n
jT/W/LZ00lw4HVbVQn/iyUnfqSdHBrxjZFDiXz/Oiw0g3/Y/cf36tefFGVC85hA=
=+bpR
-----END PGP SIGNATURE-----



More information about the gnucash-devel mailing list