Merge branch 'master' of vc.linet-services.de:public/lx-office-erp
authorSven Schöling <s.schoeling@linet-services.de>
Mon, 13 Feb 2012 14:39:24 +0000 (15:39 +0100)
committerSven Schöling <s.schoeling@linet-services.de>
Mon, 13 Feb 2012 14:39:24 +0000 (15:39 +0100)
22 files changed:
SL/DB/Employee.pm
bin/mozilla/ar.pl
bin/mozilla/ct.pl
bin/mozilla/dn.pl
bin/mozilla/do.pl
bin/mozilla/fu.pl
bin/mozilla/gl.pl
bin/mozilla/ir.pl
bin/mozilla/is.pl
bin/mozilla/oe.pl
t/007broken_links.t
templates/webpages/ar/search.html
templates/webpages/ct/form_header.html
templates/webpages/do/form_header.html
templates/webpages/do/search.html
templates/webpages/dunning/search.html
templates/webpages/dunning/show_dunning_bottom.html
templates/webpages/gl/search.html
templates/webpages/ir/form_header.html
templates/webpages/is/form_header.html
templates/webpages/oe/form_header.html
templates/webpages/oe/search.html

index 8688e82..9244455 100644 (file)
@@ -12,4 +12,10 @@ sub has_right {
   return $::auth->check_right($self->login, $right);
 }
 
+sub safe_name {
+  my ($self) = @_;
+
+  return $self->name || $self->login;
+}
+
 1;
index a6e1220..cd30053 100644 (file)
@@ -1346,16 +1346,13 @@ sub search {
   $form->get_lists("projects"       => { "key" => "ALL_PROJECTS", "all" => 1 },
                    "departments"    => "ALL_DEPARTMENTS",
                    "customers"      => "ALL_VC",
-                   "employees"    => "ALL_EMPLOYEES",
-                   "salesmen"     => "ALL_SALESMEN",
                    "business_types" => "ALL_BUSINESS_TYPES");
+  $form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ deleted => 0 ]);
   $form->{SHOW_BUSINESS_TYPES} = scalar @{ $form->{ALL_BUSINESS_TYPES} } > 0;
 
   # constants and subs for template
   $form->{jsscript}  = 1;
   $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('ar/search', { %myconfig });
index b525535..2eb6c24 100644 (file)
@@ -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};
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 39cba4a..e16286d 100644 (file)
@@ -272,13 +272,14 @@ sub form_header {
                      "all"          => 0,
                      "old_id"       => \@old_project_ids
                    },
-                   "employees"      => "ALL_EMPLOYEES",
-                   "salesmen"       => "ALL_SALESMEN",
                    $vc              => "ALL_VC",
                    "price_factors"  => "ALL_PRICE_FACTORS",
                    "departments"    => "ALL_DEPARTMENTS",
                    "business_types" => "ALL_BUSINESS_TYPES",
     );
+
+  $::form->{ALL_EMPLOYEES}         = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{employee_id},  deleted => 0 ] ]);
+  $::form->{ALL_SALESMEN}          = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{salesman_id},  deleted => 0 ] ]);
   $::form->{ALL_CONTACTS}          = SL::DB::Manager::Contact->get_all(query => [
     or => [
       cp_cv_id => $::form->{"$::form->{vc}_id"} * 1,
@@ -448,9 +449,8 @@ sub search {
 
   $form->get_lists("projects"     => { "key" => "ALL_PROJECTS",
                                        "all" => 1 },
-                   "employees"    => "ALL_EMPLOYEES",
-                   "salesmen"     => "ALL_SALESMEN",
                    "$form->{vc}s" => "ALL_VC");
+  $form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ deleted => 0 ]);
 
   $form->{SHOW_VC_DROP_DOWN} =  $myconfig{vclimit} > scalar @{ $form->{ALL_VC} };
   $form->{jsscript}          = 1;
index 8870c2b..b2e6037 100644 (file)
@@ -384,7 +384,7 @@ sub edit_access_rights {
 
   my $access = FU->retrieve_access_rights();
 
-  $form->get_lists("employees" => "EMPLOYEES");
+  $form->{EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ deleted => 0 ]);
 
   map { $_->{access} = $access->{$_->{id}} } @{ $form->{EMPLOYEES} };
 
index a4f2d1d..ce1d1a9 100644 (file)
@@ -217,8 +217,8 @@ sub search {
   $::form->all_departments(\%::myconfig);
   $::form->get_lists(
     projects  => { key => "ALL_PROJECTS", all => 1 },
-    employees => "ALL_EMPLOYEES",
   );
+  $::form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ deleted => 0 ]);
 
   my $onload = "focus()"
              . qq|;setupDateFormat('|. $::myconfig{dateformat} . qq|', '| . $::locale->text("Falsches Datumsformat!") . qq|')|
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 685e7b1..6f433a9 100644 (file)
@@ -304,14 +304,14 @@ sub form_header {
                    "projects"      => { "key"    => "ALL_PROJECTS",
                                         "all"    => 0,
                                         "old_id" => \@old_project_ids },
-                   "employees"     => "ALL_EMPLOYEES",
-                   "salesmen"      => "ALL_SALESMEN",
                    "taxzones"      => "ALL_TAXZONES",
                    "currencies"    => "ALL_CURRENCIES",
                    "customers"     => "ALL_CUSTOMERS",
                    "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_SALESMEN}          = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{salesman_id},  deleted => 0 ] ]);
   $TMPL_VAR{ALL_CONTACTS}          = SL::DB::Manager::Contact->get_all(query => [
     or => [
       cp_cv_id => $::form->{"$::form->{vc}_id"} * 1,
@@ -321,7 +321,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}" };
 
index 1123151..3b62071 100644 (file)
@@ -331,8 +331,6 @@ sub form_header {
                    "projects"      => { "key"      => "ALL_PROJECTS",
                                         "all"      => 0,
                                         "old_id"   => \@old_project_ids },
-                   "employees"     => "ALL_EMPLOYEES",
-                   "salesmen"      => "ALL_SALESMEN",
                    "taxzones"      => "ALL_TAXZONES",
                    "payments"      => "ALL_PAYMENTS",
                    "currencies"    => "ALL_CURRENCIES",
@@ -342,6 +340,8 @@ sub form_header {
                    "price_factors" => "ALL_PRICE_FACTORS");
 
   # label subs
+  $TMPL_VAR{ALL_EMPLOYEES}         = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{employee_id},  deleted => 0 ] ]);
+  $TMPL_VAR{ALL_SALESMEN}          = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{salesman_id},  deleted => 0 ] ]);
   $TMPL_VAR{ALL_CONTACTS}          = SL::DB::Manager::Contact->get_all(query => [
     or => [
       cp_cv_id => $::form->{"$::form->{vc}_id"} * 1,
@@ -708,16 +708,13 @@ sub search {
   # setup vendor / customer data
   $form->all_vc(\%myconfig, $form->{vc}, ($form->{vc} eq 'customer') ? "AR" : "AP");
   $form->get_lists("projects"     => { "key" => "ALL_PROJECTS", "all" => 1 },
-                   "employees"    => "ALL_EMPLOYEES",
-                   "salesmen"     => "ALL_SALESMEN",
                    "departments"  => "ALL_DEPARTMENTS",
                    "$form->{vc}s" => "ALL_VC");
+  $form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ deleted => 0 ]);
 
   # constants and subs for template
   $form->{jsscript}        = 1;
-  $form->{employee_labels} = sub { $_[0]->{"name"} || $_[0]->{"login"} };
   $form->{vc_keys}         = sub { "$_[0]->{name}--$_[0]->{id}" };
-  $form->{salesman_labels} = $form->{employee_labels};
 
   $form->header();
 
index 5ac03bc..93148f4 100644 (file)
@@ -8,9 +8,13 @@
 
 use strict;
 use File::Find;
-use LWP::Simple;
-use Test::More tests => 1;
-use URI::Find;
+use Test::More;
+
+if (eval " use LWP::Simple; use URI::Find; 1 ") {
+  plan tests => 1;
+} else {
+  plan skip_all => "LWP::Simple or URI::Find not installed";
+}
 
 my @fails;
 
index a70816e..d0f529d 100644 (file)
@@ -1,4 +1,5 @@
 [%- USE T8 %]
+[%- USE L %]
 <body>
 
  <form method=post name="search" action=[% script %]>
      </tr>
      <tr>
       <th align="right">[% 'Employee' | $T8 %]</th>
-      <td>
-             [%- INCLUDE 'generic/multibox.html'
-                  name          = 'employee_id',
-                  style         = 'width: 250px',
-                  DATA          =  ALL_EMPLOYEES,
-                  id_key        = 'id',
-                  label_sub     = 'employee_labels',
-                  limit         = vclimit,
-                  show_empty    = 1,
-                  allow_textbox = 0,
-                  default       = ' ',
-             -%]
-      </td>
+      <td>[% L.select_tag('employee_id', L.options_for_select(ALL_EMPLOYEES, title='safe_name', with_empty=1), style='width:250px') %]</td>
      </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>
      <tr>
       <th align=right nowrap>[% 'Transaction description' | $T8 %]</th>
index 4d6ee5a..501ebaa 100644 (file)
       </td>
       [%- IF is_customer && !conf_vertreter %]
       <th align="right">[% 'Salesman' | $T8 %]</th>
-      <td>
-       [%- INCLUDE generic/multibox.html
-             name       = 'salesman_id',
-             DATA       = ALL_SALESMEN,
-             show_empty = 1,
-             id_key     = 'id',
-             label_sub  = 'salesman_label',
-       -%]
-      </td>
+      <td>[% L.select_tag('salesman_id', L.options_for_select(ALL_SALESMEN, default=salesman_id, show_empty=1, title='safe_name')) %]</td>
       [%- END %]
      </tr>
     </table>
         <input name="FU_date" id="FU_date" value="[% HTML.escape(FU_date) %]" size="12">
         <input type="button" name="FU_date_button" id="FU_date_trigger" value="?">
         [% 'for' | $T8 %]
-        <select name="FU_created_for_user">
-         [%- FOREACH row = ALL_EMPLOYEES %]
-         <option value="[% HTML.escape(row.id) %]"[% IF (NOTE_id && (row.id == FU_created_for_user)) || (row.login == login) %] selected[% END %]>
-          [%- IF row.name %][%- HTML.escape(row.name) %] ([% HTML.escape(row.login) %])[% ELSE %][% HTML.escape(row.login) %][% END %]
-         </option>
-         [%- END %]
-        </select>
+        [% 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')) %]
        </td>
       </tr>
 
index 3ed1be2..b195637 100644 (file)
          [% IF row.id == employee_id %][%- IF row.name %][%- HTML.escape(row.name) %][%- ELSE %][% HTML.escape(row.login) %][%- END %][% END %]
          [%- END %]
          [%- ELSE %]
-         <select name="employee_id">
-          [%- FOREACH row = ALL_EMPLOYEES %]
-          <option value="[% HTML.escape(row.id) %]"[% IF row.id == employee_id %] selected[% END %]>
-           [%- IF row.name %][%- HTML.escape(row.name) %][%- ELSE %][% HTML.escape(row.login) %][%- END %]
-          </option>
-          [%- END %]
-         </select>
+           [% L.select_tag('employee_id', L.options_for_select(ALL_EMPLOYEES, default=employee_id, title='safe_name')) %]
          [%- END %]
         </td>
        </tr>
          [% IF row.id == the_salesman_id %][%- IF row.name %][%- HTML.escape(row.name) %][%- ELSE %][% HTML.escape(row.login) %][%- END %][% END %]
          [%- END %]
          [%- ELSE %]
-         <select name="salesman_id">
-          [%- FOREACH row = ALL_SALESMEN %]
-          <option value="[% HTML.escape(row.id) %]"[% IF row.id == the_salesman_id %] selected[% END %]>
-           [%- IF row.name %][%- HTML.escape(row.name) %][%- ELSE %][% HTML.escape(row.login) %][%- END %]
-          </option>
-          [%- END %]
-         </select>
+          [% L.select_tag('salesman_id', L.options_for_select(ALL_SALESMEN, default=(salesman_id ? salesman_id : employee_id), title='safe_name')) %]
          [%- END %]
         </td>
        </tr>
index 811384c..b2ad170 100644 (file)
@@ -1,4 +1,5 @@
 [%- USE T8 %]
+[%- USE L %]
 [% USE HTML %][% USE LxERP %]<body onload="on_load();">
 
  [%- IF vc == 'customer' %]
 
     <tr>
      <th align="right">[% 'Employee' | $T8 %]</th>
-     <td>
-      <select name="employee_id" class="fixed_width">
-       <option></option>
-       [%- FOREACH row = ALL_EMPLOYEES %]
-       <option value="[% HTML.escape(row.id) %]">[% IF row.name %][% HTML.escape(row.name) %][% ELSE %][% HTML.escape(row.login) %][% END %]</option>
-       [%- END %]
-      </select>
-     </td>
+     <td>[% L.select_tag('employee_id', L.options_for_select(ALL_EMPLOYEES, title='safe_name', with_empty=1), class='fixed_width') %]</td>
     </tr>
 
     [%- IF is_customer %]
     <tr>
      <th align="right">[% 'Salesman' | $T8 %]</th>
-     <td>
-      <select name="salesman_id" class="fixed_width">
-       <option></option>
-       [%- FOREACH row = ALL_SALESMEN %]
-       <option value="[% HTML.escape(row.id) %]">[% IF row.name %][% HTML.escape(row.name) %][% ELSE %][% HTML.escape(row.login) %][% END %]</option>
-       [%- END %]
-      </select>
-     </td>
+     <td>[% L.select_tag('salesman_id', L.options_for_select(ALL_EMPLOYEES, title='safe_name', with_empty=1), class='fixed_width') %]</td>
     </tr>
     [%- END %]
 
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>
index f3eca31..2f05d15 100644 (file)
@@ -3,7 +3,7 @@
 
   <p>
     <input type="checkbox" name="force_lang" size="6" value="1" onclick="document.getElementsByName('language_id')[0].disabled = !document.getElementsByName('force_lang')[0].checked;">
-    [% 'Override invoice language' | T8 %]
+    [% 'Override invoice language' | $T8 %]
     [% PRINT_OPTIONS %]
   </p>
 
index 0d3a155..6c5b7d7 100644 (file)
@@ -44,7 +44,7 @@
         </tr>
  <tr>
     <th align=right>[% 'Employee' | $T8 %]</th>
-    <td colspan=3>[% L.select_tag('employee', L.options_for_select(ALL_EMPLOYEES, value_sub=\employee_label, title='name', with_empty=1)) %]</td>
+    <td colspan=3>[% L.select_tag('employee', L.options_for_select(ALL_EMPLOYEES, title='safe_name', with_empty=1)) %]</td>
   </tr>
   <tr>
     <th align=right>[% 'Filter date by' | $T8 %]</th>
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 %]
index c322a77..6b25e8a 100644 (file)
         <tr>
           <th align="right">[% 'Employee' | $T8 %]</th>
           <td>
-            [% L.select_tag('employee_id', L.options_for_select(ALL_EMPLOYEES, default=employee_id, title_sub=\sales_employee_labels)) %]
+            [% L.select_tag('employee_id', L.options_for_select(ALL_EMPLOYEES, default=employee_id, title='safe_name')) %]
           </td>
         </tr>
 [%- IF ALL_SALESMEN.size %]
         <tr>
           <th align="right">[% 'Salesman' | $T8 %]</th>
           <td>
-            [% L.select_tag('salesman_id', L.options_for_select(ALL_SALESMEN, default=(salesman_id ? salesman_id : employee_id), title_sub=\sales_employee_labels)) %]
+            [% L.select_tag('salesman_id', L.options_for_select(ALL_SALESMEN, default=(salesman_id ? salesman_id : employee_id), title='safe_name')) %]
           </td>
         </tr>
 [%- END %]
index 3c17033..68c2286 100644 (file)
                   <tr>
                     <th align="right">[% 'Employee' | $T8 %]</th>
                     <td>
-                      [% L.select_tag('employee_id', L.options_for_select(ALL_EMPLOYEES, default=employee_id, title_sub=\sales_employee_labels)) %]
+                      [% L.select_tag('employee_id', L.options_for_select(ALL_EMPLOYEES, default=employee_id, title='safe_name')) %]
                     </td>
                   </tr>
 [%- IF is_sales and ALL_SALESMEN.size %]
                   <tr>
                     <th align="right">[% 'Salesman' | $T8 %]</th>
                     <td>
-                      [% L.select_tag('salesman_id', L.options_for_select(ALL_SALESMEN, default=(salesman_id ? salesman_id : employee_id), title_sub=\sales_employee_labels)) %]
+                      [% L.select_tag('salesman_id', L.options_for_select(ALL_SALESMEN, default=(salesman_id ? salesman_id : employee_id), title='safe_name')) %]
                     </td>
                   </tr>
 [%- END %]
index 22d83b0..8f39ea2 100644 (file)
     </tr>
     <tr>
      <th align="right">[% 'Employee' | $T8 %]</th>
-     <td>
-            [%- INCLUDE 'generic/multibox.html'
-                 name          = 'employee_id',
-                 style         = 'width: 250px',
-                 DATA          =  ALL_EMPLOYEES,
-                 id_key        = 'id',
-                 label_sub     = 'employee_labels',
-                 limit         = vclimit,
-                 show_empty    = 1,
-                 allow_textbox = 0,
-                 default       = ' ',
-            -%]
-     </td>
+     <td>[% L.select_tag('employee_id', L.options_for_select(ALL_EMPLOYEES, title='safe_name', with_empty=1), style='width:250px') %]</td>
     </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>
     <tr>
      <th align="right">[% 'Transaction description' | $T8 %]</th>