[% USE T8 %] [% USE L %] [% USE P %] [% USE LxERP %] [% USE HTML %]
[% BLOCK filter_toggle_panel %] [% # This code contains the form elements within the .filter-toggle-panel # This block must bear the name filter_toggle_panel # For more info have a look in common/toggle_panel.html %]
[% 'Part' | $T8 %]
[% 'Description' | $T8 %] [% L.input_tag('filter.name:substr::ilike', filter.name_substr__ilike, size = 20, class="wi-normal") %]
[% 'Type' | $T8 %] [% L.select_tag('filter.type', [ [ 'customer', LxERP.t8('Sales Price Rules '), ] [ 'vendor', LxERP.t8('Purchase Price Rules ') ] ], with_empty=1, default=filter.type, id='price_rule_filter_type', class="wi-normal") %]
[% 'Part' | $T8 %] [% P.part.picker('filter.item_type_matches[].part', FORM.filter.item_type_matches.0.part, class="wi-normal") %]
[% 'Partsgroup' | $T8 %] [% L.select_tag('filter.item_type_matches[].partsgroup', SELF.partsgroups, title_key='partsgroup', default=FORM.filter.item_type_matches.0.partsgroup, with_empty=1, class="wi-normal") %]
[% 'Qty' | $T8 %] [% L.input_tag('filter.item_type_matches[].qty', FORM.filter.item_type_matches.0.qty, class="wi-normal") %]
[% 'Business' | $T8 %] [% L.select_tag('filter.item_type_matches[].business', SELF.businesses, title_key='description', default=FORM.filter.item_type_matches.0.business, with_empty=1, class="wi-normal") %]
[% 'Dates' | $T8 %]
[% 'Reqdate' | $T8 %] [% L.date_tag('filter.item_type_matches[].reqdate', FORM.filter.item_type_matches.0.reqdate, class="wi-date") %]
[% 'Transdate Record' | $T8 %] [% L.date_tag('filter.item_type_matches[].transdate', FORM.filter.item_type_matches.0.transdate, class="wi-date") %]
[% 'Prices & Discounts' | $T8 %]
[% 'Pricegroup' | $T8 %] [% L.select_tag('filter.item_type_matches[].pricegroup', SELF.pricegroups, default=FORM.filter.item_type_matches.0.pricegroup, title_key='pricegroup', with_empty=1, class="wi-normal") %]
[% 'Price' | $T8 %] [% L.input_tag('filter.price:number', filter.price_number, size=20, class="wi-normal") %]
[% 'Reduced Master Data' | $T8 %] [% L.input_tag('filter.reduction:number', filter.reduction_number, size=20, class="wi-normal") %]
[% 'Discount' | $T8 %] [% L.input_tag('filter.discount:number', filter.discount_number, size=20, class="wi-normal") %]
[% 'Status' | $T8 %]
[% 'Priority' | $T8 %] [% L.select_tag('filter.priority', [ [ '', LxERP.t8('All') ], [ 3, LxERP.t8('Normal') ], [ 4 , LxERP.t8('Override')]], default=filter.priority, class="wi-normal") %]
[% 'Obsolete' | $T8 %] [% L.select_tag('filter.obsolete', [ [ '', LxERP.t8('Both') ], [ 0, LxERP.t8('Valid') ], [ 1 , LxERP.t8('Obsolete')]], default=filter.obsolete, class="wi-normal") %]

[% 'Has item type' | $T8 %]

[% FOREACH type = SELF.all_price_rule_item_types %]
[% L.checkbox_tag('filter.has_item_type[]', value=type.0, label=type.1, checked=filter.has_item_type_.${type.0}) %]
[% END %]
[% L.hidden_tag('sort_by', FORM.sort_by) %] [% L.hidden_tag('sort_dir', FORM.sort_dir) %] [% L.hidden_tag('page', FORM.page) %]
[% L.button_tag("\$('#search_form').resetForm()", LxERP.t8("Reset Filter"), class='neutral', type='reset') %]
[% END #BLOCK filter_toggle_panel %] [% INCLUDE 'common/toggle_panel.html' %]