Looking with Katrin at the default configuration of Number::Format, she
has the p_cs_precedes value set to 0 (put the symbol at the end) and
p_sep_by_sep set to 1.
Now it is possible to sent these values to the format subroutine.
On this way, the tests can force them in order to pass on all configuration.
This default value for this variable certainly depends on the locales.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This patch introduces a new module to manage prices into Koha and
especially the acquisition module.
How to use is:
1/ You can use it in a perl script/module:
my $price = Koha::Number::Price->new(3);
$price->format; # Will display 3.00 (or 3,00 depending on the CurrencyFormat syspref).
$price->format({with_symbol => 1}); # Will display €3.00 (or [$]3,00 depending on the CurrencyFormat syspref).
2/ But this module is usefull to display the price from a template file.
[% my_price | Price %]
Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>