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

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

Return to bug 25560