From 29edd3797a7c950664ebc3be272ad4dca2575a80 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 27 Nov 2012 11:16:14 -0500 Subject: [PATCH] Bug 7110: Renewal messages no longer displays in OPAC if OpacRenewalAllowed is disabled Prior to this patch, if a patron has fines which exceed the limit set by OPACFineNoRenewals but OPAC renewals are disallowed by OpacRenewalAllowed, a message was displayed in their OPAC summary like this: "Please note: You currently owe XXX in fines. Please pay your fines if you wish to renew your books." Information about outstanding fines in this case has no bearing on how the user sees his summary of checkouts; since the user cannot renew the loans from the OPAC regardless of their fine balance if OpacRenewalAllowed is not enabled, this patch removes the message. To test, try various combinations of OpacRenewalAllowed and OPACFineNoRenewals with a patron who has outstanding fines: - OpacRenewalAllowed ON and OPACFineNoRenewals ON (set to be triggered by the test patron's fines): Logging in to the OPAC the patron should see a warning on opac-user.pl about not being able to renew items because of fines. - OpacRenewalAllowed ON and OPACFineNoRenewals OFF (threshold high enough not to trigger a block): No warning appears. - OpacRenewalAllowed OFF and OPACFineNoRenewals ON: No warning appears. - OpacRenewalAllowed OFF and OPACFineNoRenewals OFF: No warning appears. If OpacRenewalAllowed is diabled and a patron's fines exceed the limit set by OPACFineNoRenewals they should see no message. Signed-off-by: Chris Cormack Signed-off-by: Kyle M Hall Passes koha-ql.pl and perlcritic Signed-off-by: Galen Charlton --- koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt | 2 -- opac/opac-user.pl | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt index 9ec4891990..41ab539151 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt @@ -112,8 +112,6 @@ $.tablesorter.addParser({ [% END %] [% IF ( renewal_blocked_fines ) && ( OpacRenewalAllowed ) %]
  • Please note: Since you have [% IF renewal_blocked_fines != "0.00" %] more than [% renewal_blocked_fines %] in [% END %] fines, you cannot renew your books online. Please pay your fines if you wish to renew your books.
  • - [% ELSIF ( renewal_blocked_fines ) %] -
  • Please note: You currently owe [% renewal_blocked_fines_amountoutstanding %] in fines. Please pay your fines if you wish to renew your books.
  • [% END %] [% END %] diff --git a/opac/opac-user.pl b/opac/opac-user.pl index 7b2f25eac7..5c01ae2b6c 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -105,7 +105,7 @@ if ( 5 >= $borr->{'amountoutstanding'} && $borr->{'amountoutstanding'} > 0 ) { my $no_renewal_amt = C4::Context->preference( 'OPACFineNoRenewals' ); $no_renewal_amt ||= 0; -if ( $borr->{amountoutstanding} > $no_renewal_amt ) { +if ( C4::Context->preference( 'OpacRenewalAllowed' ) && $borr->{amountoutstanding} > $no_renewal_amt ) { $borr->{'flagged'} = 1; $canrenew = 0; $template->param( -- 2.39.5