X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Frp.pl;h=c2ca6939dcf727d04191865de819414c48110119;hb=1f9b0c55e2288183a36b9026f1758a3921967811;hp=860d38f5ef96ae9036c0d190a6585eae361351eb;hpb=646cb2aa3a79d7b35a1673fc67cdf802e9cba515;p=kivitendo-erp.git diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl index 860d38f5e..c2ca6939d 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);