Bugzilla – Attachment 19701 Details for
Bug 2394
canreservefromotherbranches preference not working
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] [3.12.x] Bug 2394: Use syspref canreservefromotherbranches in CanItemBeReserved
Bug-2394-Use-syspref-canreservefromotherbranches-i.patch (text/plain), 1.26 KB, created by
Srdjan Jankovic
on 2013-07-17 00:11:03 UTC
(
hide
)
Description:
[SIGNED-OFF] [3.12.x] Bug 2394: Use syspref canreservefromotherbranches in CanItemBeReserved
Filename:
MIME Type:
Creator:
Srdjan Jankovic
Created:
2013-07-17 00:11:03 UTC
Size:
1.26 KB
patch
obsolete
>From 4f1be17f39ff1e7e905c22cfc57e4a4ced4e1b64 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Tue, 9 Jul 2013 11:48:23 +0200 >Subject: [PATCH] Bug 2394: Use syspref canreservefromotherbranches in > CanItemBeReserved > >Signed-off-by: Srdjan <srdjan@catalyst.net.nz> >--- > C4/Reserves.pm | 17 ++++++++++++++--- > 1 file changed, 14 insertions(+), 3 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index c8b0cdd..87ffaff 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -491,11 +491,22 @@ sub CanItemBeReserved{ > } > > # we check if it's ok or not >- if( $reservecount < $allowedreserves ){ >- return 1; >- }else{ >+ if( $reservecount >= $allowedreserves ){ > return 0; > } >+ >+ # If reservecount is ok, we check item branch if IndependantBranches is ON >+ # and canreservefromotherbranches is OFF >+ if ( C4::Context->preference('IndependantBranches') >+ and !C4::Context->preference('canreservefromotherbranches') ) >+ { >+ my $itembranch = $item->{homebranch}; >+ if ($itembranch ne $borrower->{branchcode}) { >+ return 0; >+ } >+ } >+ >+ return 1; > } > #-------------------------------------------------------------------------------- > =head2 GetReserveCount >-- >1.8.1.2
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 2394
:
19498
|
19513
|
19544
|
19545
|
19700
|
19701
|
20222
|
20223