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

(-)a/C4/Reserves.pm (-3 / +2 lines)
Lines 173-181 sub AddReserve { Link Here
173
    # if we have an item selectionned, and the pickup branch is the same as the holdingbranch
173
    # if we have an item selectionned, and the pickup branch is the same as the holdingbranch
174
    # of the document, we force the value $priority and $found .
174
    # of the document, we force the value $priority and $found .
175
    if ( $checkitem and not C4::Context->preference('ReservesNeedReturns') ) {
175
    if ( $checkitem and not C4::Context->preference('ReservesNeedReturns') ) {
176
        $priority = 0;
177
        my $item = Koha::Items->find( $checkitem ); # FIXME Prevent bad calls
176
        my $item = Koha::Items->find( $checkitem ); # FIXME Prevent bad calls
178
        if ( $item->holdingbranch eq $branch ) {
177
        if ( !$item->onloan && $item->holdingbranch eq $branch && ( $item->damaged && C4::Context->preference('AllowHoldsOnDamagedItems') || !$item->damaged ) && !$item->get_transfer && !$item->holds->count ) {
178
            $priority = 0;
179
            $found = 'W';
179
            $found = 'W';
180
        }
180
        }
181
    }
181
    }
182
- 

Return to bug 23964