From da8362118bc707e238beb24fcc1e6c09cf241456 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Mon, 15 Oct 2018 12:39:34 +0200 Subject: [PATCH] =?utf8?q?DATEV-CSV-Export=20leere=20Feldwerte=20f=C3=BCr?= =?utf8?q?=20Belegfeld2=20erlauben?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DATEV/CSV.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SL/DATEV/CSV.pm b/SL/DATEV/CSV.pm index 908347a44..a4585de26 100644 --- a/SL/DATEV/CSV.pm +++ b/SL/DATEV/CSV.pm @@ -113,8 +113,8 @@ my @kivitendo_to_datev = ( type => 'Text', default => '', input_check => sub { my ($check) = @_; return 1 unless $check; return (ref (DateTime->from_kivitendo($check)) eq 'DateTime') }, - formatter => sub { my ($input) = @_; return trim(DateTime->from_kivitendo($input)->strftime('%e%m%y')) }, - valid_check => sub { my ($check) = @_; return ($check =~ m/^[0-9]{5,6}$/) }, + formatter => sub { my ($input) = @_; return undef unless $input; return trim(DateTime->from_kivitendo($input)->strftime('%e%m%y')) }, + valid_check => sub { my ($check) = @_; return 1 unless $check; return ($check =~ m/^[0-9]{5,6}$/) }, }, { kivi_datev_name => 'not yet implemented', -- 2.20.1