Merge branch 'master' of github.com:kivitendo/kivitendo-erp
[kivitendo-erp.git] / templates / webpages / do / search.html
index b2ad170..95a2c8b 100644 (file)
@@ -1,7 +1,6 @@
 [%- USE T8 %]
 [%- USE L %]
-[% USE HTML %][% USE LxERP %]<body onload="on_load();">
-
+[%- USE HTML %][%- USE LxERP %]
  [%- IF vc == 'customer' %]
  [%- SET is_customer = '1' %]
  [%- ELSE %]
@@ -9,13 +8,7 @@
  [%- END %]
 
  <script type="text/javascript">
-  <!--
-      function on_load() {
-        Calendar.setup({ inputField : "transdatefrom", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "transdatefrom_trigger" });
-        Calendar.setup({ inputField : "transdateto",   ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "transdateto_trigger" });
-        document.Form.donumber.focus();
-      }
-    -->
+   $(function(){ document.Form.donumber.focus(); });
  </script>
 
  <style type="text/css">
@@ -64,7 +57,7 @@
       <select name="department" class="fixed_width">
        <option></option>
        [%- FOREACH row = ALL_DEPARTMENTS %]
-       <option[% IF department == row.value %] selected[% END %]>[% HTML.escape(row.description) %]--[% HTML.escape(row.id) %]</option>
+       <option[% IF department == row.id %] selected[% END %]>[% HTML.escape(row.description) %]--[% HTML.escape(row.id) %]</option>
        [%- END %]
       </select>
      </td>
 
     <tr>
      <th align="right">[% 'Employee' | $T8 %]</th>
-     <td>[% L.select_tag('employee_id', L.options_for_select(ALL_EMPLOYEES, title='safe_name', with_empty=1), class='fixed_width') %]</td>
+     <td>[% L.select_tag('employee_id', ALL_EMPLOYEES, title_key = 'safe_name', with_empty = 1, class = 'fixed_width') %]</td>
     </tr>
 
     [%- IF is_customer %]
     <tr>
      <th align="right">[% 'Salesman' | $T8 %]</th>
-     <td>[% L.select_tag('salesman_id', L.options_for_select(ALL_EMPLOYEES, title='safe_name', with_empty=1), class='fixed_width') %]</td>
+     <td>[% L.select_tag('salesman_id', ALL_EMPLOYEES, title_key = 'safe_name', with_empty = 1, class = 'fixed_width') %]</td>
     </tr>
     [%- END %]
 
     </tr>
 
     <tr>
-     <th align="right">[% 'From' | $T8 %]</th>
+     <th align="right">[% 'Serial Number' | $T8 %]</th>
+     <td colspan="3"><input name="serialnumber" class="fixed_width"></td>
+    </tr>
+
+    <tr>
+     <th align="right">[% 'Delivery Order Date' | $T8 %] [% 'From' | $T8 %]</th>
+     <td>
+      [% L.date_tag('transdatefrom') %]
+     </td>
+     <th align="right">[% 'Bis' | $T8 %]</th>
+     <td>
+      [% L.date_tag('transdateto') %]
+     </td>
+    </tr>
+
+    <tr>
+     <th align="right">[% 'Reqdate' | $T8 %] [% 'From' | $T8 %]</th>
      <td>
-      <input name="transdatefrom" id="transdatefrom" size="11" title="[% myconfig_dateformat %]" onBlur="check_right_date_format(this)">
-      <input type="button" name="transdatefrom_button" id="transdatefrom_trigger" value="?">
+      [% L.date_tag('reqdatefrom') %]
      </td>
      <th align="right">[% 'Bis' | $T8 %]</th>
      <td>
-      <input name="transdateto" id="transdateto" size="11" title="[% myconfig_dateformat %]" onBlur="check_right_date_format(this)">
-      <input type="button" name="transdateto_button" id="transdateto_trigger" value="?">
+      [% L.date_tag('reqdateto') %]
      </td>
     </tr>
 
        <tr>
         <td>
          <input name="l_transdate" id="l_transdate" class="checkbox" type="checkbox" value="Y" checked>
-         <label for="l_transdate">[% 'Date' | $T8 %]</label>
+         <label for="l_transdate">[% 'Delivery Order Date' | $T8 %]</label>
+        </td>
+        <td>
+         <input name="l_reqdate" id="l_reqdate" class="checkbox" type="checkbox" value="Y" checked>
+         <label for="l_reqdate">[% 'Reqdate' | $T8 %]</label>
         </td>
+       </tr>
 
+       <tr>
         <td>
          <input name="l_name" id="l_name" class="checkbox" type="checkbox" value="Y" checked>
          <label for="l_name">[% IF is_customer %][% 'Customer' | $T8 %][% ELSE %][% 'Vendor' | $T8 %][% END %]</label>
         </td>
+
+        [% IF is_customer %]
+        <td>
+         <input name="l_customernumber" id="l_customernumber" class="checkbox" type="checkbox" value="Y">
+         <label for="l_customernumber">[% 'Customer Number' | $T8 %]</label>
+        </td>
+        [% END %]
+       </tr>
+
+       <tr>
+        <td>
+         <input name="l_department" id="l_department" class="checkbox" type="checkbox" value="Y">
+         <label for="l_department">[% "Department" | $T8 %]</label>
+        </td>
+
+        <td>
+         <input name="l_shipvia" id="l_shipvia" class="checkbox" type="checkbox" value="Y">
+         <label for="l_shipvia">[% 'Ship via' | $T8 %]</label>
+        </td>
        </tr>
 
        <tr>
          <input name="l_salesman" id="l_salesman" class="checkbox" type="checkbox" value="Y">
          <label for="l_salesman">[% 'Salesman' | $T8 %]</label>
         </td>
-
-        <td>
-         <input name="l_shipvia" id="l_shipvia" class="checkbox" type="checkbox" value="Y">
-         <label for="l_shipvia">[% 'Ship via' | $T8 %]</label>
-        </td>
        </tr>
 
        <tr>
    <input class="submit" type="submit" name="action" value="[% 'Continue' | $T8 %]">
   </p>
  </form>
-
-</body>
-</html>
-