X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Frp.pl;h=abffd9728bea895332a70f1593a34f52afb9b83a;hb=766f5705ecb9cd56adfbffd94c871959bb64c6fd;hp=302dbc16e7f544f4ffb0ca9e5cd605e7732b4bb3;hpb=1e542cc70c846448b75be1f36becd61601a4b3d3;p=kivitendo-erp.git diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl index 302dbc16e..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} = ""; @@ -1648,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} = ""; @@ -1839,9 +1831,20 @@ sub generate_bwa { . qq| $longtodate|; } - $form->{IN} = "bwa.html"; + $form->{report_date} = $locale->text('Report date') . ": " . $form->current_date; - $form->parse_template; + 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->header; + print $form->parse_html_template('rp/bwa'); $main::lxdebug->leave_sub(); }