-
- | | . $locale->text('Customized Report') . qq| |
-
-
- | | . $locale->text('Year') . qq| |
- |
-
-|;
-
- print qq|
-
- | | . $locale->text('Yearly') . qq| |
- | . $locale->text('Quarterly') . qq| |
- | . $locale->text('Monthly') . qq| |
-
-
- | |
- 1. | . $locale->text('Quarter') . qq| |
-|;
- $checked = "checked";
- print qq|
- | . $locale->text('January') . qq| |
-|;
- $checked = "";
- print qq|
- | . $locale->text('May') . qq| |
- | . $locale->text('September') . qq| |
-
-
-
- | |
- 2. | . $locale->text('Quarter') . qq| |
- | . $locale->text('February') . qq| |
- | . $locale->text('June') . qq| |
- | . $locale->text('October') . qq| |
-
-
- | |
- 3. | . $locale->text('Quarter') . qq| |
- | . $locale->text('March') . qq| |
- | . $locale->text('July') . qq| |
- | . $locale->text('November') . qq| |
-
-
-
- | |
- 4. | . $locale->text('Quarter') . qq| |
- | . $locale->text('April') . qq| |
- | . $locale->text('August') . qq| |
- | . $locale->text('December') . qq| |
-
-
-
-
|
-
-
- | | . $locale->text('Free report period') . qq| |
- | . $locale->text('From') . qq|
- $button1
- $button1_2
- | . $locale->text('Bis') . qq|
- $button2
- $button2_2
- |
-
-
-
|
-
-
- | | . $locale->text('Method') . qq| |
- | . $locale->text('Accrual') . qq|
- | . $locale->text('EUR') . qq| |
-
-
- | | . $locale->text('All Accounts') . qq| |
- |
-
-
- | | . $locale->text('Decimalplaces') . qq| |
- |
-
-
-$jsscript
-|;
- }
+ $::form->header;
+ print $::form->parse_html_template('rp/report', {
+ paymentaccounts => $paymentaccounts,
+ selection => $selection,
+ is_aging => $is_aging,
+ vc => $vc,
+ label => $label,
+ year => DateTime->today->year,
+ today => DateTime->today,
+ nextsub => $nextsub,
+ accrual => $::instance_conf->get_accounting_method ne 'cash',
+ cash => $::instance_conf->get_accounting_method eq 'cash',
+ is_payments => $is_payments,
+ is_trial_balance => $is_trial_balance,
+ is_balance_sheet => $is_balance_sheet,
+ is_bwa => $is_bwa,
+ is_income_statement => $is_income_statement,
+ is_income_statement_ch => $is_income_statement_ch,
+ is_projects => $is_projects,
+ });
- if ($form->{report} =~ /^tax_/) {
- $form->{db} = ($form->{report} =~ /_collected/) ? "ar" : "ap";
+ $::lxdebug->leave_sub;
+}
- RP->get_taxaccounts(\%myconfig, \%$form);
+sub continue { call_sub($main::form->{"nextsub"}); }
- print qq|
-
-
- | | . $locale->text('From') . qq| |
- {fromdate}> |
- | . $locale->text('Bis') . qq| |
- |
-
-
- | | . $locale->text('Report for') . qq| |
-
-|;
+sub generate_income_statement {
+ $main::lxdebug->enter_sub();
- $checked = "checked";
- foreach my $ref (@{ $form->{taxaccounts} }) {
+ $main::auth->assert('report');
- print
- qq|{accno} $checked> $ref->{description}
+ my $form = $main::form;
+ my %myconfig = %main::myconfig;
+ my $locale = $main::locale;
-
- |;
+ $form->{padding} = " ";
+ $form->{bold} = "";
+ $form->{endbold} = "";
+ $form->{br} = " ";
- $checked = "";
+ if ($form->{reporttype} eq "custom") {
+ #forgotten the year --> thisyear
+ if ($form->{year} !~ m/^\d\d\d\d$/) {
+ $locale->date(\%myconfig, $form->current_date(\%myconfig), 0) =~
+ /(\d\d\d\d)/;
+ $form->{year} = $1;
}
- print qq|
- {db}>
-
-
- |
-
-
- | | . $locale->text('Method') . qq| |
- | . $locale->text('Accrual') . qq|
- | . $locale->text('EUR') . qq| |
-
-
-