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

(-)a/C4/Circulation.pm (-5 / +10 lines)
Lines 2141-2150 sub AddReturn { Link Here
2141
        }
2141
        }
2142
        else {
2142
        else {
2143
            foreach my $key ( keys %$rules ) {
2143
            foreach my $key ( keys %$rules ) {
2144
                if ( $item->notforloan eq $key ) {
2144
2145
                    $messages->{'NotForLoanStatusUpdated'} = { from => $item->notforloan, to => $rules->{$key} };
2145
                # Check and apply rules for the item type being returned
2146
                    $item->notforloan($rules->{$key})->store({ log_action => 0, skip_record_index => 1, skip_holds_queue => 1 });
2146
                if ( $item->itype eq $key ) {
2147
                    last;
2147
                    foreach my $itype_rule_key ( keys %{ $rules->{$key}} ) {
2148
                        if ( $item->notforloan eq $itype_rule_key ) {
2149
                            $messages->{'NotForLoanStatusUpdated'} = { from => $item->notforloan, to => $rules->{$key}->{$itype_rule_key} };
2150
                            $item->notforloan($rules->{$key}->{$itype_rule_key})->store({ log_action => 0, skip_record_index => 1, skip_holds_queue => 1 });
2151
                            last;
2152
                        }
2153
                    }
2148
                }
2154
                }
2149
            }
2155
            }
2150
        }
2156
        }
2151
- 

Return to bug 25560