From: Jan Büren Date: Wed, 8 Sep 2021 06:40:54 +0000 (+0200) Subject: PPI: Auch escapte DTVF Namen erkennen X-Git-Tag: kivitendo-mebil_0.1-0~10^2~2^2~362 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=d5642bca93358e2693f3bce7aec5555114fcbe6b;p=kivitendo-erp.git PPI: Auch escapte DTVF Namen erkennen Scheinbar kann die Kopfzeile des CSV-Format noch Hochkommatas enthalten oder ggf. wurde diese mit einer Tabellenkalkulation geöffnet. --- diff --git a/SL/Controller/PayPostingImport.pm b/SL/Controller/PayPostingImport.pm index 03a44d0bb..5b49a6cb7 100644 --- a/SL/Controller/PayPostingImport.pm +++ b/SL/Controller/PayPostingImport.pm @@ -28,7 +28,7 @@ sub action_import_datev_pay_postings { my $filename= $::form->{ATTACHMENTS}{file}{filename}; # check name and first fields of CSV data die t8("Wrong file name, expects name like: DTVF_*_LOHNBUCHUNG*.csv") unless $filename =~ /^DTVF_.*_LOHNBUCHUNGEN_LUG.*\.csv$/; - die t8("not a valid DTVF file, expected first field in A1 'DTVF'") unless ($::form->{file} =~ m/^"DTVF";/); + die t8("not a valid DTVF file, expected first field in A1 'DTVF': ") unless ($::form->{file} =~ m/^('|")?DTVF/); die t8("not a valid DTVF file, expected field header start with 'Umsatz; (..) ;Konto;Gegenkonto'") unless ($::form->{file} =~ m/Umsatz;S\/H;;;;;Konto;Gegenkonto.*;;Belegdatum;Belegfeld 1;Belegfeld 2;;Buchungstext/);