X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fvk.pl;h=ea05ab41b654286d4ef43aa736f928206b550476;hb=08e820fa7a9aa4beae1da564b69a1362e6020121;hp=c7a886feb4ea5ac6fdab22e9077abd793cda3690;hpb=c17d679a939585324f8690e04c4d32ff4a1f4053;p=kivitendo-erp.git diff --git a/bin/mozilla/vk.pl b/bin/mozilla/vk.pl index c7a886feb..ea05ab41b 100644 --- a/bin/mozilla/vk.pl +++ b/bin/mozilla/vk.pl @@ -36,12 +36,12 @@ use POSIX qw(strftime); use List::Util qw(sum first); use SL::AM; +use SL::DB::Employee; use SL::VK; use SL::IS; use SL::ReportGenerator; use Data::Dumper; -require "bin/mozilla/arap.pl"; require "bin/mozilla/common.pl"; require "bin/mozilla/reportgenerator.pl"; @@ -57,18 +57,17 @@ sub search_invoice { my ($customer); - # setup customer selection - $form->all_vc(\%myconfig, "customer", "AR"); + $::request->layout->add_javascripts("autocomplete_project.js"); $form->{title} = $locale->text('Sales Report'); - $form->get_lists("projects" => { "key" => "ALL_PROJECTS", "all" => 1 }, - "departments" => "ALL_DEPARTMENTS", + $form->get_lists("departments" => "ALL_DEPARTMENTS", "business_types" => "ALL_BUSINESS_TYPES", "salesmen" => "ALL_SALESMEN", - 'employees' => 'ALL_EMPLOYEES', - 'partsgroup' => 'ALL_PARTSGROUPS', - "customers" => "ALL_VC"); + 'partsgroup' => 'ALL_PARTSGROUPS'); + + $form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all_sorted; + $form->{CUSTOM_VARIABLES_IC} = CVar->get_configs('module' => 'IC'); ($form->{CUSTOM_VARIABLES_FILTER_CODE_IC}, $form->{CUSTOM_VARIABLES_INCLUSION_CODE_IC}) = CVar->render_search_options('variables' => $form->{CUSTOM_VARIABLES_IC}, @@ -80,10 +79,6 @@ sub search_invoice { $form->{CUSTOM_VARIABLES_INCLUSION_CODE_CT}) = CVar->render_search_options('variables' => $form->{CUSTOM_VARIABLES_CT}, 'include_prefix' => 'l_', 'include_value' => 'Y'); - $form->{vc_keys} = sub { "$_[0]->{name}--$_[0]->{id}" }; - $form->{employee_labels} = sub { $_[0]->{"name"} || $_[0]->{"login"} }; - $form->{salesman_labels} = $form->{employee_labels}; - $form->header; print $form->parse_html_template('vk/search_invoice', { %myconfig });