Revision e1f93c18
Von Sven Schöling vor etwa 8 Jahren hinzugefügt
SL/GDPDU.pm | ||
---|---|---|
405 | 405 |
$haben->{notes} = ($haben->{memo} || $soll->{memo}) if $haben->{memo} || $soll->{memo}; |
406 | 406 |
$haben->{notes} //= ''; |
407 | 407 |
$haben->{notes} = SL::HTML::Util->strip($haben->{notes}); |
408 |
$haben->{notes} =~ s{\r}{}g; |
|
409 |
$haben->{notes} =~ s{\n+}{ }g; |
|
410 | 408 |
|
411 | 409 |
my %row = ( |
412 | 410 |
amount => $::form->format_amount($myconfig, abs($amount->{amount}),5), |
... | ... | |
420 | 418 |
(map { ($_ => ($haben->{$_} // $soll->{$_})) } qw(acc_trans_id invnumber name vcnumber transdate itime customer_id vendor_id)), |
421 | 419 |
); |
422 | 420 |
|
423 |
$row{$_} =~ s/\r?\n/ /g for @datev_columns; # see CAVEATS
|
|
421 |
_normalize_cell($_) for values %row; # see CAVEATS
|
|
424 | 422 |
|
425 | 423 |
$csv->print($fh, [ map { $row{$_} } @datev_columns ]); |
426 | 424 |
} |
... | ... | |
496 | 494 |
$self->export_ids->{$table}{$keep_col} ||= {}; |
497 | 495 |
$self->export_ids->{$table}{$keep_col}{$row->[$col_index{$keep_col}]}++; |
498 | 496 |
} |
499 |
s/\r\n/ /g for @$row; # see CAVEATS
|
|
497 |
_normalize_cell($_) for @$row; # see CAVEATS
|
|
500 | 498 |
|
501 | 499 |
$csv->print($fh, $row) or $csv->error_diag; |
502 | 500 |
} |
... | ... | |
552 | 550 |
$self->tables(\@export_table_order) if $yesno; |
553 | 551 |
} |
554 | 552 |
|
553 |
sub _normalize_cell { |
|
554 |
$_[0] =~ s/\r\n/ /g; |
|
555 |
$_[0] =~ s/,/;/g; |
|
556 |
} |
|
557 |
|
|
555 | 558 |
sub init_files { +{} } |
556 | 559 |
sub init_export_ids { +{} } |
557 | 560 |
sub init_tempfiles { [] } |
... | ... | |
691 | 694 |
exactly RecordDelimiter) in data. So this export substites all of these with |
692 | 695 |
spaces. |
693 | 696 |
|
697 |
=item * |
|
698 |
|
|
699 |
Neither it is able to parse escaped C<ColumnDelimiter> in data. It just splits |
|
700 |
on that symbol no matter what surrounds or preceeds it. |
|
701 |
|
|
702 |
=item * |
|
703 |
|
|
704 |
Fun fact: Some auditors do not have a full license of the IDEA software, and |
|
705 |
can't do table joins. So it's best to provide denormalized data for them, so |
|
706 |
that the auditor may infer which object is meant. |
|
707 |
|
|
694 | 708 |
=back |
695 | 709 |
|
696 | 710 |
=head1 AUTHOR |
Auch abrufbar als: Unified diff
GDPDU: Zellennormalisierung auch für transactions
ausserdem , durch ; ersetzt.