1 [% USE LxERP %][% USE HTML %][% USE L %][% USE P %]
 
   5  <form method="post" action="[% HTML.escape(script) %]" id="form">
 
   8    <tr class="listheading">
 
   9     [%- IF MYCONFIG.item_multiselect %]
 
  10       <th>[% LxERP.t8('Qty') %]</th>
 
  14     <th>[% LxERP.t8('Number') %]</th>
 
  15     <th>[% LxERP.t8('Part Classification') %]</th>
 
  16     <th>[% LxERP.t8('Part Description') %]</th>
 
  17     [%- IF INSTANCE_CONF.get_show_longdescription_select_item %]
 
  18       [% SET COLS = COLS + 1 %]
 
  19       <th>[% LxERP.t8('Long Description') %]</th>
 
  21     <th>[% LxERP.t8('Other Matches') %]</th>
 
  22     <th>[% LxERP.t8('Price') %]</th>
 
  24       [% SET COLS = COLS + 1 %]
 
  25      <th>[% LxERP.t8('ROP') %]</th>
 
  27     <th>[% LxERP.t8('Qty') %]</th>
 
  28     <th>[% LxERP.t8('Unit') %]</th>
 
  31    [%- FOREACH item = ITEM_LIST %]
 
  32    <tr class="listrow[% loop.count % 2 %]">
 
  33     [%- IF MYCONFIG.item_multiselect %]
 
  34       <td>[% L.input_tag('select_qty_' _ HTML.escape(item.id), '', size => 5) %]</td>
 
  36       <td><input name="select_item_id" class="radio" type="radio" value="[% HTML.escape(item.id) %]"[% IF loop.first %] checked[% END %]></td>
 
  38     <td>[% HTML.escape(item.partnumber) %]</td>
 
  39     <td>[% HTML.escape(item.type_and_classific) %]</td>
 
  40     <td>[% HTML.escape(item.description) %]</td>
 
  41     [%- IF INSTANCE_CONF.get_show_longdescription_select_item %]
 
  42       <td>[% P.restricted_html(item.longdescription) %]</td>
 
  44     <td>[% HTML.escape(item.matches).join('<br>') %]</td>
 
  45     <td align="right">[% LxERP.format_amount(item.display_sellprice, 2) %]</td>
 
  47      <td align="right">[% LxERP.format_amount(item.rop, '') %]</td>
 
  49     <td align="right">[% LxERP.format_amount(item.onhand, '') %]</td>
 
  50     <td>[% HTML.escape(item.unit) %]</td>
 
  54    <tr><td colspan="[% COLS %]"><hr size="3" noshade></td></tr>
 
  57   [% L.hidden_tag('select_item_mode', MODE) %]
 
  58   [% L.hidden_tag('select_item_previous_form', PREVIOUS_FORM) %]
 
  59   [% L.hidden_tag('action', 'item_selected') %]
 
  62 [%- IF MYCONFIG.item_multiselect %]
 
  63  <script type='text/javascript'>
 
  65    [%- FOREACH item = ITEM_LIST %]
 
  66      [% SET THIS_ID = 'select_qty_' _ HTML.escape(item.id) %]
 
  67      $('#[% THIS_ID %]').click(function(){
 
  70          qty = '[% LxERP.format_amount(PRE_ENTERED_QTY, 5) %]';
 
  73        if ($('#[% THIS_ID %]').attr('value') == '') {
 
  74          $('#[% THIS_ID %]').attr('value', qty); $('#[% THIS_ID %]').select();