2.16. currency
2.16.1. Summary
Parameters: convert noformat
Positional parameters in same order.
Pass attribute hash as last to subroutine: no
Interpolates container text by default>.
This is a container tag, i.e. [currency] FOO [/currency]. Nesting: NO
Invalidates cache: no
Called Routine:
ASP-like Perl call:
$Tag->currency( { convert => VALUE, noformat => VALUE, }, BODY ) OR $Tag->currency($convert, $noformat, $BODY);
2.16.2. Description
When passed a value of a single number, formats it according to the currency specification. For instance:
[currency]4[/currency]
will display:
4.00
or something else depending on the Locale and PriceCommas settings. It can contain a [calc] region. If the optional "convert" parameter is set, it will convert the value according to PriceDivide> for the current locale. If Locale is set to fr_FR, and PriceDivide for fr_FR is 0.167, the following sequence
[currency convert=1] [calc] 500.00 + 1000.00 [/calc] [/currency]
will cause the number 8.982,04 to be displayed.