Lines 1369-1375
sub IsAvailableForItemLevelRequest {
Link Here
|
1369 |
|
1369 |
|
1370 |
if ( $on_shelf_holds == 1 ) { |
1370 |
if ( $on_shelf_holds == 1 ) { |
1371 |
return 1; |
1371 |
return 1; |
1372 |
} elsif ( $on_shelf_holds == 2 ) { |
1372 |
} elsif ( $on_shelf_holds == 2 && $patron) { |
1373 |
|
1373 |
|
1374 |
# These calculations work at the biblio level, and can be expensive |
1374 |
# These calculations work at the biblio level, and can be expensive |
1375 |
# we use the in-memory cache to avoid calling once per item when looping items on a biblio |
1375 |
# we use the in-memory cache to avoid calling once per item when looping items on a biblio |
Lines 1424-1430
sub ItemsAnyAvailableAndNotRestricted {
Link Here
|
1424 |
|| Koha::ItemTypes->find( $i->effective_itemtype() )->notforloan |
1424 |
|| Koha::ItemTypes->find( $i->effective_itemtype() )->notforloan |
1425 |
|| $branchitemrule->{holdallowed} eq 'from_home_library' && $param->{patron}->branchcode ne $i->homebranch |
1425 |
|| $branchitemrule->{holdallowed} eq 'from_home_library' && $param->{patron}->branchcode ne $i->homebranch |
1426 |
|| $branchitemrule->{holdallowed} eq 'from_local_hold_group' && ! $item_library->validate_hold_sibling( { branchcode => $param->{patron}->branchcode } ) |
1426 |
|| $branchitemrule->{holdallowed} eq 'from_local_hold_group' && ! $item_library->validate_hold_sibling( { branchcode => $param->{patron}->branchcode } ) |
1427 |
|| CanItemBeReserved( $param->{patron}, $i )->{status} ne 'OK'; |
1427 |
|| $param->{patron} && CanItemBeReserved( $param->{patron}, $i )->{status} ne 'OK'; |
1428 |
} |
1428 |
} |
1429 |
|
1429 |
|
1430 |
return 0; |
1430 |
return 0; |