Bug 14930 - Leaving OpacFineNoRenewals blank blocks renewals, but should disable feature
To Test - Borrower has some fines and checkouts - Leave OPACFineNoRenewals empty/blank - Try to renew items in the OPAC - notice error message - Add a big value to OpacFineNoRenewals - notice renewals work Leaving the OPACFineNoRenewals empty will disable the feature. Patch works as expected.(Amended to format the commit message and to remove a warn on line 112 / MV) Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com (cherry picked from commit47e78f5c29) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> (cherry picked from commitf02054cfcd) Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
This commit is contained in:
parent
00211efcc4
commit
99d2b99927
|
|
@ -108,9 +108,9 @@ if ( 5 >= $borr->{'amountoutstanding'} && $borr->{'amountoutstanding'} > 0 ) {
|
|||
$borr->{'amountoverzero'} = 1;
|
||||
}
|
||||
my $no_renewal_amt = C4::Context->preference( 'OPACFineNoRenewals' );
|
||||
$no_renewal_amt ||= 0;
|
||||
$no_renewal_amt ||= undef;
|
||||
|
||||
if ( C4::Context->preference( 'OpacRenewalAllowed' ) && $borr->{amountoutstanding} > $no_renewal_amt ) {
|
||||
if ( C4::Context->preference( 'OpacRenewalAllowed' ) && $no_renewal_amt && $borr->{amountoutstanding} > $no_renewal_amt ) {
|
||||
$borr->{'flagged'} = 1;
|
||||
$canrenew = 0;
|
||||
$template->param(
|
||||
|
|
|
|||
Loading…
Reference in New Issue