Ausgewähltes Zahlenformat berücksichtigen
authorMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 3 Mar 2011 10:48:39 +0000 (11:48 +0100)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 16 Jun 2011 07:30:11 +0000 (09:30 +0200)
SL/Controller/CsvImport/Base.pm

index a61b03f..6a66e8c 100644 (file)
@@ -30,6 +30,10 @@ sub run {
                                   strict_profile         => 1,
                                   map { ( $_ => $self->controller->profile->get($_) ) } qw(sep_char escape_char quote_char),
                                  ));
+
+  my $old_numberformat      = $::myconfig{numberformat};
+  $::myconfig{numberformat} = $self->controller->profile->get('numberformat');
+
   $self->csv->parse;
 
   $self->controller->errors([ $self->csv->errors ]) if $self->csv->errors;
@@ -50,6 +54,8 @@ sub run {
   $self->check_objects;
   $self->check_duplicates if $self->controller->profile->get('duplicates', 'no_check') ne 'no_check';
   $self->fix_field_lengths;
+
+  $::myconfig{numberformat} = $old_numberformat;
 }
 
 sub add_columns {