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

(-)a/C4/Search.pm (-18 / +11 lines)
Lines 1939-1961 sub searchResults { Link Here
1939
                    $item_onhold_count++     if $reservestatus eq 'Waiting';
1939
                    $item_onhold_count++     if $reservestatus eq 'Waiting';
1940
                    $item->{status} = $item->{wthdrawn} . "-" . $item->{itemlost} . "-" . $item->{damaged} . "-" . $item->{notforloan};
1940
                    $item->{status} = $item->{wthdrawn} . "-" . $item->{itemlost} . "-" . $item->{damaged} . "-" . $item->{notforloan};
1941
1941
1942
                    # can place hold on item ?
1942
                    # can place a hold on a item if
1943
                    if ( !$item->{itemlost} ) {
1943
                    # not lost nor withdrawn
1944
                        if ( !$item->{wthdrawn} ){
1944
                    # not damaged unless AllowHoldsOnDamagedItems is true
1945
                            if ( $item->{damaged} ){
1945
                    # item is either for loan or on order (notforloan < 0)
1946
                                if ( C4::Context->preference('AllowHoldsOnDamagedItems') ){
1946
                    $can_place_holds = 1
1947
                                    # can place a hold on a damaged item if AllowHoldsOnDamagedItems is true
1947
                      if (
1948
                                    if ( ( !$item->{notforloan} || $item->{notforloan} < 0 ) ){
1948
                           !$item->{itemlost}
1949
                                        # item is either for loan or has notforloan < 0
1949
                        && !$item->{wthdrawn}
1950
                                        $can_place_holds = 1;
1950
                        && ( !$item->{damaged} || C4::Context->preference('AllowHoldsOnDamagedItems') )
1951
                                    }
1951
                        && ( !$item->{notforloan} || $item->{notforloan} < 0 )
1952
                                }
1952
                      );
1953
                            } elsif ( !$item->{notforloan} || $item->{notforloan} < 0 ) {
1954
                                # item is not damaged and item is either for loan or has notforloan < 0
1955
                                $can_place_holds = 1;
1956
                            }
1957
                        }
1958
                    }
1959
1953
1960
                    $other_count++;
1954
                    $other_count++;
1961
1955
1962
- 

Return to bug 10741