|
Lines 385-390
sub CanItemBeReserved {
Link Here
|
| 385 |
my $ruleitemtype; # itemtype of the matching issuing rule |
385 |
my $ruleitemtype; # itemtype of the matching issuing rule |
| 386 |
my $allowedreserves = 0; # Total number of holds allowed across all records, default to none |
386 |
my $allowedreserves = 0; # Total number of holds allowed across all records, default to none |
| 387 |
|
387 |
|
|
|
388 |
# We check item branch if IndependentBranches is ON |
| 389 |
# and canreservefromotherbranches is OFF |
| 390 |
if ( C4::Context->preference('IndependentBranches') |
| 391 |
and !C4::Context->preference('canreservefromotherbranches') ) |
| 392 |
{ |
| 393 |
if ( $item->homebranch ne $patron->branchcode ) { |
| 394 |
return { status => 'cannotReserveFromOtherBranches' }; |
| 395 |
} |
| 396 |
} |
| 397 |
|
| 388 |
# we retrieve borrowers and items informations # |
398 |
# we retrieve borrowers and items informations # |
| 389 |
# item->{itype} will come for biblioitems if necessery |
399 |
# item->{itype} will come for biblioitems if necessery |
| 390 |
my $biblio = $item->biblio; |
400 |
my $biblio = $item->biblio; |
|
Lines 554-569
sub CanItemBeReserved {
Link Here
|
| 554 |
} |
564 |
} |
| 555 |
} |
565 |
} |
| 556 |
|
566 |
|
| 557 |
# If reservecount is ok, we check item branch if IndependentBranches is ON |
|
|
| 558 |
# and canreservefromotherbranches is OFF |
| 559 |
if ( C4::Context->preference('IndependentBranches') |
| 560 |
and !C4::Context->preference('canreservefromotherbranches') ) |
| 561 |
{ |
| 562 |
if ( $item->homebranch ne $patron->branchcode ) { |
| 563 |
return { status => 'cannotReserveFromOtherBranches' }; |
| 564 |
} |
| 565 |
} |
| 566 |
|
| 567 |
if ($pickup_branchcode) { |
567 |
if ($pickup_branchcode) { |
| 568 |
my $destination = Koha::Libraries->find({ |
568 |
my $destination = Koha::Libraries->find({ |
| 569 |
branchcode => $pickup_branchcode, |
569 |
branchcode => $pickup_branchcode, |
| 570 |
- |
|
|