Revision 7bee3eca
Von Jan Büren vor etwa 7 Jahren hinzugefügt
SL/DATEV/CSV.pm | ||
---|---|---|
229 | 229 |
type => 'Text', |
230 | 230 |
default => '', |
231 | 231 |
input_check => sub { my ($check) = @_; return ($check eq '' || $check =~ m/[A-Z]{2}\w{5,13}/) }, |
232 |
formatter => sub { my ($input) = @_; return ($input =~ s/\s//g) },
|
|
232 |
formatter => sub { my ($input) = @_; $input =~ s/\s//g; return $input },
|
|
233 | 233 |
valid_check => sub { |
234 | 234 |
my ($ustid) = @_; |
235 |
# croak("hier" . $ustid) if $ustid; |
|
235 | 236 |
return 1 if ('' eq $ustid); |
236 | 237 |
return ($ustid =~ m/^CH|^[A-Z]{2}\w{5,13}$/); |
237 | 238 |
}, |
... | ... | |
276 | 277 |
my @header; |
277 | 278 |
|
278 | 279 |
# we can safely set these defaults |
279 |
# TODO use Helper::DateTime and get lenght_of_accounts from DATEV.pm
|
|
280 |
# TODO use Helper::DateTime and get length_of_accounts from DATEV.pm
|
|
280 | 281 |
my $today = DateTime->now(time_zone => "local"); |
281 | 282 |
my $created_on = $today->ymd('') . $today->hms('') . '000'; |
282 | 283 |
my $length_of_accounts = length(SL::DB::Manager::Chart->get_first(where => [charttype => 'A'])->accno) // 4; |
... | ... | |
334 | 335 |
if (defined $column->{default}) { |
335 | 336 |
$data = $column->{default}; |
336 | 337 |
} else { |
337 |
die 'No sensible value or a sensible default found for the entry: ' . $column->{kivi_datev_name};
|
|
338 |
die 'No sensible value or a sensible default found for the entry: ' . $column->{kivi_datev_name}; |
|
338 | 339 |
} |
339 | 340 |
} |
340 | 341 |
# checkpoint a: no undefined data. All strict checks now! |
Auch abrufbar als: Unified diff
DATEV::CSV ustid richtig formatieren. spellcheck. kosmetik