On Wed, 04 Aug 1999 00:29:47 CDT, the world broke into rejoicing as
[EMAIL PROTECTED] said:
> It's been rumoured that [EMAIL PROTECTED] said:
> >
> > On Tue, 03 Aug 1999 22:40:22 EDT, the world broke into rejoicing as
> > Per Bojsen <[EMAIL PROTECTED]> said:
> > > What is GnuCash' default currency? How is it set? Is this part of
> > > your solution described or is there already a default currency?
> >
> > This is a highly relevant question, as it should be populated, by
> > default, into new accounts that get created. (*Particularly* those
> > created automatically, but that's another agenda item...)
> >
> > - Is there some equivalent to an "environment variable" that contains
> > this?
>
> Not yet.
>
> > - Is this something that can/should be set in a ~/.gnucash
> > configuration file?
>
> Yes.
>
> There is another problem that I couldn't find my way out of. Currently,
> the 'currency' is a string, which the user can set to any value.
>
> Although I recommend the use of three-letter ISO currency names, I didn't
> want to enforce this because it can also hold stock-ticker symbols
> (e.g. three-letter NYSE variety, five-letter nasdaq variety, other ...)
>
> i.e. the vision for the currency trading account was that it was a lot
> like a stock trading account, except that instead of a ticker symbol
> it would hold a three-letter iso currency abbreviation.
>
> How should this be handled? Another 'bug' is that its case-sensitive,
> so USD and usd are not the same thing, and this can lead to confusion ...
>
> Maybe I should just force the use of iso names in the GUI, and live with
> whatever loss of flexibility this causes ...
A third possibility:
Have an optional list of name options that can be reconfigured if
necessary.
(define currency-options
'(("USD" . "US Dollars")
("CDN" . "Canadian Dollars")
("UKP" . "UK Pounds")
...))
Place this list in one of the config files, probably adjacent to
(gnc:register-configuration-option
(gnc:make-configuration-option "Register"
"Default Currency"
"50-Currencies"
'string
"The currency of my primary country"
get-default-currency
set-default-currency!
(lambda () "USD")
#f
validate-currency))
as well as
(define (validate-currency inputcurr)
(if (assoc inputcurr currency-options)
#t
#f))
Given that the user has the ability to modify the list
currency-options, whether by hook or by crook, this permits ample
opportunity to configure this...
--
"Just because it's free doesn't mean you can afford it." -- Unknown
[EMAIL PROTECTED] <http://www.hex.net/~cbbrowne/lsf.html>
----- %< -------------------------------------------- >% ------
The GnuCash / X-Accountant Mailing List
To unsubscribe, send mail to [EMAIL PROTECTED] and
put "unsubscribe gnucash-devel [EMAIL PROTECTED]" in the body