Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision e1f93c18

Von Sven Schöling vor mehr als 8 Jahren hinzugefügt

  • ID e1f93c184a9f6fe0826306383f23c454011dc9b3
  • Vorgänger 62302cce
  • Nachfolger 413addb3

GDPDU: Zellennormalisierung auch für transactions

ausserdem , durch ; ersetzt.

Unterschiede anzeigen:

SL/GDPDU.pm
$haben->{notes} = ($haben->{memo} || $soll->{memo}) if $haben->{memo} || $soll->{memo};
$haben->{notes} //= '';
$haben->{notes} = SL::HTML::Util->strip($haben->{notes});
$haben->{notes} =~ s{\r}{}g;
$haben->{notes} =~ s{\n+}{ }g;
my %row = (
amount => $::form->format_amount($myconfig, abs($amount->{amount}),5),
......
(map { ($_ => ($haben->{$_} // $soll->{$_})) } qw(acc_trans_id invnumber name vcnumber transdate itime customer_id vendor_id)),
);
$row{$_} =~ s/\r?\n/ /g for @datev_columns; # see CAVEATS
_normalize_cell($_) for values %row; # see CAVEATS
$csv->print($fh, [ map { $row{$_} } @datev_columns ]);
}
......
$self->export_ids->{$table}{$keep_col} ||= {};
$self->export_ids->{$table}{$keep_col}{$row->[$col_index{$keep_col}]}++;
}
s/\r\n/ /g for @$row; # see CAVEATS
_normalize_cell($_) for @$row; # see CAVEATS
$csv->print($fh, $row) or $csv->error_diag;
}
......
$self->tables(\@export_table_order) if $yesno;
}
sub _normalize_cell {
$_[0] =~ s/\r\n/ /g;
$_[0] =~ s/,/;/g;
}
sub init_files { +{} }
sub init_export_ids { +{} }
sub init_tempfiles { [] }
......
exactly RecordDelimiter) in data. So this export substites all of these with
spaces.
=item *
Neither it is able to parse escaped C<ColumnDelimiter> in data. It just splits
on that symbol no matter what surrounds or preceeds it.
=item *
Fun fact: Some auditors do not have a full license of the IDEA software, and
can't do table joins. So it's best to provide denormalized data for them, so
that the auditor may infer which object is meant.
=back
=head1 AUTHOR

Auch abrufbar als: Unified diff