From 603574e62bd1ec2eeec9421f8be986dbfc3f9bbc Mon Sep 17 00:00:00 2001 From: Nahuel ANGELINETTI Date: Fri, 23 Apr 2010 13:54:30 +0200 Subject: [PATCH] (bug #4263) dateaccessionned is cleaned on item modification Every item modification, date accessionned is cleaned, if there is no modification made, we must'nt reset to "undef" the value. --- C4/Items.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/C4/Items.pm b/C4/Items.pm index d19caf9a1d..e0f1dea2fe 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -422,8 +422,9 @@ sub ModItemFromMarc { my $localitemmarc=MARC::Record->new; $localitemmarc->append_fields($item_marc->field($itemtag)); my $item = &TransformMarcToKoha( $dbh, $localitemmarc, $frameworkcode, 'items'); + foreach my $item_field (keys %default_values_for_mod_from_marc) { - $item->{$item_field} = $default_values_for_mod_from_marc{$item_field} unless exists $item->{$item_field}; + $item->{$item_field} = $default_values_for_mod_from_marc{$item_field} unless (exists $item->{$item_field} or not $default_values_for_mod_from_marc{$item_field}); } my $unlinked_item_subfields = _get_unlinked_item_subfields($localitemmarc, $frameworkcode);