From 31597400e68d32f8fdffda96f0a8a3727588861b Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Sat, 12 Jan 2019 09:21:38 +0100 Subject: [PATCH] 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 Signed-off-by: Mikael Olangcay Brisebois Signed-off-by: Josef Moravec Signed-off-by: Nick Clemens (cherry picked from commit 4f0618a8888dff72b15dfe9193259c1bc5d06b5f) Signed-off-by: Martin Renvoize (cherry picked from commit b8527c5057ddac6f956d102efa27ef95cd5d3051) Signed-off-by: Lucas Gass (cherry picked from commit 9880c7d852358cdabaa37348dd67af57613a53e7) Signed-off-by: Fridolin Somers --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt | 4 ++-- opac/opac-reserve.pl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt index 5c87434292..47afd71cb4 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt @@ -129,9 +129,9 @@ [% IF (RESERVE_CHARGE) %]
[% IF Koha.Preference('HoldFeeMode') == 'any_time_is_collected' %] - You will be charged a hold fee of [% RESERVE_CHARGE %] 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 %] for placing this hold + You will be charged a hold fee of [% RESERVE_CHARGE | $Price %] for placing this hold [% END %]
[% END %] diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl index fa1c2883bf..39c9191d76 100755 --- a/opac/opac-reserve.pl +++ b/opac/opac-reserve.pl @@ -100,7 +100,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 } }; -- 2.39.5