gelöschte Benutzer in dunning/search ausblenden.
authorSven Schöling <s.schoeling@linet-services.de>
Mon, 13 Feb 2012 10:52:44 +0000 (11:52 +0100)
committerSven Schöling <s.schoeling@linet-services.de>
Mon, 13 Feb 2012 10:52:44 +0000 (11:52 +0100)
bin/mozilla/dn.pl
templates/webpages/dunning/search.html

index 4b6210b..07b1000 100644 (file)
@@ -301,8 +301,8 @@ sub search {
   $main::auth->assert('dunning_edit');
 
   $form->get_lists("customers"   => "ALL_CUSTOMERS",
-                   "departments" => "ALL_DEPARTMENTS",
-                   "salesmen"     => "ALL_SALESMEN");
+                   "departments" => "ALL_DEPARTMENTS");
+  $form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ deleted => 0 ]);
 
   DN->get_config(\%myconfig, \%$form);
 
@@ -313,7 +313,6 @@ sub search {
   $form->{jsscript} = 1;
   $form->{title}    = $locale->text('Dunnings');
   $form->{fokus}    = "search.customer";
-  $form->{salesman_labels} = sub { $_[0]->{"name"} || $_[0]->{"login"} };
 
   $form->header();
 
index 6611df2..c95829c 100644 (file)
@@ -1,5 +1,7 @@
 [%- USE T8 %]
-[% USE HTML %]<body onLoad="[% onload %]">
+[%- USE HTML %]
+[%- USE L %]
+<body onLoad="[% onload %]">
 
  <script type="text/javascript" src="js/common.js"></script>
 
       </tr>
       <tr>
        <th align="right">[% 'Salesman' | $T8 %]</th>
-       <td>
-        [%- INCLUDE 'generic/multibox.html'
-            name          = 'salesman_id',
-            style         = 'width: 250px',
-            DATA          =  ALL_SALESMEN,
-            id_key        = 'id',
-            label_sub     = 'salesman_labels',
-            limit         = vclimit,
-            show_empty    = 1,
-            allow_textbox = 0,
-         -%]
-       </td>
+       <td>[% L.select_tag('salesman_id', L.options_for_select(ALL_EMPLOYEES, title='safe_name', with_empty=1), style='width:250px') %]</td>
       </tr>
      </table>
     </td>