Lines 2857-2863
sub CanBookBeRenewed {
Link Here
|
2857 |
for my $borrowernumber (@borrowernumbers) { |
2857 |
for my $borrowernumber (@borrowernumbers) { |
2858 |
my $patron = $patrons{$borrowernumber} //= Koha::Patrons->find( $borrowernumber ); |
2858 |
my $patron = $patrons{$borrowernumber} //= Koha::Patrons->find( $borrowernumber ); |
2859 |
next unless IsAvailableForItemLevelRequest($item, $patron); |
2859 |
next unless IsAvailableForItemLevelRequest($item, $patron); |
2860 |
next unless CanItemBeReserved($borrowernumber,$itemnumber); |
2860 |
my $can_reserve = CanItemBeReserved($borrowernumber,$itemnumber); |
|
|
2861 |
# Allowing tooMany* and itemAlreadyOnHold because we need to ignore the count for existing holds. |
2862 |
my @allowed_statuses = ( |
2863 |
'OK', |
2864 |
'tooManyReserves', |
2865 |
'tooManyHoldsForThisRecord', |
2866 |
'tooManyReservesToday', |
2867 |
'itemAlreadyOnHold' |
2868 |
); |
2869 |
next unless grep { $_ eq $can_reserve->{status} } @allowed_statuses; |
2861 |
|
2870 |
|
2862 |
push @reservable, $itemnumber; |
2871 |
push @reservable, $itemnumber; |
2863 |
if (@reservable >= @borrowernumbers) { |
2872 |
if (@reservable >= @borrowernumbers) { |
2864 |
- |
|
|