View | Details | Raw Unified | Return to bug 24185
Collapse All | Expand All

(-)a/C4/Reserves.pm (-13 / +1 lines)
Lines 1188-1199 and canreservefromotherbranches. Link Here
1188
=cut
1188
=cut
1189
1189
1190
sub IsAvailableForItemLevelRequest {
1190
sub IsAvailableForItemLevelRequest {
1191
    my $item                = shift;
1191
    my ( $item, $patron, $pickup_branchcode ) = @_;
1192
    my $patron              = shift;
1193
    my $pickup_branchcode   = shift;
1194
    # items_any_available is precalculated status passed from request.pl when set of items
1195
    # looped outside of IsAvailableForItemLevelRequest to avoid nested loops:
1196
    my $items_any_available = shift;
1197
1192
1198
    my $dbh = C4::Context->dbh;
1193
    my $dbh = C4::Context->dbh;
1199
    # must check the notforloan setting of the itemtype
1194
    # must check the notforloan setting of the itemtype
Lines 1222-1233 sub IsAvailableForItemLevelRequest { Link Here
1222
    if ( $on_shelf_holds == 1 ) {
1217
    if ( $on_shelf_holds == 1 ) {
1223
        return 1;
1218
        return 1;
1224
    } elsif ( $on_shelf_holds == 2 ) {
1219
    } elsif ( $on_shelf_holds == 2 ) {
1225
1226
        # if we have this param predefined from outer caller sub, we just need
1227
        # to return it, so we saving from having loop inside other loop:
1228
        return  $items_any_available ? 0 : 1
1229
            if defined $items_any_available;
1230
1231
        my @items =
1220
        my @items =
1232
          Koha::Items->search( { biblionumber => $item->biblionumber } );
1221
          Koha::Items->search( { biblionumber => $item->biblionumber } );
1233
1222
1234
- 

Return to bug 24185