[ic] Small usertag problem

Stefano Nota interchange-users@interchange.redhat.com
Mon Sep 10 09:01:00 2001


You don't need to do that.

Set price divide in the locale settings will make easy to convert  euro to
franc

Look at the doc

Hi stefano
----- Original Message -----
From: "David Bordas" <bordas@jeuxvideo.com>
To: <interchange-users@interchange.redhat.com>
Sent: Monday, September 10, 2001 2:47 PM
Subject: [ic] Small usertag problem


> Hi,
>
> I have a little usertag define in catalog.cfg like this :
>
> ######
> ## Conversion EURO
> ####
> UserTag franc HasEndTag
> UserTag franc Interpolate
> UserTag franc Routine <<EOR
>
> sub {
>  my($dm_betrag)=@_;
>  my $euro_betrag = $dm_betrag * 6.55957;
>  $euro_betrag = sprintf("%.2f", $euro_betrag);
>  $euro_betrag =~ s/\./,/g;
>  return $euro_betrag;
> }
> EOR
>
> i'm using it to convert Euro to FF.
> But sometimes IC make mistakes like
> 12 Euro = 72 FF
> in fact :
> 12 Euro = 78,71484 or 78,71 FF
>
> Seem to work after a reboot of IC and a reload of the web page.
>
> I reboot now again but always have the problem.
>
> I use the usertag like this :
> <TD ALIGN=RIGHT>[item-subtotal] [franc][calc][item-subtotal
> noformat=1][/calc][/franc] FF</TD>
>
> for exemple.
>
> I have perl 5.6.1 and IC 4.8.1.
> I upgrade perl this morning from 5.00 to 5.6.1 and re-install all modules.
> But don't think it come to perl because the problem already occurs with
perl
> 5.0.
>
> I hope you can understand me.
>
> Thanks
>
>
> _______________________________________________
> interchange-users mailing list
> interchange-users@interchange.redhat.com
> http://interchange.redhat.com/mailman/listinfo/interchange-users
>