Revision 2f2a0f41
Von Jan Büren vor mehr als 7 Jahren hinzugefügt
SL/DATEV/CSV.pm | ||
---|---|---|
7 | 7 |
|
8 | 8 |
use Carp; |
9 | 9 |
use DateTime; |
10 |
use Encode qw(decode); |
|
10 | 11 |
|
11 | 12 |
|
12 | 13 |
my @kivitendo_to_datev = ( |
... | ... | |
205 | 206 |
); |
206 | 207 |
|
207 | 208 |
sub check_encoding { |
208 |
use Encode qw( decode ); |
|
209 |
# counter test: arabic doesnt work: ݐ |
|
210 |
my $test = shift; |
|
209 |
my ($test) = @_; |
|
211 | 210 |
return undef unless $test; |
212 | 211 |
if (eval { |
213 | 212 |
decode('Windows-1252', $test, Encode::FB_CROAK|Encode::LEAVE_SRC); |
... | ... | |
218 | 217 |
} |
219 | 218 |
|
220 | 219 |
sub kivitendo_to_datev { |
221 |
my $self = shift;
|
|
220 |
my ($self) = @_;
|
|
222 | 221 |
|
223 | 222 |
my $entries = scalar (@kivitendo_to_datev); |
224 | 223 |
push @kivitendo_to_datev, { kivi_datev_name => 'not yet implemented' } for 1 .. (116 - $entries); |
... | ... | |
347 | 346 |
=item check_encoding |
348 | 347 |
|
349 | 348 |
Helper function, returns true if a string is not empty and cp1252 encoded |
349 |
For example some arabic utf-8 like ݐ will return false |
|
350 | 350 |
|
351 | 351 |
=item generate_csv_header(from => 'YYYYDDMM', to => 'YYYYDDMM', locked => 0, |
352 | 352 |
first_day_of_fiscal_year => 'YYYYDDMM') |
Auch abrufbar als: Unified diff
DATEV-Struktur params und lib