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} });
}
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');
$idx++;
}
- $report->add_separator();
-
# = 0 for balanced ledger
my $balanced_ledger = $totals{debit} + $totals{debit_tax} - $totals{credit} - $totals{credit_tax};
$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;
$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;
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}))) {
$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 };
'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',
<td valign="top">
<input type="checkbox" name="report_generator_csv_options_headers" id="report_generator_csv_options_headers" value="1" checked>
<label for="report_generator_csv_options_headers">[% 'Include column headings' | $T8 %]</label>
+ <input type="checkbox" name="report_generator_csv_options_for_import" id="report_generator_csv_options_for_import" value="1">
+ <label for="report_generator_csv_options_for_import">[% 'Make compatible for import' | $T8 %]</label>
</td>
</tr>