From: Jan Büren Date: Mon, 4 Dec 2017 10:05:25 +0000 (+0100) Subject: DATEV belegfeld2 wieder als Fälligkeitsfeld im Format DDMMYY implementiert X-Git-Tag: release-3.5.4~612 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=982f53983fed52367985246082546fda053d59d5;p=kivitendo-erp.git DATEV belegfeld2 wieder als Fälligkeitsfeld im Format DDMMYY implementiert --- diff --git a/SL/DATEV/CSV.pm b/SL/DATEV/CSV.pm index 6d6594582..1717bdf2e 100644 --- a/SL/DATEV/CSV.pm +++ b/SL/DATEV/CSV.pm @@ -106,12 +106,14 @@ my @kivitendo_to_datev = ( formatter => sub { my ($input) = @_; return substr($input, 0, 12) }, }, { - kivi_datev_name => 'not yet implemented', + kivi_datev_name => 'belegfeld2', csv_header_name => t8('Invoice Field 2'), max_length => 12, type => 'Text', default => '', - valid_check => sub { my ($check) = @_; return ($check =~ m/[ -~]{1,12}/) }, + input_check => sub { my ($check) = @_; return (ref (DateTime->from_kivitendo($check)) eq 'DateTime') }, + formatter => sub { my ($input) = @_; return DateTime->from_kivitendo($input)->strftime('%d%m') }, + valid_check => sub { my ($check) = @_; return ($check =~ m/^[0-9]{4}$/) }, }, { kivi_datev_name => 'not yet implemented',