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

(-)a/C4/Circulation.pm (-6 / +15 lines)
Lines 2154-2164 sub AddReturn { Link Here
2154
            warn "Unable to parse UpdateNotForLoanStatusOnCheckin syspref : $@";
2154
            warn "Unable to parse UpdateNotForLoanStatusOnCheckin syspref : $@";
2155
        }
2155
        }
2156
        else {
2156
        else {
2157
            foreach my $key ( keys %$rules ) {
2157
            if ( defined $rules->{$item->itype} ) {
2158
                if ( $item->notforloan eq $key ) {
2158
                foreach my $notloan_rule_key (keys %{ $rules->{$item->itype}} ) {
2159
                    $messages->{'NotForLoanStatusUpdated'} = { from => $item->notforloan, to => $rules->{$key} };
2159
                    if ( $item->notforloan eq $notloan_rule_key ) {
2160
                    $item->notforloan($rules->{$key})->store({ log_action => 0, skip_record_index => 1, skip_holds_queue => 1 }) unless $rules->{$key} eq 'ONLYMESSAGE';
2160
                        $messages->{'NotForLoanStatusUpdated'} = { from => $item->notforloan, to => $rules->{$item->itype}->{$notloan_rule_key} };
2161
                    last;
2161
                        $item->notforloan($rules->{$item->itype}->{$notloan_rule_key})->store({ log_action => 0, skip_record_index => 1, skip_holds_queue => 1 });
2162
                        last;
2163
                    }
2164
                }
2165
            } elsif ( defined $rules->{'_ALL_'} ) {
2166
                foreach my $notloan_rule_key (keys %{ $rules->{'_ALL_'}} ) {
2167
                    if ( $item->notforloan eq $notloan_rule_key ) {
2168
                        $messages->{'NotForLoanStatusUpdated'} = { from => $item->notforloan, to => $rules->{'_ALL_'}->{$notloan_rule_key} };
2169
                        $item->notforloan($rules->{'_ALL_'}->{$notloan_rule_key})->store({ log_action => 0, skip_record_index => 1, skip_holds_queue => 1 });
2170
                        last;
2171
                    }
2162
                }
2172
                }
2163
            }
2173
            }
2164
        }
2174
        }
2165
- 

Return to bug 25560