@@ -, +, @@ --- C4/Reserves.pm | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) --- a/C4/Reserves.pm +++ a/C4/Reserves.pm @@ -385,6 +385,16 @@ sub CanItemBeReserved { my $ruleitemtype; # itemtype of the matching issuing rule my $allowedreserves = 0; # Total number of holds allowed across all records, default to none + # We check item branch if IndependentBranches is ON + # and canreservefromotherbranches is OFF + if ( C4::Context->preference('IndependentBranches') + and !C4::Context->preference('canreservefromotherbranches') ) + { + if ( $item->homebranch ne $patron->branchcode ) { + return { status => 'cannotReserveFromOtherBranches' }; + } + } + # we retrieve borrowers and items informations # # item->{itype} will come for biblioitems if necessery my $biblio = $item->biblio; @@ -554,16 +564,6 @@ sub CanItemBeReserved { } } - # If reservecount is ok, we check item branch if IndependentBranches is ON - # and canreservefromotherbranches is OFF - if ( C4::Context->preference('IndependentBranches') - and !C4::Context->preference('canreservefromotherbranches') ) - { - if ( $item->homebranch ne $patron->branchcode ) { - return { status => 'cannotReserveFromOtherBranches' }; - } - } - if ($pickup_branchcode) { my $destination = Koha::Libraries->find({ branchcode => $pickup_branchcode, --