From: Sven Schöling Date: Mon, 13 Feb 2012 13:56:58 +0000 (+0100) Subject: gelöschte Benutzer in ct/form_header ausblenden X-Git-Tag: release-2.7.0beta2~5^2~19 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=3a6d52b8250bc5dad8862931e71189bc51308d70;p=kivitendo-erp.git gelöschte Benutzer in ct/form_header ausblenden --- diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index b525535c2..2eb6c242f 100644 --- a/bin/mozilla/ct.pl +++ b/bin/mozilla/ct.pl @@ -314,17 +314,17 @@ sub form_header { my %myconfig = %main::myconfig; my $locale = $main::locale; - $form->get_lists(employees => "ALL_EMPLOYEES", - taxzones => "ALL_TAXZONES", + $form->get_lists(taxzones => "ALL_TAXZONES", currencies => "ALL_CURRENCIES"); $form->get_pricegroup(\%myconfig, { all => 1 }); $form->get_lists(customers => { key => "ALL_SALESMAN_CUSTOMERS", business_is_salesman => 1 }) if $::lx_office_conf{features}->{vertreter}; + $form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{FU_created_for_user}, deleted => 0 ] ]); + $form->{ALL_SALESMEN} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{salesman_id}, deleted => 0 ] ]); + $form->{USER} = SL::DB::Manager::Employee->current; - $form->{ALL_SALESMEN} = $form->{ALL_EMPLOYEES}; $form->{taxincluded} = ($form->{taxincluded}) ? "checked" : ""; $form->{is_customer} = $form->{db} eq 'customer'; - $form->{salesman_label} = sub { $_[0]->{name} ne "" ? $_[0]->{name} : $_[0]->{login} }; $form->{shipto_label} = \&_shipto_label; $form->{contacts_label} = \&_contacts_label; $form->{taxzone_id} = 0 if !$form->{id}; diff --git a/templates/webpages/ct/form_header.html b/templates/webpages/ct/form_header.html index 4d6ee5a29..501ebaae1 100644 --- a/templates/webpages/ct/form_header.html +++ b/templates/webpages/ct/form_header.html @@ -279,15 +279,7 @@ [%- IF is_customer && !conf_vertreter %] [% 'Salesman' | $T8 %] - - [%- INCLUDE generic/multibox.html - name = 'salesman_id', - DATA = ALL_SALESMEN, - show_empty = 1, - id_key = 'id', - label_sub = 'salesman_label', - -%] - + [% L.select_tag('salesman_id', L.options_for_select(ALL_SALESMEN, default=salesman_id, show_empty=1, title='safe_name')) %] [%- END %] @@ -407,13 +399,7 @@ [% 'for' | $T8 %] - + [% L.select_tag('FU_created_for_user', L.options_for_select(ALL_EMPLOYEES, default=(FU_created_for_user ? FU_created_for_user : USER.id), title='safe_name')) %]