From: Sven Schöling Date: Fri, 20 Nov 2020 16:34:19 +0000 (+0100) Subject: CsvImport: dateformat Unterstützung X-Git-Tag: kivitendo-mebil_0.1-0~9^2~629 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=6410ae9fc53e8501b21038c41005e39831020f5f;p=kivitendo-erp.git CsvImport: dateformat Unterstützung default ist auf dem dateformat des Benutzers --- diff --git a/SL/Controller/CsvImport/Base.pm b/SL/Controller/CsvImport/Base.pm index e3c119de2..663be5eb8 100644 --- a/SL/Controller/CsvImport/Base.pm +++ b/SL/Controller/CsvImport/Base.pm @@ -45,8 +45,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; @@ -83,8 +83,6 @@ sub run { $self->fix_field_lengths; $self->controller->track_progress(progress => 100); - - $::myconfig{numberformat} = $old_numberformat; } sub add_columns { diff --git a/SL/DB/CsvImportProfile.pm b/SL/DB/CsvImportProfile.pm index bf11279d1..b816bedb8 100644 --- a/SL/DB/CsvImportProfile.pm +++ b/SL/DB/CsvImportProfile.pm @@ -38,6 +38,7 @@ sub set_defaults { escape_char => '"', charset => 'CP850', numberformat => $::myconfig{numberformat}, + dateformat => $::myconfig{dateformat}, duplicates => 'no_check', ); diff --git a/templates/webpages/csv_import/form.html b/templates/webpages/csv_import/form.html index aecbf1ddb..e867f7a51 100644 --- a/templates/webpages/csv_import/form.html +++ b/templates/webpages/csv_import/form.html @@ -180,6 +180,13 @@ + + [%- LxERP.t8('Date Format') %]: + + [% L.select_tag('settings.dateformat', ['dd.mm.yyyy', 'yyyy-mm-dd', 'dd/mm/yyyy', 'mm/dd/yyyy' ], default = SELF.profile.get('dateformat'), style = 'width: 300px') %] + + + [%- LxERP.t8('Charset') %]: [% L.select_tag('settings.charset', SELF.all_charsets, default = SELF.profile.get('charset'), style = 'width: 300px') %]