SV: [ic] Problems with CALC command

Kent-Rune K.Sætrum interchange-users@icdevgroup.org
Thu Apr 24 10:51:01 2003


> > I have problems with the [calc] some calculations [/calc] commands. 
> > One example that used to work was this calculation:
> > 
> > [currency convert=1] [calc][subtotal noformat=1]*0.24/1.24[/calc] 
> > [/currency]

> What is not working? The currency tag? The calc tag? What did 
> you get? 
> I'm missing more usefull information. Make a quick test
> 
> subtotal test : [subtotal]<BR>
> subtotal noformat test : [subtotal noformat=1]<BR>
> calc test : [calc]10*0.24/1.24[/calc]<BR>
> currency test: [currency convert=1]123.45[/currency]<BR>
> 
> and last ...all in one line (without a whitespace)
> 
> [currency convert=1][calc][subtotal 
> noformat=1]*0.24/1.24[/calc][/currency]
> 
> Joachim


Thanks :) Output is like this:

Kr 0,00 subtotal test : Kr 21.646,00
subtotal noformat test : 21646
calc test : 
currency test: Kr 123,00
and last ...all in one line (without a whitespace) Kr 0,00

Meaning its the [calc] tag that is not working as it should.

I now have the following settings in the "catalog.cfg" file:

---cut---
Locale          en_NO LC_CTYPE en_NO
LocaleDatabase  locale
---cut---

I also tried these settings with no better results:

---cut---
Locale          en_NO
LocaleDatabase  locale
---cut---

---cut---
Locale          en_NO LC_CTYPE C
LocaleDatabase  locale
---cut---


In the "locale.txt" file inside the "porducts" folder I have following
settings:


---cut---

code	en_NO	en_US	fr_FR
frac_digits	2	2	2
April		April	Avril
currency_symbol	Kr 	$	FF
decimal_point	.	.	.
p_cs_precedes	1		
mon_thousands_sep	.	,	.
August		August	Aout
Februar		February	F&eacute;vrier
Juli		July	Juillet
mon_decimal_point	,	.	,
mon_thousand_sep		 	
ProductFiles			
Desember		December	D&eacute;cembre
Mai		May	Mai
p_sep_by_space			1
Oktober		October	Octobre
products		products	produits
default	1	0	0
PriceDivide	1	1	0.1632
September		September	Septembre
Januar		January	Janvier
November		November	Novembre
Juni		June	Juin
Mars		March	Mars
price_picture		Kr ### ### ###,##

---cut---


I really dont understand why the [calc] does not work. Is there anything
wrong in the locale.txt file or catalog.cfg file ?

Thanks again for all help.


Greets,
Kent-Rune K.Sætrum