- $padding = ($form->{l_heading}) ? $form->{padding} : "";
- push(@{ $form->{equity_account} },
- $padding . $locale->text('Current Earnings'));
-
- $form->{this_period} = $locale->date(\%myconfig, $form->{asofdate}, 0);
- $form->{last_period} =
- $locale->date(\%myconfig, $form->{compareasofdate}, 0);
-
- my $attachment_basename;
-
- my $report = SL::ReportGenerator->new(\%myconfig, $form);
-
- my @hidden_variables = ();
- push @hidden_variables, qw(fromdate todate year cash );
-
- my $href = build_std_url('action=orders', grep { $form->{$_} } @hidden_variables);
-
- my %column_defs = (
- 'accno' => { 'text' => $locale->text('Account Number'), },
- 'description' => { 'text' => $locale->text('Description'), },
- 'last_transaction' => { 'text' => $locale->text('Last Transaction'), },
- 'soll_eb' => { 'text' => $locale->text('Debit Starting Balance'), },
- 'haben_eb' => { 'text' => $locale->text('Credit Starting Balance'), },
- 'soll' => { 'text' => $locale->text('Debit'), },
- 'haben' => { 'text' => $locale->text('Credit'), },
- 'soll_kumuliert' => { 'text' => $locale->text('Sum Debit'), },
- 'haben_kumuliert' => { 'text' => $locale->text('Sum Credit'), },
- 'soll_saldo' => { 'text' => $locale->text('Saldo Debit'), },
- 'haben_saldo' => { 'text' => $locale->text('Saldo Credit'), }
- );
-
-
-
- my %column_alignment = map { $_ => 'right' } qw(soll_eb haben_eb soll haben soll_kumuliert haben_kumuliert soll_saldo haben_saldo);
-
- map { $column_defs{$_}->{visible} = 1 } @columns;
-
- $report->set_columns(%column_defs);
- $report->set_column_order(@columns);
-
- $report->set_export_options('trial_balance', @hidden_variables);
-
- $report->set_sort_indicator($form->{sort}, 1);
-
- my @options;
-
-
- $form->{template_fromto} = $locale->date(\%myconfig, $form->{fromdate}, 0) . " - " . $locale->date(\%myconfig, $form->{todate}, 0);
- $form->{template_to} = $locale->date(\%myconfig, $form->{todate}, 0);
-
- $report->set_options('output_format' => 'HTML',
- 'title' => $form->{title},
- 'attachment_basename' => $attachment_basename . strftime('_%Y%m%d', localtime time),
- );
- $report->set_options_from_form();
- # $form->parse_html_template('report_generator/html_report_bilanz', $variables));
- $form->{report_template} = 'report_generator/html_report_bilanz';
- # add sort and escape callback, this one we use for the add sub
- $form->{callback} = $href .= "&sort=$form->{sort}";
-
- # escape callback for href
- $callback = $form->escape($href);