On Wednesday, March 20th, 2024 at 04:08, J. A. Harris <prod...@harrisja.us> 
wrote:
> 
> Looking at the replies with a long view, to me they are supporting the
> idea of extending gnucash so it supports creating new currencies. Yes,
> one can use existing currencies or create new
> FUNDs/NYSEs/NEWNAMESPACEs. But it appeared there was a consensus that
> those workarounds were a less than ideal kludgy solution. (I have been
> repurposing currencies and do not know how many times I have had to stop
> and figure out what "XTS", "XXX" or "AMD" actually represented.

According to the ISO standard defining alpha codes and numeric codes for 
the representation for currencies, ISO 4217, at least as documented at 
this Wikipedia page (can never recall which ISO standards you have to 
pay to get from the ISO, hence falling back to Wikipedia)

  https://en.wikipedia.org/wiki/ISO_4217

  "The code XTS is reserved for use in testing."

  "The code XXX is used to denote a "transaction" involving no currency."

so those two actually have a defined meaning?

> Certainly any report I generate will be confusing to anyone who will not
> know how I am using those currencies.) 

Presumably, people wouldn't be expecting to see you reporting on

AMD     051     2       Armenian dram

if you weren't known to be conducting tranasactions in that currency, 
and so readers would rightly expect to see some additional definition 
on the report?

Of course, if you really want to consistently use AMD for something 
other than the Armenian dram, then you could download the source; 
edit this file

./libgnucash/engine/iso-4217-currencies.xml

so as to have this stanza

<currency
  isocode="AMD"
  fullname="Armenian Dram"
  unitname="dram"
  partname="Luma"
  namespace="ISO4217"
  exchange-code="051"
  parts-per-unit="100"
  smallest-fraction="100"
  local-symbol="<D5><A4><D6><80>."
/>

contain the info you want, and compile your own Gnucash, complete
with whatever "currencies" you want to be in it.

FWIW, the notes in that file do mention that it

 "... is not currently used at runtime.  It's used to generate
  the contents of iso-4217-currencies.c."

so perhaps at some point in the future, there will be a 
way to load "currencies" from an XML file at runtime.

As to whether you could add your own stanzas to that file and
have a custom Gnucash compile against it, you'ld need to check 
to see if the internal arrays are pre-sized, or generated by 
the number of stanzas seen in the XML file when it's processed.

Either way, it sounds do-able.

HTH


_______________________________________________
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.

Reply via email to