@@ -, +, @@
OpacRenewalAllowed is disabled
- log into the OPAC and verify the message that renewals are disallowed is displayed
- verify that renewals are disallowed in the interface.
- remove or pay the fines, verify the message goes away and that OPAC renewals are re-allowed for your patron.
- verify the message is not shown, even with the patron's fines over the threshold in OPACFineNoRenewals.
- remove or pay the fines, verify that renewals are still disallowed
---
koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt | 13 +++++++------
opac/opac-user.pl | 2 +-
2 files changed, 8 insertions(+), 7 deletions(-)
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt
+++ a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt
@@ -92,12 +92,13 @@ $.tablesorter.addParser({
[% IF ( BORROWER_INF.lost ) %]
Please note: Your library card has been marked as lost or stolen. If this is an error, please contact the library.
[% END %]
- [% IF renewal_blocked_fines %]
- Please note: Since you have more than [% renewal_blocked_fines %] in fines, you cannot renew your books online. Please pay your fines if you wish to renew your books.
- [% END %]
-
- [% END %]
-
+ [% IF ( renewal_blocked_fines ) && ( OpacRenewalAllowed ) %]
+ Please note: Since you have more than [% renewal_blocked_fines %] in fines, you cannot renew your books online. Please pay your fines if you wish to renew your books.
+ [% ELSE %]
+ Please note: You have more than [% renewal_blocked_fines %] in fines.
+ [% END %]
+
+ [% END %]
- Checked Out
--- a/opac/opac-user.pl
+++ a/opac/opac-user.pl
@@ -82,7 +82,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 ( $borr->{amountoutstanding} > $no_renewal_amt && C4::Context->preference("OpacRenewalAllowed")) {
$borr->{'flagged'} = 1;
$template->param(
renewal_blocked_fines => sprintf( '%.02f', $no_renewal_amt ),
--