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

(-)a/opac/opac-reserve.pl (-3 / +2 lines)
Lines 462-468 foreach my $biblioNum (@biblionumbers) { Link Here
462
    my @notforloan_avs = Koha::AuthorisedValues->search_by_koha_field({ kohafield => 'items.notforloan', frameworkcode => $frameworkcode });
462
    my @notforloan_avs = Koha::AuthorisedValues->search_by_koha_field({ kohafield => 'items.notforloan', frameworkcode => $frameworkcode });
463
    my $notforloan_label_of = { map { $_->authorised_value => $_->opac_description } @notforloan_avs };
463
    my $notforloan_label_of = { map { $_->authorised_value => $_->opac_description } @notforloan_avs };
464
464
465
    my $visible_items = { map { $_->itemnumber => 1 } $biblio->items->filter_by_visible_in_opac( { patron => $patron } )->as_list };
465
    my $visible_items = { map { $_->itemnumber => $_ } $biblio->items->filter_by_visible_in_opac( { patron => $patron } )->as_list };
466
466
467
    # Only keep the items that are visible in the opac (i.e. those in %visible_items)
467
    # Only keep the items that are visible in the opac (i.e. those in %visible_items)
468
    # FIXME: We should get rid of itemInfos altogether and use $visible_items
468
    # FIXME: We should get rid of itemInfos altogether and use $visible_items
Lines 473-479 foreach my $biblioNum (@biblionumbers) { Link Here
473
    my $numCopiesOPACAvailable = 0;
473
    my $numCopiesOPACAvailable = 0;
474
    foreach my $itemInfo (@{$biblioData->{itemInfos}}) {
474
    foreach my $itemInfo (@{$biblioData->{itemInfos}}) {
475
        my $itemNum = $itemInfo->{itemnumber};
475
        my $itemNum = $itemInfo->{itemnumber};
476
        my $item = Koha::Items->find( $itemNum );
476
        my $item = $visible_items->{$itemNum};
477
        my $itemLoopIter = {};
477
        my $itemLoopIter = {};
478
478
479
        $itemLoopIter->{itemnumber} = $itemNum;
479
        $itemLoopIter->{itemnumber} = $itemNum;
480
- 

Return to bug 15448