]> wagnertech.de Git - mfinanz.git/blobdiff - SL/Controller/CsvImport/BaseMulti.pm
restart apache2 in postinst
[mfinanz.git] / SL / Controller / CsvImport / BaseMulti.pm
index 9ddb86beabe144e9057c628126428c688d465cf0..94cfa843192f2a5bb0b9eacd7a481c196bc733c0 100644 (file)
@@ -33,8 +33,8 @@ sub run {
 
   $self->controller->track_progress(progress => 10);
 
-  my $old_numberformat      = $::myconfig{numberformat};
-  $::myconfig{numberformat} = $self->controller->profile->get('numberformat');
+  local $::myconfig{numberformat} = $self->controller->profile->get('numberformat');
+  local $::myconfig{dateformat}   = $self->controller->profile->get('dateformat');
 
   $self->csv->parse;
 
@@ -71,6 +71,10 @@ sub run {
   $self->controller->info_headers($info_headers);
 
   my $objects  = $self->csv->get_objects;
+  if ($self->csv->errors) {
+    $self->controller->errors([ $self->csv->errors ]) ;
+    return;
+  }
 
   $self->controller->track_progress(progress => 70);
 
@@ -90,8 +94,6 @@ sub run {
   $self->fix_field_lengths;
 
   $self->controller->track_progress(progress => 100);
-
-  $::myconfig{numberformat} = $old_numberformat;
 }
 
 sub init_manager_class {