Bugzilla – Attachment 47793 Details for
Bug 14930
Leaving OpacFineNoRenewals blank blocks renewals, but should disable feature
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14930 [QA Followup] - Allow OpacFineNoRenewals to be 0
Bug-14930-QA-Followup---Allow-OpacFineNoRenewals-t.patch (text/plain), 1.78 KB, created by
Jonathan Druart
on 2016-02-09 11:43:13 UTC
(
hide
)
Description:
Bug 14930 [QA Followup] - Allow OpacFineNoRenewals to be 0
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-02-09 11:43:13 UTC
Size:
1.78 KB
patch
obsolete
>From 69f713d451af3ef4b4c52cbacf0aaac709fd2e29 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 28 Jan 2016 23:09:43 +0000 >Subject: [PATCH] Bug 14930 [QA Followup] - Allow OpacFineNoRenewals to be 0 >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Works as expected. >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > opac/opac-user.pl | 11 ++++++++--- > 1 file changed, 8 insertions(+), 3 deletions(-) > >diff --git a/opac/opac-user.pl b/opac/opac-user.pl >index e9529b5..8349b6f 100755 >--- a/opac/opac-user.pl >+++ b/opac/opac-user.pl >@@ -41,6 +41,7 @@ use Koha::Database; > > use constant ATTRIBUTE_SHOW_BARCODE => 'SHOW_BCODE'; > >+use Scalar::Util qw(looks_like_number); > use Date::Calc qw( > Today > Add_Delta_Days >@@ -107,14 +108,18 @@ if ( 5 >= $borr->{'amountoutstanding'} && $borr->{'amountoutstanding'} > 0 ) { > $borr->{'amountoverzero'} = 1; > } > my $no_renewal_amt = C4::Context->preference( 'OPACFineNoRenewals' ); >-$no_renewal_amt ||= undef; >+$no_renewal_amt = undef unless looks_like_number( $no_renewal_amt ); > >-if ( C4::Context->preference( 'OpacRenewalAllowed' ) && $no_renewal_amt && $borr->{amountoutstanding} > $no_renewal_amt ) { >+if ( C4::Context->preference('OpacRenewalAllowed') >+ && defined($no_renewal_amt) >+ && $borr->{amountoutstanding} > $no_renewal_amt ) >+{ > $borr->{'flagged'} = 1; > $canrenew = 0; > $template->param( > renewal_blocked_fines => sprintf( '%.02f', $no_renewal_amt ), >- renewal_blocked_fines_amountoutstanding => sprintf( '%.02f', $borr->{amountoutstanding} ), >+ renewal_blocked_fines_amountoutstanding => >+ sprintf( '%.02f', $borr->{amountoutstanding} ), > ); > } > >-- >2.1.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14930
:
46845
|
46846
|
47271
|
47466
|
47652
|
47653
|
47792
| 47793