From e9eaca9380ad2f3062d6b8cb75376a7d01559af9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Mon, 4 Dec 2017 11:27:08 +0100 Subject: [PATCH] =?utf8?q?DATEV:CSV=20nicht=20gesetztes=20F=C3=A4lligkeits?= =?utf8?q?datum=20f=C3=BCr=20Belegfeld2=20akzeptieren?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Ferner Format auch WIRKLICH sechstellig DDMMYY (cherry-pick verdaddelt) --- SL/DATEV/CSV.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SL/DATEV/CSV.pm b/SL/DATEV/CSV.pm index 1717bdf2e..9ac29c036 100644 --- a/SL/DATEV/CSV.pm +++ b/SL/DATEV/CSV.pm @@ -111,9 +111,9 @@ my @kivitendo_to_datev = ( max_length => 12, type => 'Text', default => '', - 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}$/) }, + input_check => sub { my ($check) = @_; return 1 unless $check; return (ref (DateTime->from_kivitendo($check)) eq 'DateTime') }, + formatter => sub { my ($input) = @_; return DateTime->from_kivitendo($input)->strftime('%d%m%y') }, + valid_check => sub { my ($check) = @_; return ($check =~ m/^[0-9]{6}$/) }, }, { kivi_datev_name => 'not yet implemented', -- 2.20.1