X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/8c1ef5dbfcbb079169c0aeb286656fc3513d2fe0..bc0e2edad8e8f94f85f2a59ceb784b8eb0cda97c:/SL/DATEV/CSV.pm diff --git a/SL/DATEV/CSV.pm b/SL/DATEV/CSV.pm index 6d6594582..c06ee7040 100644 --- a/SL/DATEV/CSV.pm +++ b/SL/DATEV/CSV.pm @@ -228,7 +228,12 @@ my @kivitendo_to_datev = ( max_length => 15, type => 'Text', default => '', - input_check => sub { my ($check) = @_; return ($check eq '' || $check =~ m/[A-Z]{2}\w{5,13}/) }, + input_check => sub { + my ($ustid) = @_; + return 1 if ('' eq $ustid); + $ustid =~ s{\s+}{}g; + return ($ustid =~ m/^CH|^[A-Z]{2}\w{5,13}$/); + }, formatter => sub { my ($input) = @_; $input =~ s/\s//g; return $input }, valid_check => sub { my ($ustid) = @_; @@ -294,7 +299,7 @@ sub header { } my @header_row_1 = ( - "EXTF", "300", 21, "Buchungsstapel", 7, $created_on, "", "ki", + "EXTF", "510", 21, "Buchungsstapel", 7, $created_on, "", "ki", "kivitendo-datev", "", $meta_datev{beraternr}, $meta_datev{mandantennr}, $self->first_day_of_fiscal_year->ymd(''), $length_of_accounts, $self->from->ymd(''), $self->to->ymd(''), "", "", 1, "", $self->locked,