From 0b4e7f234ef27234d874a60e5e02df3a2b3da146 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 --- 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 7af3a0f8c8..4b7ff760eb 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 day [% 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.17.2 (Apple Git-113)