Lines 741-747
sub CheckReserves {
Link Here
|
741 |
return if ( $damaged && !C4::Context->preference('AllowHoldsOnDamagedItems') ); |
741 |
return if ( $damaged && !C4::Context->preference('AllowHoldsOnDamagedItems') ); |
742 |
|
742 |
|
743 |
return unless $itemnumber; # bail if we got nothing. |
743 |
return unless $itemnumber; # bail if we got nothing. |
744 |
|
|
|
745 |
# if item is not for loan it cannot be reserved either..... |
744 |
# if item is not for loan it cannot be reserved either..... |
746 |
# except where items.notforloan < 0 : This indicates the item is holdable. |
745 |
# except where items.notforloan < 0 : This indicates the item is holdable. |
747 |
return if ( $notforloan_per_item > 0 ) or $notforloan_per_itemtype; |
746 |
return if ( $notforloan_per_item > 0 ) or $notforloan_per_itemtype; |
Lines 761-766
sub CheckReserves {
Link Here
|
761 |
|
760 |
|
762 |
my $priority = 10000000; |
761 |
my $priority = 10000000; |
763 |
foreach my $res (@reserves) { |
762 |
foreach my $res (@reserves) { |
|
|
763 |
|
764 |
#Before allocating to bib-level hold check if reserve respects hold rule, i.e. can patron category/item type combination allow reserves |
765 |
my $checkreserve = Koha::Hold->check_if_existing_hold_matches_issuingrules( $res->{'borrowernumber'}, $itemnumber ); |
766 |
next unless ($checkreserve eq 'OK'); |
767 |
|
764 |
if ( $res->{'itemnumber'} == $itemnumber && $res->{'priority'} == 0) { |
768 |
if ( $res->{'itemnumber'} == $itemnumber && $res->{'priority'} == 0) { |
765 |
if ($res->{'found'} eq 'W') { |
769 |
if ($res->{'found'} eq 'W') { |
766 |
return ( "Waiting", $res, \@reserves ); # Found it, it is waiting |
770 |
return ( "Waiting", $res, \@reserves ); # Found it, it is waiting |