+[%- USE T8 %]
+[% USE L %]
+[% USE HTML %][%- USE LxERP -%]<div class="listtop">[% 'Show parts' | $T8 %]</div>
+
+<form method="post" action="controller.pl">
+[% L.hidden_tag("action", "LoginScreen/login") %]
+[% L.hidden_tag("upgrade_action", "filter_parts") %]
+[% L.hidden_tag("no_layout", 1) %]
+
+<table>
+ <tbody>
+ <tr>
+ <th align="right">[% 'Partnumber' | $T8 %]</th>
+ <td>[% L.input_tag("filter_partnumber", filter_partnumber, size=20) %]</td>
+ </tr>
+
+ <tr>
+ <th align="right">[% 'Description' | $T8 %]</th>
+ <td>[% L.input_tag("filter_description", filter_description, size=20) %]</td>
+ </tr>
+
+ <tr>
+ <th align="right">[% 'Notes' | $T8 %]</th>
+ <td>[% L.input_tag("filter_notes", filter_notes, size=20) %]</td>
+ </tr>
+
+ <tr>
+ <th align="right">[% 'EAN' | $T8 %]</th>
+ <td>[% L.input_tag("filter_ean", filter_ean, size=20) %]</td>
+ </tr>
+
+ <tr>
+ <th align="right">[% 'Service, assembly or part' | $T8 %]</th>
+ <td>
+ <select name="filter_type">
+ <option value=""></option>
+ <option value="assembly" [% IF filter_type == 'assembly' %]selected[% END %]>[% 'Assembly' | $T8 %]</option>
+ <option value="service" [% IF filter_type == 'service' %]selected[% END %]>[% 'Service' | $T8 %]</option>
+ <option value="part" [% IF filter_type == 'part' %]selected[% END %]>[% 'Part' | $T8 %]</option>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <th align="right">[% 'Valid/Obsolete' | $T8 %]</th>
+ <td>
+ <select name="filter_obsolete">
+ <option value=""></option>
+ <option value="valid" [% IF filter_obsolete == 'valid' %]selected[% END %]>[% 'Valid' | $T8 %]</option>
+ <option value="obsolete" [% IF filter_obsolete == 'obsolete' %]selected[% END %]>[% 'Obsolete' | $T8 %]</option>
+ </select>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+<input type="submit" value="[% 'Filter parts' | $T8 %]" onclick="submit()">
+
+<table>
+ <tr>
+ <th class="listheading">[% 'Partnumber' | $T8 %]</th>
+ <th class="listheading">[% 'Description' | $T8 %]</th>
+ <th class="listheading">[% 'Unit' | $T8 %]</th>
+ <th class="listheading">[% 'Notes' | $T8 %]</th>
+ <th class="listheading">[% 'EAN' | $T8 %]</th>
+ <th class="listheading">[% 'Service, assembly or part' | $T8 %]</th>
+ <th class="listheading">[% 'Obsolete' | $T8 %]</th>
+ </tr>
+
+ [% SET row_odd = '1' %][% FOREACH row = ALL_PARTS %]
+ <tr class="listrow[% IF row_odd %]1[% SET row_odd = '0' %][% ELSE %]0[% SET row_odd = '1' %][% END %]">
+ <td align="right">[% HTML.escape(row.partnumber) %]</td>
+ <td align="left"> [% HTML.escape(row.description) %]</a></td>
+ <td align="right">[% HTML.escape(row.unit) %]</td>
+ <td align="right">[% HTML.escape(row.notes) %]</td>
+ <td align="right">[% HTML.escape(row.ean) %]</td>
+ <td align="right">[% IF row.assembly %] [% 'assembly' | $T8 %] [% ELSE %] [% IF row.inventory_accno_id %] [% 'part' | $T8 %] [% ELSE %] [% 'service' | $T8 %] [% END %] [% END %]</td>
+ <td>[% IF row.obsolete %][%- LxERP.t8("Obsolete") %][%- ELSE %][%- LxERP.t8("Not obsolete") %][%- END %]</td>
+ </tr>
+ [% END %]
+</table>
+
+<input class="submit" type="button" value="[% 'Close window' | $T8 %]" onclick="window.close()">
+
+</form>