Lieferwertbericht um Filter nach Warengruppen erweitert
[kivitendo-erp.git] / templates / webpages / letter / search.html
index 90f46bb..3fd32dd 100644 (file)
@@ -1,8 +1,9 @@
 [% USE HTML %]
 [% USE T8 %]
 [% USE L %]
+[% USE P %]
 [% USE LxERP %]
-<form action="controller.pl" method="post" name="Form">
+<form action="controller.pl" method="post" name="Form" id="search_form">
 
 <div class='filter_toggle'>
 <a href='#' onClick='javascript:$(".filter_toggle").toggle()'>[% 'Show Filter' | $T8 %]</a>
    <th align='right'>[% 'Letternumber' | $T8 %]</th>
    <td>[% L.input_tag('filter.letternumber:substr::ilike', filter.letternumber_substr__ilike, style='width:250px') %]</th>
   </tr>
+[%- IF SELF.is_sales %]
   <tr>
    <td align="right">[% 'Customer' | $T8 %]</td>
-   <td>[% L.customer_vendor_picker('filter.customer_id', filter.customer_id, type='customer', style='width:250px') %]</td>
+   <td>[% P.customer_vendor.picker('filter.customer_id', filter.customer_id, type='customer', style='width:250px') %]</td>
   </tr>
-
+[%- ELSE %]
+  <tr>
+   <td align="right">[% 'Vendor' | $T8 %]</td>
+   <td>[% P.customer_vendor.picker('filter.vendor_id', filter.vendor_id, type='vendor', style='width:250px') %]</td>
+  </tr>
+[%- END %]
   <tr>
    <td align="right">[% 'Contact' | $T8 %]</td>
    <td>[% L.input_tag('filter.contact.cp_name:substr::ilike', filter.contact.cp_name_substr__ilike, style='width:250px') %]</th>
   </tr>
  </table>
 
+ [% L.hidden_tag('is_sales', SELF.is_sales) %]
  [% L.hidden_tag('sort_by', FORM.sort_by) %]
  [% L.hidden_tag('sort_dir', FORM.sort_dir) %]
  [% L.hidden_tag('page', FORM.page) %]
- [% L.hidden_tag('action', 'Letter/dispatch') %]
- [% L.submit_tag('action_list', LxERP.t8('Continue')) %]
-
-<a href='#' onClick='javascript:$("#filter_table input").val("");$("#filter_table input[type=checkbox]").prop("checked", 0);$("#filter_table select").prop("selectedIndex", 0);'>[% 'Reset' | $T8 %]</a>
+ [% L.button_tag("\$('#search_form').resetForm()", LxERP.t8("Reset")) %]
 </div>
-
 </form>