]> git.koha-community.org Git - koha.git/commit
Bug 12844: New module to manage prices into Koha
authorJonathan Druart <jonathan.druart@biblibre.com>
Thu, 28 Aug 2014 14:19:17 +0000 (16:19 +0200)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Mon, 27 Oct 2014 15:56:18 +0000 (12:56 -0300)
commite6d1d8727b609bc85e8f4275e00820af81ee6907
treeb8865c046a6c160f2863e78e511069442b512a3c
parentdd325738d65551c09504ebd21bcfc37d368cdecb
Bug 12844: New module to manage prices into Koha

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>
Koha/Number/Price.pm [new file with mode: 0644]
Koha/Template/Plugin/Price.pm [new file with mode: 0644]
t/Number/Price.t [new file with mode: 0644]