From 2b86e9659d5b1446fc5658f1f80bd5a21f2017a5 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 25 Feb 2019 11:04:15 -0500 Subject: [PATCH] Bug 20912: (QA follow-up) Warn patron of daily and hourly renewal fees Signed-off-by: Martin Renvoize Signed-off-by: Nick Clemens --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 8 +++++++- opac/opac-user.pl | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt index 1256bf62b3..7c55d8d86b 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -295,7 +295,13 @@ Renew [% END %] [% IF ISSUE.renewalfee > 0 %] - Fee for item type '[% ItemTypes.GetDescription( ISSUE.renewalitemtype) | html %]': [% ISSUE.renewalfee | $Price %] + Fee for item type '[% ItemTypes.GetDescription( ISSUE.renewalitemtype) | html %]': [% ISSUE.renewalfee | $Price %] + [% END %] + [% IF ISSUE.itemtype_object.rentalcharge_daily > 0 %] + [% ISSUE.itemtype_object.rentalcharge_daily | $Price %] per day + [% END %] + [% IF ISSUE.itemtype_object.rentalcharge_hourly > 0 %] + [% ISSUE.itemtype_object.rentalcharge_hourly | $Price %] per hour [% END %] ([% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining) [% ELSIF ( ISSUE.on_reserve ) %] diff --git a/opac/opac-user.pl b/opac/opac-user.pl index d3ff888848..1fde24b538 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -222,6 +222,7 @@ if ( $pending_checkouts->count ) { # Useless test my ($status,$renewerror) = CanBookBeRenewed( $borrowernumber, $issue->{'itemnumber'} ); ($issue->{'renewcount'},$issue->{'renewsallowed'},$issue->{'renewsleft'}) = GetRenewCount($borrowernumber, $issue->{'itemnumber'}); ( $issue->{'renewalfee'}, $issue->{'renewalitemtype'} ) = GetIssuingCharges( $issue->{'itemnumber'}, $borrowernumber ); + $issue->{itemtype_object} = Koha::ItemTypes->find( Koha::Items->find( $issue->{itemnumber} )->effective_itemtype ); if($status && C4::Context->preference("OpacRenewalAllowed")){ $issue->{'status'} = $status; } -- 2.39.5