From: Sven Schöling Date: Tue, 20 Oct 2015 11:11:06 +0000 (+0200) Subject: GDPDU: Weitere fixes X-Git-Tag: release-3.5.4~1981 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=3bb3a4a56b0be39fd60f011137ffbadd9dba3fd7;p=kivitendo-erp.git GDPDU: Weitere fixes --- diff --git a/SL/GDPDU.pm b/SL/GDPDU.pm index 22d2c7313..23ba96158 100644 --- a/SL/GDPDU.pm +++ b/SL/GDPDU.pm @@ -1,7 +1,6 @@ package SL::GDPDU; # TODO: -# translations # optional: background jobable use strict; @@ -64,8 +63,8 @@ my $date_format = 'DD.MM.YYYY'; # callbacks that produce the xml spec for these column types my %column_types = ( - 'Rose::DB::Object::Metadata::Column::Integer' => sub { $_[0]->tag('Numeric', sub { $_[0]->tag('Accuracy', 0) }) }, - 'Rose::DB::Object::Metadata::Column::BigInt' => sub { $_[0]->tag('Numeric', sub { $_[0]->tag('Accuracy', 0) }) }, + 'Rose::DB::Object::Metadata::Column::Integer' => sub { $_[0]->tag('Numeric') }, # see Caveats for integer issues + 'Rose::DB::Object::Metadata::Column::BigInt' => sub { $_[0]->tag('Numeric') }, # see Caveats for integer issues 'Rose::DB::Object::Metadata::Column::Text' => sub { $_[0]->tag('AlphaNumeric') }, 'Rose::DB::Object::Metadata::Column::Varchar' => sub { $_[0]->tag('AlphaNumeric') }, 'Rose::DB::Object::Metadata::Column::Character' => sub { $_[0]->tag('AlphaNumeric') }, @@ -181,8 +180,7 @@ sub table { ->tag('DecimalSymbol', '.') ->tag('DigitGroupingSymbol', '|') # see CAVEATS in documentation ->tag('VariableLength', sub { $self - ->tag('ColumnDelimiter', ',') - ->tag('RecordDelimiter', ' ') + ->tag('ColumnDelimiter', ',') # see CAVEATS for missing RecordDelimiter ->tag('TextEncapsulator', '"') ->columns($table) ->foreign_keys($table) @@ -259,7 +257,7 @@ sub foreign_keys { sub do_csv_export { my ($self, $table) = @_; - my $csv = Text::CSV_XS->new({ binary => 1, eol => "\n", sep_char => ",", quote_char => '"' }); + my $csv = Text::CSV_XS->new({ binary => 1, eol => "\r\n", sep_char => ",", quote_char => '"' }); my ($fh, $filename) = File::Temp::tempfile(); binmode($fh, ':utf8'); @@ -453,8 +451,9 @@ and C
are supported, timestamps do not exist. =item * -Number pasing seems to be fragile. Official docs state that behaviour for too -low C settings is undefined. +Number parsing seems to be fragile. Official docs state that behaviour for too +low C settings is undefined. Accuracy of 0 is not taken to mean +Integer but instead generates a warning for redudancy. There is no dedicated integer type. @@ -492,6 +491,23 @@ response actually was: L +=item * + +It is not possible to define a C with XML entities. +generates the error message: + + C-Wert ( ) sollte immer aus ein oder zwei Zeichen + bestehen. + +Instead we just use the implicit default RecordDelimiter CRLF. + +=item * + +Not confirmed yet: + +Foreign keys seem only to work with previously defined tables (which would be +utterly insane). + =back =head1 AUTHOR