gelöschte Benutzer in ir/form_header ausblenden
authorSven Schöling <s.schoeling@linet-services.de>
Mon, 13 Feb 2012 13:25:24 +0000 (14:25 +0100)
committerSven Schöling <s.schoeling@linet-services.de>
Mon, 13 Feb 2012 13:25:24 +0000 (14:25 +0100)
bin/mozilla/ir.pl
templates/webpages/ir/form_header.html

index 810e06a..cd4591d 100644 (file)
@@ -287,13 +287,13 @@ sub form_header {
                    "projects"      => { "key"    => "ALL_PROJECTS",
                                         "all"    => 0,
                                         "old_id" => \@old_project_ids },
-                   "employees"     => "ALL_EMPLOYEES",
                    "taxzones"      => "ALL_TAXZONES",
                    "currencies"    => "ALL_CURRENCIES",
                    "vendors"       => "ALL_VENDORS",
                    "departments"   => "all_departments",
                    "price_factors" => "ALL_PRICE_FACTORS");
 
+  $TMPL_VAR{ALL_EMPLOYEES}         = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{employee_id},  deleted => 0 ] ]);
   $TMPL_VAR{ALL_CONTACTS}          = SL::DB::Manager::Contact->get_all(query => [
     or => [
       cp_cv_id => $::form->{"$::form->{vc}_id"} * 1,
@@ -303,8 +303,6 @@ sub form_header {
       ]
     ]
   ]);
-  $TMPL_VAR{sales_employee_labels} = sub { $_[0]->{name} || $_[0]->{login} };
-#  $TMPL_VAR{shipto_labels}         = sub { join "; ", grep { $_ } map { $_[0]->{"shipto${_}" } } qw(name department_1 street city) };
   $TMPL_VAR{department_labels}     = sub { "$_[0]->{description}--$_[0]->{id}" };
 
   # customer
index 697e3e5..d8a44e1 100644 (file)
       <table>
         <tr>
           <th align="right">[% 'Employee' | $T8 %]</th>
-          <td>
-            [%- INCLUDE 'generic/multibox.html'
-                 name       = 'employee_id',
-                 DATA       = ALL_EMPLOYEES,
-                 id_key     = 'id',
-                 label_sub  = 'sales_employee_labels' -%]
-          </td>
+          <td>[% L.select_tag('employee_id', L.options_for_select(ALL_EMPLOYEES, default=employee_id, title='safe_name')) %]</td>
         </tr>
 
 [%- IF is_type_credit_note %]