X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/b90ff6b18df92c98b1b875d14835d1fdf9ff339a..f217d072d76183bc07723dcc29503b732bd2022d:/SL/Controller/CsvImport/BaseMulti.pm diff --git a/SL/Controller/CsvImport/BaseMulti.pm b/SL/Controller/CsvImport/BaseMulti.pm index 9ddb86bea..94cfa8431 100644 --- a/SL/Controller/CsvImport/BaseMulti.pm +++ b/SL/Controller/CsvImport/BaseMulti.pm @@ -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 {