Auth.pm cosmetics: Entfernen von $::lxdebug->enter_sub/leave_sub
[kivitendo-erp.git] / SL / Controller / CsvImport / CustomerVendor.pm
index 14b6730..7d37904 100644 (file)
@@ -89,7 +89,7 @@ sub check_objects {
       # Update existing customer/vendor records.
       $entry->{object_to_save} = $existing_vc;
 
-      $existing_vc->$_( $entry->{object}->$_ ) for @{ $methods };
+      $existing_vc->$_( $entry->{object}->$_ ) for @{ $methods }, keys %{ $self->clone_methods };
 
       push @{ $entry->{information} }, $::locale->text('Updating existing entry in database');
 
@@ -153,6 +153,9 @@ sub check_language {
     }
 
     $object->language_id($language->id);
+
+    # register language_id for method copying later
+    $self->clone_methods->{language_id} = 1;
   }
 
   return 1;
@@ -179,6 +182,9 @@ sub check_business {
     }
 
     $object->business_id($business->id);
+
+    # register business_id for method copying later
+    $self->clone_methods->{business_id} = 1;
   }
 
   return 1;
@@ -208,26 +214,6 @@ sub save_objects {
   $self->SUPER::save_objects(data => $without_number);
 }
 
-sub field_lengths {
-  return ( name           => 75,
-           department_1   => 75,
-           department_2   => 75,
-           street         => 75,
-           zipcode        => 10,
-           city           => 75,
-           country        => 75,
-           contact        => 75,
-           fax            => 30,
-           account_number => 15,
-           bank_code      => 10,
-           language       => 5,
-           username       => 50,
-           ustid          => 14,
-           iban           => 100,
-           bic            => 100,
-         );
-}
-
 sub init_profile {
   my ($self) = @_;