X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Frp.pl;h=02023f532089bf39fc32626ad609a867c7519357;hb=f04e9769b7015b54a3d3ceb87072cc31579c5470;hp=abffd9728bea895332a70f1593a34f52afb9b83a;hpb=efb9a24f2252104ab4af5c25334119d7c5c70a8c;p=kivitendo-erp.git diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl index abffd9728..02023f532 100644 --- a/bin/mozilla/rp.pl +++ b/bin/mozilla/rp.pl @@ -39,6 +39,7 @@ use POSIX qw(strftime); use SL::DB::Default; use SL::DB::Project; +use SL::DB::Customer; use SL::PE; use SL::RP; use SL::Iconv; @@ -140,6 +141,7 @@ sub report { ); $::form->{title} = $title{$::form->{report}}; + $::request->{layout}->add_javascripts('autocomplete_customer.js'); # get departments $::form->all_departments(\%::myconfig); @@ -630,6 +632,11 @@ sub generate_trial_balance { $form->{company} = $locale->text('Company') . " " . $defaults->company; push (@options, $form->{company}); + if ($::form->{customer_id}) { + my $customer = SL::DB::Manager::Customer->find_by(id => $::form->{customer_id}); + push @options, $::locale->text('Customer') . ' ' . $customer->displayable_name; + } + $form->{template_to} = $locale->date(\%myconfig, $form->{todate}, 0); @@ -1789,8 +1796,7 @@ sub generate_bwa { # if (defined ($form->{fromdate|todate}=='..')) # immer wahr if ($form->{fromdate}){ - my ($yy, $mm, $dd) = $locale->parse_date(\%myconfig, $form->{fromdate}); - my $datetime = $locale->parse_date_to_object(\%myconfig, $form->{fromdate}); + my $datetime = $locale->parse_date_to_object($form->{fromdate}); $datetime->set( month => 1, day => 1); $form->{comparefromdate} = $locale->format_date(\%::myconfig, $datetime); @@ -1843,6 +1849,7 @@ sub generate_bwa { $form->{title} = $locale->text('BWA'); + $::request->layout->add_stylesheets('bwa.css'); $form->header; print $form->parse_html_template('rp/bwa');