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

(-)a/C4/Search.pm (-6 / +9 lines)
Lines 2092-2102 sub searchResults { Link Here
2092
			my $prefix = $item->{$hbranch} . '--' . $item->{location} . $item->{itype} . $item->{itemcallnumber};
2092
			my $prefix = $item->{$hbranch} . '--' . $item->{location} . $item->{itype} . $item->{itemcallnumber};
2093
# For each grouping of items (onloan, available, unavailable), we build a key to store relevant info about that item
2093
# For each grouping of items (onloan, available, unavailable), we build a key to store relevant info about that item
2094
            my $userenv = C4::Context->userenv;
2094
            my $userenv = C4::Context->userenv;
2095
            if ( $item->{onloan}
2095
2096
                && $userenv
2096
            if ( $item->{onloan} ) {
2097
                && $userenv->{number}
2098
                && !( Koha::Patrons->find($userenv->{number})->category->hidelostitems && $item->{itemlost} ) )
2099
            {
2100
                $onloan_count++;
2097
                $onloan_count++;
2101
                my $key = $prefix . $item->{onloan} . $item->{barcode};
2098
                my $key = $prefix . $item->{onloan} . $item->{barcode};
2102
                $onloan_items->{$key}->{due_date} = $item->{onloan};
2099
                $onloan_items->{$key}->{due_date} = $item->{onloan};
Lines 2121-2126 sub searchResults { Link Here
2121
         # items not on loan, but still unavailable ( lost, withdrawn, damaged )
2118
         # items not on loan, but still unavailable ( lost, withdrawn, damaged )
2122
            else {
2119
            else {
2123
2120
2121
                # skip if user logged in and has hidelostitems set, and item is lost
2122
                next if ( $userenv
2123
                        && $userenv->{number}
2124
                        && Koha::Patrons->find($userenv->{number})->category->hidelostitems
2125
                        && $item->{itemlost}
2126
                }
2127
2124
                $item->{notforloan}=1 if !$item->{notforloan}  && $itemtypes{ C4::Context->preference("item-level_itypes")? $item->{itype}: $oldbiblio->{itemtype} }->{notforloan};
2128
                $item->{notforloan}=1 if !$item->{notforloan}  && $itemtypes{ C4::Context->preference("item-level_itypes")? $item->{itype}: $oldbiblio->{itemtype} }->{notforloan};
2125
2129
2126
                # item is on order
2130
                # item is on order
2127
- 

Return to bug 19870