diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 21fddac0f1..4d49b933f7 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2025,7 +2025,10 @@ sub AddReturn { if (defined $update_loc_rules->{_ALL_}) { if ($update_loc_rules->{_ALL_} eq '_PERM_') { $update_loc_rules->{_ALL_} = $item->permanent_location; } if ($update_loc_rules->{_ALL_} eq '_BLANK_') { $update_loc_rules->{_ALL_} = ''; } - if ( defined $item->location && $item->location ne $update_loc_rules->{_ALL_}) { + if ( + ( defined $item->location && $item->location ne $update_loc_rules->{_ALL_}) || + (!defined $item->location && $update_loc_rules->{_ALL_} ne "") + ) { $messages->{'ItemLocationUpdated'} = { from => $item->location, to => $update_loc_rules->{_ALL_} }; $item->location($update_loc_rules->{_ALL_})->store({skip_record_index=>1}); }