Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision e3f82371

Von Rolf Fluehmann vor mehr als 8 Jahren hinzugefügt

  • ID e3f8237101c331c52098cf6f7db86e1db2a2b36a
  • Vorgänger 73a78da6
  • Nachfolger 422f2f17

Erfolgsrechnung

Unterschiede anzeigen:

bin/mozilla/rp.pl
101 101
# $form->parse_html_template('rp/html_report_susa')
102 102

  
103 103
my $rp_access_map = {
104
  'projects'         => 'report',
105
  'ar_aging'         => 'general_ledger',
106
  'ap_aging'         => 'general_ledger',
107
  'receipts'         => 'cash',
108
  'payments'         => 'cash',
109
  'trial_balance'    => 'report',
110
  'income_statement' => 'report',
111
  'bwa'              => 'report',
112
  'balance_sheet'    => 'report',
104
  'projects'           => 'report',
105
  'ar_aging'           => 'general_ledger',
106
  'ap_aging'           => 'general_ledger',
107
  'receipts'           => 'cash',
108
  'payments'           => 'cash',
109
  'trial_balance'      => 'report',
110
  'income_statement'   => 'report',
111
  'erfolgsrechnung'    => 'report',
112
  'bwa'                => 'report',
113
  'balance_sheet'      => 'report',
113 114
};
114 115

  
115 116
sub check_rp_access {
......
129 130
  my %title = (
130 131
    balance_sheet        => $::locale->text('Balance Sheet'),
131 132
    income_statement     => $::locale->text('Income Statement'),
133
    erfolgsrechnung      => $::locale->text('Erfolgsrechnung'),
132 134
    trial_balance        => $::locale->text('Trial Balance'),
133 135
    ar_aging             => $::locale->text('Search AR Aging'),
134 136
    ap_aging             => $::locale->text('Search AP Aging'),
......
142 144

  
143 145
  $::form->{title} = $title{$::form->{report}};
144 146
  $::request->{layout}->add_javascripts('autocomplete_customer.js');
147
  $::form->{fromdate} = DateTime->today->truncate(to => 'year')->to_kivitendo;
148
  $::form->{todate} = DateTime->today->truncate(to => 'year')->add(years => 1)->add(days => -1)->to_kivitendo;
145 149

  
146 150
  # get departments
147 151
  $::form->all_departments(\%::myconfig);
......
152 156

  
153 157
  $::form->get_lists("projects" => { "key" => "ALL_PROJECTS", "all" => 1 });
154 158

  
155
  my $is_projects         = $::form->{report} eq "projects";
156
  my $is_income_statement = $::form->{report} eq "income_statement";
157
  my $is_bwa              = $::form->{report} eq "bwa";
158
  my $is_balance_sheet    = $::form->{report} eq "balance_sheet";
159
  my $is_trial_balance    = $::form->{report} eq "trial_balance";
160
  my $is_aging            = $::form->{report} =~ /^a[rp]_aging$/;
161
  my $is_payments         = $::form->{report} =~ /(receipts|payments)$/;
159
  my $is_projects            = $::form->{report} eq "projects";
160
  my $is_income_statement    = $::form->{report} eq "income_statement";
161
  my $is_erfolgsrechnung     = $::form->{report} eq "erfolgsrechnung";
162
  my $is_bwa                 = $::form->{report} eq "bwa";
163
  my $is_balance_sheet       = $::form->{report} eq "balance_sheet";
164
  my $is_trial_balance       = $::form->{report} eq "trial_balance";
165
  my $is_aging               = $::form->{report} =~ /^a[rp]_aging$/;
166
  my $is_payments            = $::form->{report} =~ /(receipts|payments)$/;
162 167

  
163 168
  my ($label, $nextsub, $vc);
164 169
  if ($is_aging) {
......
191 196

  
192 197
  $::form->header;
193 198
  print $::form->parse_html_template('rp/report', {
194
    paymentaccounts     => $paymentaccounts,
195
    selection           => $selection,
196
    is_aging            => $is_aging,
197
    vc                  => $vc,
198
    label               => $label,
199
    year                => DateTime->today->year,
200
    today               => DateTime->today,
201
    nextsub             => $nextsub,
202
    is_payments         => $is_payments,
203
    is_trial_balance    => $is_trial_balance,
204
    is_balance_sheet    => $is_balance_sheet,
205
    is_bwa              => $is_bwa,
206
    is_income_statement => $is_income_statement,
207
    is_projects         => $is_projects,
199
    paymentaccounts        => $paymentaccounts,
200
    selection              => $selection,
201
    is_aging               => $is_aging,
202
    vc                     => $vc,
203
    label                  => $label,
204
    year                   => DateTime->today->year,
205
    today                  => DateTime->today,
206
    nextsub                => $nextsub,
207
    is_payments            => $is_payments,
208
    is_trial_balance       => $is_trial_balance,
209
    is_balance_sheet       => $is_balance_sheet,
210
    is_bwa                 => $is_bwa,
211
    is_income_statement    => $is_income_statement,
212
    is_erfolgsrechnung     => $is_erfolgsrechnung,
213
    is_projects            => $is_projects,
208 214
  });
209 215

  
210 216
  $::lxdebug->leave_sub;
......
395 401
  $main::lxdebug->leave_sub();
396 402
}
397 403

  
404
sub generate_erfolgsrechnung {
405
  $::lxdebug->enter_sub;
406
  $::auth->assert('report');
407

  
408
  $::form->{decimalplaces} = $::form->{decimalplaces} * 1 || 2;
409
  $::form->{padding}       = " ";
410
  $::form->{bold}          = "<b>";
411
  $::form->{endbold}       = "</b>";
412
  $::form->{br}            = "<br>";
413

  
414
  my $data = RP->erfolgsrechnung(\%::myconfig, $::form);
415

  
416
  $::form->header();
417
  print $::form->parse_html_template('rp/erfolgsrechnung', $data);
418

  
419
  $::lxdebug->leave_sub;
420
}
421

  
422

  
398 423
sub generate_balance_sheet {
399 424
  $::lxdebug->enter_sub;
400 425
  $::auth->assert('report');

Auch abrufbar als: Unified diff