Lines 506-511
sub CanItemBeReserved {
Link Here
|
506 |
$reservecount = $rowcount->{count}; |
506 |
$reservecount = $rowcount->{count}; |
507 |
} |
507 |
} |
508 |
|
508 |
|
|
|
509 |
warn $allowedreserves; |
509 |
# we check if it's ok or not |
510 |
# we check if it's ok or not |
510 |
if ( defined $allowedreserves && $allowedreserves ne '' ){ |
511 |
if ( defined $allowedreserves && $allowedreserves ne '' ){ |
511 |
if( $allowedreserves == 0 ){ |
512 |
if( $allowedreserves == 0 ){ |
Lines 566-571
sub CanItemBeReserved {
Link Here
|
566 |
} |
567 |
} |
567 |
} |
568 |
} |
568 |
|
569 |
|
|
|
570 |
warn $pickup_branchcode; |
569 |
if ($pickup_branchcode) { |
571 |
if ($pickup_branchcode) { |
570 |
my $destination = Koha::Libraries->find({ |
572 |
my $destination = Koha::Libraries->find({ |
571 |
branchcode => $pickup_branchcode, |
573 |
branchcode => $pickup_branchcode, |
Lines 913-918
sub CheckReserves {
Link Here
|
913 |
next if ( ($hold_fulfillment_policy eq 'homebranch') && ($res->{branchcode} ne $item->$hold_fulfillment_policy) ); |
915 |
next if ( ($hold_fulfillment_policy eq 'homebranch') && ($res->{branchcode} ne $item->$hold_fulfillment_policy) ); |
914 |
next if ( ($hold_fulfillment_policy eq 'holdingbranch') && ($res->{branchcode} ne $item->$hold_fulfillment_policy) ); |
916 |
next if ( ($hold_fulfillment_policy eq 'holdingbranch') && ($res->{branchcode} ne $item->$hold_fulfillment_policy) ); |
915 |
next unless $item->can_be_transferred( { to => Koha::Libraries->find( $res->{branchcode} ) } ); |
917 |
next unless $item->can_be_transferred( { to => Koha::Libraries->find( $res->{branchcode} ) } ); |
|
|
918 |
next if (CanItemBeReserved( $res->{borrowernumber}, $item->itemnumber, $res->{branchcode}, { ignore_hold_counts => 1 } )->{status} ne 'OK'); |
916 |
$priority = $res->{'priority'}; |
919 |
$priority = $res->{'priority'}; |
917 |
$highest = $res; |
920 |
$highest = $res; |
918 |
last if $local_hold_match; |
921 |
last if $local_hold_match; |
919 |
- |
|
|