use strict;
use Carp;
use DateTime;
-use Encode qw(decode);
+use Encode qw(encode);
use Scalar::Util qw(looks_like_number);
use SL::DB::Datev;
max_length => 13,
type => 'Value',
required => 1,
- input_check => sub { my ($input) = @_; return (looks_like_number($input) && length($input) <= 13 && $input >= 0) },
+ input_check => sub { my ($input) = @_; return (looks_like_number($input) && length($input) <= 13 && $input > 0) },
formatter => \&_format_amount,
valid_check => sub { my ($check) = @_; return ($check =~ m/^\d{1,10}(\,\d{1,2})?$/) },
},
},
{
kivi_datev_name => 'not yet implemented',
- sv_header_name => t8('Base Transaction Value'),
+ csv_header_name => t8('Base Transaction Value'),
},
{
kivi_datev_name => 'not yet implemented',
type => 'Value',
},
{
- kivi_datev_name => 'buchungsbes',
+ kivi_datev_name => 'buchungstext',
csv_header_name => t8('Posting Text'),
max_length => 60,
type => 'Text',
input_check => sub {
my ($ustid) = @_;
return 1 if ('' eq $ustid);
- $ustid =~ s{[\s.]+}{}g;
+ $ustid =~ s{\s+}{}g;
return ($ustid =~ m/^CH|^[A-Z]{2}\w{5,13}$/);
},
- formatter => sub { my ($input) = @_; $input =~ s/[\s.]+//g; return $input },
+ formatter => sub { my ($input) = @_; $input =~ s/\s//g; return $input },
valid_check => sub {
my ($ustid) = @_;
return 1 if ('' eq $ustid);
my ($test) = @_;
return undef unless $test;
if (eval {
- decode('Windows-1252', $test, Encode::FB_CROAK|Encode::LEAVE_SRC);
+ encode('Windows-1252', $test, Encode::FB_CROAK|Encode::LEAVE_SRC);
1
}) {
return 1;