From 156b108c3c554917dc8084c0548d4d486b246dc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20V=C3=A9ron?= Date: Tue, 21 Jun 2016 18:28:47 +0200 Subject: [PATCH] Bug 13796: OPAC: Display rental charge for renewing This patch displays the rental fee that will be applied for renewing (near "Renew" link on patron's summary page) To test: - Apply patch - Verify that you have item types with and without rental fee for testing - Issue items with an without rental fee to a patron - In OPAC, display patron's summary page - Verify in table 'Checked out', items with rental charge display an information as appropriate (near the link 'Renew') Signed-off-by: Sally Healey Signed-off-by: Jonathan Druart --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 3 +++ opac/opac-user.pl | 1 + 2 files changed, 4 insertions(+) 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 a1910f3..657236e 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -254,6 +254,9 @@ Using this account is not recommended because some parts of Koha will not functi [% IF ( ISSUE.status ) %] [% IF ( canrenew ) %] Renew + [% IF ISSUE.renewalfee > 0 %] + Fee for [% ItemTypes.GetDescription( ISSUE.renewalitemtype) %] [% ISSUE.renewalfee | $Price %] + [% END %] [% END %] ([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining) [% ELSIF ( ISSUE.too_many ) %] diff --git a/opac/opac-user.pl b/opac/opac-user.pl index 0087a6a..4b3164d 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -192,6 +192,7 @@ if ($issues){ # check if item is renewable 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 ); if($status && C4::Context->preference("OpacRenewalAllowed")){ $issue->{'status'} = $status; } -- 2.8.1