Bugzilla – Attachment 62077 Details for
Bug 18321
One more checkouts possible than allowed by rules
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18321: Correctly calculate switch_onsite_checkout
Bug-18321-Correctly-calculate-switchonsitecheckout.patch (text/plain), 1.95 KB, created by
Nick Clemens (kidclamp)
on 2017-04-12 10:58:24 UTC
(
hide
)
Description:
Bug 18321: Correctly calculate switch_onsite_checkout
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2017-04-12 10:58:24 UTC
Size:
1.95 KB
patch
obsolete
>From c93eb9293437ed69974f37f40b667ebc7a8a8ccf Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 31 Mar 2017 00:24:09 -0300 >Subject: [PATCH] Bug 18321: Correctly calculate switch_onsite_checkout >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Silly error here, the $switch_onsite_checkout is not correctly >calculated, it should not only be set to the value of the syspref, but >meet all the conditions. > >Test plan: >Set a circ rule with number of on-site checkout = 2 and number of >checkouts = 2. >Switch on both ConsiderOnSiteCheckoutsAsNormalCheckouts and SwitchOnSiteCheckouts > >Do a regular checkout >Do another regular checkout >At this point you have reach the maximum number of checkouts allowed. >Not try another one. >=> Without this patch you will not get the warning >=> With this patch you will see it > >Followed test plan, works as expected. >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > C4/Circulation.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 069859d..e71600d 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -830,11 +830,11 @@ sub CanBookBeIssued { > > # JB34 CHECKS IF BORROWERS DON'T HAVE ISSUE TOO MANY BOOKS > # >- my $switch_onsite_checkout = >+ my $switch_onsite_checkout = ( > C4::Context->preference('SwitchOnSiteCheckouts') > and $issue->{onsite_checkout} > and $issue >- and $issue->{borrowernumber} == $borrower->{'borrowernumber'} ? 1 : 0; >+ and $issue->{borrowernumber} == $borrower->{'borrowernumber'} ? 1 : 0 ); > my $toomany = TooMany( $borrower, $item->{biblionumber}, $item, { onsite_checkout => $onsite_checkout, switch_onsite_checkout => $switch_onsite_checkout, } ); > # if TooMany max_allowed returns 0 the user doesn't have permission to check out this book > if ( $toomany ) { >-- >2.1.4
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 18321
:
61588
|
61646
|
61759
|
61760
|
61770
|
61771
|
62076
| 62077