Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 17b87579

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

  • ID 17b8757975a457334b07c1bb393787c0877e4595
  • Vorgänger 5d557254
  • Nachfolger f30b6f52

Revert der Änderungen an generate_balance_sheet aus r3102. Bilanzfunktion war dadurch nicht mehr funktional.

Unterschiede anzeigen:

bin/mozilla/rp.pl
1090 1090

  
1091 1091
  $auth->assert('report');
1092 1092

  
1093
  $form->{padding} = "  ";
1094
  $form->{bold}    = "<b>";
1095
  $form->{endbold} = "</b>";
1096
  $form->{br}      = "<br>";
1097

  
1093 1098
  RP->balance_sheet(\%myconfig, \%$form);
1094 1099

  
1095 1100
  $form->{asofdate} = $form->current_date(\%myconfig) unless $form->{asofdate};
......
1107 1112
  $form->{last_period} =
1108 1113
    $locale->date(\%myconfig, $form->{compareasofdate}, 0);
1109 1114

  
1110
  my $attachment_basename;
1111

  
1112
  my $report = SL::ReportGenerator->new(\%myconfig, $form);
1113

  
1114
  my @hidden_variables = ();
1115
  push @hidden_variables, qw(fromdate todate year cash );
1116

  
1117
  my $href = build_std_url('action=orders', grep { $form->{$_} } @hidden_variables);
1118

  
1119
  my %column_defs = (
1120
    'accno'                   => { 'text' => $locale->text('Account Number'), },
1121
    'description'             => { 'text' => $locale->text('Description'), },
1122
    'last_transaction'        => { 'text' => $locale->text('Last Transaction'), },
1123
    'soll_eb'                 => { 'text' => $locale->text('Debit Starting Balance'), },
1124
    'haben_eb'                => { 'text' => $locale->text('Credit Starting Balance'), },
1125
    'soll'                    => { 'text' => $locale->text('Debit'), },
1126
    'haben'                   => { 'text' => $locale->text('Credit'), },
1127
    'soll_kumuliert'          => { 'text' => $locale->text('Sum Debit'), },
1128
    'haben_kumuliert'         => { 'text' => $locale->text('Sum Credit'), },
1129
    'soll_saldo'              => { 'text' => $locale->text('Saldo Debit'), },
1130
    'haben_saldo'             => { 'text' => $locale->text('Saldo Credit'), }
1131
  );
1132

  
1133
  my %column_alignment = map { $_ => 'right' } qw(soll_eb haben_eb soll haben soll_kumuliert haben_kumuliert soll_saldo haben_saldo);
1134

  
1135
  map { $column_defs{$_}->{visible} =  1 } @columns;
1136

  
1137
  $report->set_columns(%column_defs);
1138
  $report->set_column_order(@columns);
1139

  
1140
  $report->set_export_options('trial_balance', @hidden_variables);
1141

  
1142
  $report->set_sort_indicator($form->{sort}, 1);
1143

  
1144
  my @options;
1145

  
1115
  $form->{IN} = "balance_sheet.html";
1146 1116

  
1147
  $form->{template_fromto} = $locale->date(\%myconfig, $form->{fromdate}, 0) . "&nbsp; - &nbsp;" . $locale->date(\%myconfig, $form->{todate}, 0);
1148
  $form->{template_to} = $locale->date(\%myconfig, $form->{todate}, 0);
1117
  # setup company variables for the form
1118
  map { $form->{$_} = $myconfig{$_}; } (qw(company address businessnumber nativecurr));
1149 1119

  
1150
  $report->set_options('output_format'        => 'HTML',
1151
                       'title'                => $form->{title},
1152
                       'attachment_basename'  => $attachment_basename . strftime('_%Y%m%d', localtime time),
1153
    );
1154
  $report->set_options_from_form();
1155
  # $form->parse_html_template('report_generator/html_report_bilanz', $variables));
1156
  $form->{report_template} = 'report_generator/html_report_bilanz';
1157
  # add sort and escape callback, this one we use for the add sub
1158
  $form->{callback} = $href .= "&sort=$form->{sort}";
1159

  
1160
  # escape callback for href
1161
  $callback = $form->escape($href);
1162

  
1163
  my @subtotal_columns = qw(soll_eb haben_eb soll haben soll_kumuliert haben_kumuliert soll_saldo haben_saldo);
1164

  
1165
  my %totals    = map { $_ => 0 } @subtotal_columns;
1166

  
1167
  my $edit_url = build_std_url('action=edit', 'type', 'vc');
1168

  
1169
#   foreach $accno (@{ $form->{TB} }) {
1170
#
1171
#     $accno->{soll} = $accno->{debit};
1172
#     $accno->{haben} = $accno->{credit};
1173
#     map { $totals{$_}    += $accno->{$_} } @subtotal_columns;
1174
#
1175
#     map { $accno->{$_} = $form->format_amount(\%myconfig, $accno->{$_}, 2) } qw(soll_eb haben_eb soll haben soll_kumuliert haben_kumuliert soll_saldo haben_saldo);
1176
#
1177
#     map { $accno->{$_} = ($accno->{$_} == 0) ? '' : $accno->{$_} } qw(soll_eb haben_eb soll haben soll_kumuliert haben_kumuliert soll_saldo haben_saldo);
1178
#
1179
#     my $row = { };
1180
#
1181
#     foreach my $column (@columns) {
1182
#       $row->{$column} = {
1183
#         'data'  => $accno->{$column},
1184
#         'align' => $column_alignment{$column},
1185
#       };
1186
#     }
1187
#
1188
#
1189
#     $row->{$ordnumber}->{link} = $edit_url . "&id=" . E($oe->{id}) . "&callback=${callback}";
1190
#
1191
#     my $row_set = [ $row ];
1192
#
1193
#
1194
#     $report->add_data($row_set);
1195
#
1196
#     $idx++;
1197
#   }
1198
#
1199
#   $report->add_separator();
1200
#
1201
#   $report->add_data(create_subtotal_row(\%totals, \@columns, \%column_alignment, \@subtotal_columns, 'listtotal'));
1202

  
1203
  $report->generate_with_headers();
1120
  $form->{templates} = $myconfig{templates};
1204 1121

  
1122
  $form->parse_template;
1205 1123

  
1206 1124
  $lxdebug->leave_sub();
1207 1125
}

Auch abrufbar als: Unified diff