From: Thomas Heck Date: Mon, 6 Aug 2012 11:09:23 +0000 (+0200) Subject: Spaltenueberschriften Export auf Import abgleichen X-Git-Tag: release-3.0.0beta1~297^2~4 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=0185267ee634095b8c6e247357dafe1207f97996;p=kivitendo-erp.git Spaltenueberschriften Export auf Import abgleichen implementiert #1851 --- diff --git a/SL/ReportGenerator.pm b/SL/ReportGenerator.pm index 3f5cdebba..688f165bc 100644 --- a/SL/ReportGenerator.pm +++ b/SL/ReportGenerator.pm @@ -72,6 +72,12 @@ sub set_columns { foreach my $column (values %{ $self->{columns} }) { $column->{visible} = $self->{options}->{std_column_visibility} unless defined $column->{visible}; } + + if( $::form->{report_generator_csv_options_for_import} ) { + foreach my $key (keys %{ $self->{columns} }) { + $self->{columns}{$key}{text} = $key; + } + } $self->set_column_order(sort keys %{ $self->{columns} }); } diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index ce1d1a9dd..fb6166f18 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -466,7 +466,7 @@ sub generate_report { my $row_set = [ $row ]; - if (($form->{l_subtotal} eq 'Y') + if ( ($form->{l_subtotal} eq 'Y' && !$form->{report_generator_csv_options_for_import} ) && (($idx == (scalar @{ $form->{GL} } - 1)) || ($ref->{ $form->{sort} } ne $form->{GL}->[$idx + 1]->{ $form->{sort} }))) { push @{ $row_set }, create_subtotal_row(\%subtotals, \@columns, \%column_alignment, [ qw(debit credit) ], 'listsubtotal'); @@ -477,8 +477,6 @@ sub generate_report { $idx++; } - $report->add_separator(); - # = 0 for balanced ledger my $balanced_ledger = $totals{debit} + $totals{debit_tax} - $totals{credit} - $totals{credit_tax}; @@ -496,8 +494,11 @@ sub generate_report { $data .= $sh; $row->{balance}->{data} = $data; - - $report->add_data($row); + + if ( !$form->{report_generator_csv_options_for_import} ) { + $report->add_separator(); + $report->add_data($row); + } my $raw_bottom_info_text; diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl index 0eb7995b2..f7985cf04 100644 --- a/bin/mozilla/ic.pl +++ b/bin/mozilla/ic.pl @@ -1401,7 +1401,7 @@ sub generate_report { $idx++; } - if ($form->{"l_linetotal"}) { + if ($form->{"l_linetotal"} && !$form->{report_generator_csv_options_for_import}) { my $row = { map { $_ => { 'class' => 'listtotal', } } @columns }; map { $row->{"linetotal$_"}->{data} = $form->format_amount(\%myconfig, $totals{$_}, 2) } @subtotal_columns; diff --git a/bin/mozilla/wh.pl b/bin/mozilla/wh.pl index b3550b253..aa372463a 100644 --- a/bin/mozilla/wh.pl +++ b/bin/mozilla/wh.pl @@ -896,7 +896,7 @@ sub generate_report { my $row_set = [ { map { $_ => { 'data' => $entry->{$_}, 'align' => $column_alignment{$_} } } @columns } ]; - if (($form->{subtotal} eq 'Y') + if ( ($form->{subtotal} eq 'Y' && !$form->{report_generator_csv_options_for_import} ) && (($idx == (scalar @contents - 1)) || ($entry->{$sort_col} ne $contents[$idx + 1]->{$sort_col}))) { @@ -916,7 +916,7 @@ sub generate_report { $idx++; } - if ($column_defs{stock_value}->{visible}) { + if ( $column_defs{stock_value}->{visible} && !$form->{report_generator_csv_options_for_import} ) { $report->add_separator(); my $row = { map { $_ => { 'data' => '', 'class' => 'listsubtotal', } } @columns }; diff --git a/locale/de/all b/locale/de/all index ace39bea5..077f23e41 100644 --- a/locale/de/all +++ b/locale/de/all @@ -1115,6 +1115,7 @@ $self->{texts} = { 'Main sorting' => 'Hauptsortierung', 'Make' => 'Lieferant', 'Make (with X being a number)' => 'Lieferant (X ist eine fortlaufende Zahl)', + 'Make compatible for import' => 'Für den Import kompatibel machen', 'Make default profile' => 'Zu Standardprofil machen', 'Manage Custom Variables' => 'Benutzerdefinierte Variablen', 'Mandantennummer' => 'Mandantennummer', diff --git a/templates/webpages/report_generator/csv_export_options.html b/templates/webpages/report_generator/csv_export_options.html index 996adfc0d..70c39af02 100644 --- a/templates/webpages/report_generator/csv_export_options.html +++ b/templates/webpages/report_generator/csv_export_options.html @@ -61,6 +61,8 @@ + +