X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Frp.pl;h=abffd9728bea895332a70f1593a34f52afb9b83a;hb=300dc61894ebcb800a69eae3e81195d3c337747d;hp=87fae36ba56d0eba07ada9ce2a7e173a2dfea291;hpb=71d1fccd416499c24500f33d04651ac83a8d232c;p=kivitendo-erp.git
diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl
index 87fae36ba..abffd9728 100644
--- a/bin/mozilla/rp.pl
+++ b/bin/mozilla/rp.pl
@@ -221,10 +221,6 @@ sub generate_income_statement {
my %myconfig = %main::myconfig;
my $locale = $main::locale;
- my $defaults = SL::DB::Default->get;
- $form->error($::locale->text('No print templates have been created for this client yet. Please do so in the client configuration.')) if !$defaults->templates;
- $form->{templates} = $defaults->templates;
-
$form->{padding} = " ";
$form->{bold} = "";
$form->{endbold} = "";
@@ -376,11 +372,11 @@ sub generate_income_statement {
}
if ( $::instance_conf->get_profit_determination eq 'balance' ) {
- $form->{income_statement_title} = $locale->text('Income Statement');
+ $form->{title} = $locale->text('Income Statement');
} elsif ( $::instance_conf->get_profit_determination eq 'income' ) {
- $form->{income_statement_title} = $locale->text('Net Income Statement');
+ $form->{title} = $locale->text('Net Income Statement');
} else {
- $form->{income_statement_title} = "";
+ $form->{title} = "";
};
if ( $form->{method} eq 'cash' ) {
@@ -391,11 +387,10 @@ sub generate_income_statement {
$form->{accounting_method} = "";
};
- $::form->{report_date} = $locale->text('Report date') . ": " . $::form->current_date;
-
- $form->{IN} = "income_statement.html";
+ $form->{report_date} = $locale->text('Report date') . ": " . $form->current_date;
- $form->parse_template;
+ $form->header;
+ print $form->parse_html_template('rp/income_statement');
$main::lxdebug->leave_sub();
}
@@ -404,9 +399,6 @@ sub generate_balance_sheet {
$::lxdebug->enter_sub;
$::auth->assert('report');
- my $defaults = SL::DB::Default->get;
- $::form->error($::locale->text('No print templates have been created for this client yet. Please do so in the client configuration.')) if !$defaults->templates;
- $::form->{templates} = $defaults->templates;
$::form->{decimalplaces} = $::form->{decimalplaces} * 1 || 2;
$::form->{padding} = " ";
$::form->{bold} = "";
@@ -1652,10 +1644,6 @@ sub generate_bwa {
my %myconfig = %main::myconfig;
my $locale = $main::locale;
- my $defaults = SL::DB::Default->get;
- $form->error($::locale->text('No print templates have been created for this client yet. Please do so in the client configuration.')) if !$defaults->templates;
- $form->{templates} = $defaults->templates;
-
$form->{padding} = " ";
$form->{bold} = "";
$form->{endbold} = "";
@@ -1843,9 +1831,20 @@ sub generate_bwa {
. qq| $longtodate|;
}
- $form->{IN} = "bwa.html";
+ $form->{report_date} = $locale->text('Report date') . ": " . $form->current_date;
+
+ if ( $form->{method} eq 'cash' ) {
+ $form->{accounting_method} = $locale->text('Cash accounting');
+ } elsif ( $form->{method} eq 'accrual' ) {
+ $form->{accounting_method} = $locale->text('Accrual accounting');
+ } else {
+ $form->{accounting_method} = "";
+ };
+
+ $form->{title} = $locale->text('BWA');
- $form->parse_template;
+ $form->header;
+ print $form->parse_html_template('rp/bwa');
$main::lxdebug->leave_sub();
}