Lines 30-35
use MARC::Record;
Link Here
|
30 |
use C4::ClassSource; |
30 |
use C4::ClassSource; |
31 |
use C4::Log; |
31 |
use C4::Log; |
32 |
use List::MoreUtils qw/any/; |
32 |
use List::MoreUtils qw/any/; |
|
|
33 |
use DateTime::Format::MySQL; |
33 |
use Data::Dumper; # used as part of logging item record changes, not just for |
34 |
use Data::Dumper; # used as part of logging item record changes, not just for |
34 |
# debugging; so please don't remove this |
35 |
# debugging; so please don't remove this |
35 |
|
36 |
|
Lines 537-547
sub ModItem {
Link Here
|
537 |
|
538 |
|
538 |
for my $field ( qw( itemlost wthdrawn ) ) { |
539 |
for my $field ( qw( itemlost wthdrawn ) ) { |
539 |
if ( defined( $item->{$field} ) ) { |
540 |
if ( defined( $item->{$field} ) ) { |
540 |
if ( $item->{$field} ) { |
541 |
my $pre_mod_item = GetItem($item->{'itemnumber'}); |
541 |
$item->{$field . '_on'} = DateTime::Format::MySQL->format_datetime( DateTime->now() ); |
542 |
unless ( $pre_mod_item->{$field} ) { |
542 |
} else { |
543 |
if ( $item->{$field} ) { |
543 |
$item->{$field . '_on'} = undef; |
544 |
$item->{$field . '_on'} = DateTime::Format::MySQL->format_datetime( DateTime->now() ); |
|
|
545 |
} |
544 |
} |
546 |
} |
|
|
547 |
} else { |
548 |
$item->{$field . '_on'} = undef; |
545 |
} |
549 |
} |
546 |
} |
550 |
} |
547 |
|
551 |
|
548 |
- |
|
|