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

(-)a/Koha/Items.pm (-6 / +4 lines)
Lines 43-51 Koha::Items - Koha Item object set class Link Here
43
43
44
    my $filtered_items = $items->filter_by_for_hold;
44
    my $filtered_items = $items->filter_by_for_hold;
45
45
46
Return the items of the set that are *potentially* holdable
46
Return the items of the set that are *potentially* holdable.
47
47
48
Caller has the responsability to call C4::Reserves::CanItemBeReserved before
48
Caller has the responsibility to call C4::Reserves::CanItemBeReserved before
49
placing a hold on one of those items.
49
placing a hold on one of those items.
50
50
51
=cut
51
=cut
Lines 66-74 sub filter_by_for_hold { Link Here
66
        {
66
        {
67
            itemlost   => 0,
67
            itemlost   => 0,
68
            withdrawn  => 0,
68
            withdrawn  => 0,
69
            notforloan => { '<=' => 0 }
69
            notforloan => { '<=' => 0 }, # items with negative or zero notforloan value are holdable
70
            ,    # items with negative or zero notforloan value are holdable
70
            ( C4::Context->preference('AllowHoldsOnDamagedItems' ) ? () : ( damaged => 0 ) ),
71
            ( ! C4::Context->preference('AllowHoldsOnDamagedItems' ) ? ( damaged => 0 ) : () ),
72
            itype        => { -not_in => \@hold_not_allowed_itypes },
71
            itype        => { -not_in => \@hold_not_allowed_itypes },
73
        }
72
        }
74
    );
73
    );
75
- 

Return to bug 3142