Lines 537-542
sub ModItem {
Link Here
|
537 |
|
537 |
|
538 |
$item->{onloan} = undef if $item->{itemlost}; |
538 |
$item->{onloan} = undef if $item->{itemlost}; |
539 |
|
539 |
|
|
|
540 |
# Only call GetItem if we need to set an "on" date field |
540 |
if ( $item->{itemlost} || $item->{wthdrawn} ) { |
541 |
if ( $item->{itemlost} || $item->{wthdrawn} ) { |
541 |
my $pre_mod_item = GetItem( $item->{'itemnumber'} ); |
542 |
my $pre_mod_item = GetItem( $item->{'itemnumber'} ); |
542 |
for my $field (qw( itemlost wthdrawn )) { |
543 |
for my $field (qw( itemlost wthdrawn )) { |
Lines 553-558
sub ModItem {
Link Here
|
553 |
} |
554 |
} |
554 |
} |
555 |
} |
555 |
} |
556 |
} |
|
|
557 |
# If the field is defined but empty, we are removing and, |
558 |
# and thus need to clear out the 'on' field as well |
559 |
if ( defined( $item->{itemlost} ) && !$item->{itemlost} ) { |
560 |
$item->{itemlost_on} = undef; |
561 |
} |
562 |
if ( defined( $item->{wthdrawn} ) && !$item->{wthdrawn} ) { |
563 |
$item->{wthdrawn_on} = undef; |
564 |
} |
556 |
|
565 |
|
557 |
_set_derived_columns_for_mod($item); |
566 |
_set_derived_columns_for_mod($item); |
558 |
_do_column_fixes_for_mod($item); |
567 |
_do_column_fixes_for_mod($item); |
559 |
- |
|
|