@@ -, +, @@ --- C4/Items.pm | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) --- a/C4/Items.pm +++ a/C4/Items.pm @@ -30,6 +30,7 @@ use MARC::Record; use C4::ClassSource; use C4::Log; use List::MoreUtils qw/any/; +use DateTime::Format::MySQ; use Data::Dumper; # used as part of logging item record changes, not just for # debugging; so please don't remove this @@ -535,12 +536,15 @@ sub ModItem { $item->{onloan} = undef if $item->{itemlost}; + my $pre_mod_item = GetItem($item->{'itemnumber'}); for my $field ( qw( itemlost wthdrawn ) ) { - if ( defined( $item->{$field} ) ) { - if ( $item->{$field} ) { - $item->{$field . '_on'} = DateTime::Format::MySQL->format_datetime( DateTime->now() ); - } else { - $item->{$field . '_on'} = undef; + unless ( $pre_mod_item->{$field} ) { + if ( defined( $item->{$field} ) ) { + if ( $item->{$field} ) { + $item->{$field . '_on'} = DateTime::Format::MySQL->format_datetime( DateTime->now() ); + } else { + $item->{$field . '_on'} = undef; + } } } } --