Bug 22118: Format hold fee when placing holds in OPAC

When Koha charges for holds, a message with the fee is
shown before the patron places the hold. The amount needs
to be formatted according to CurrencyFormat system preference.

To test:
- Add a hold fee to your patron category
- Log into the OPAC
- Search for a record to place a hold on
- Click Place hold
- Verify there is a note showing about the hold fee
- Toggle CurrencyFormat and HoldFeeMode and verify
  that the formatting is always correct

Signed-off-by: Jack Kelliher <jke0429@stacmail.net>
Signed-off-by: Mikael Olangcay Brisebois <mikael.olangcay-brisebois@inlibro.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Katrin Fischer 2019-01-12 09:21:38 +01:00 committed by Nick Clemens
parent 495619649b
commit 4f0618a888
2 changed files with 3 additions and 3 deletions

View file

@ -135,9 +135,9 @@
[% IF (RESERVE_CHARGE) %]
<div class="alert" id="reserve_fee">
[% IF Koha.Preference('HoldFeeMode') == 'any_time_is_collected' %]
You will be charged a hold fee of [% RESERVE_CHARGE | html %] when you collect this item
You will be charged a hold fee of [% RESERVE_CHARGE | $Price %] when you collect this item
[% ELSE %]
You will be charged a hold fee of [% RESERVE_CHARGE | html %] for placing this hold
You will be charged a hold fee of [% RESERVE_CHARGE | $Price %] for placing this hold
[% END %]
</div>
[% END %]

View file

@ -101,7 +101,7 @@ if ( $patron->category->effective_BlockExpiredPatronOpacActions ) {
# Pass through any reserve charge
my $reservefee = $patron->category->reservefee;
if ( $reservefee > 0){
$template->param( RESERVE_CHARGE => sprintf("%.2f",$reservefee));
$template->param( RESERVE_CHARGE => $reservefee);
}
my $itemtypes = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search_with_localization->unblessed } };