[ic] Currencies and PayPal
Stefan Hornburg
interchange-users@icdevgroup.org
Fri Jan 17 18:30:01 2003
On Fri, 17 Jan 2003 23:45:26 +0100
Paco Sánchez <lists@e-civitas.com> wrote:
>
> >
> > Did you try with
> >
> > [tmp noformat_cost][total-cost noformat=1][/tmp]
> >
>
> Hello Joachim, thanks for your reply.
>
> Bases on your suggestion I have developed the following formula:
>
> [tmp noformat_cost][calc](int([total-cost
> noformat=1]*100)+1)/100[/calc][/tmp]
>
> Since your original idea results in a number with several decima places when
> changing currencies (for example 14.493284543), I have done this to cut
> decimals to only two (14.49 in the example). However, there is still a
> problem with this. Sometimes, if, say, you get something like 14.70, it is
> shown as 14.7, which results in a failure at the Paypal page, as they
> require two decimals formatting. Any ideas on how to resolve this?
[calc]sprintf('%.2f', [total-cost noformat=1]);[/calc]
Ciao
Racke