X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Frp.pl;h=abffd9728bea895332a70f1593a34f52afb9b83a;hb=5b8e9fcb2f9c94d69519c927b8aa59184d93cea3;hp=f257b51b8ed2dba1045214f8fd881a4a89a4ad2b;hpb=670205aa27d6491f1a88c9da902ae316a17614f3;p=kivitendo-erp.git diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl index f257b51b8..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} = ""; @@ -403,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} = ""; @@ -1651,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} = ""; @@ -1842,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(); }