]> wagnertech.de Git - mfinanz.git/blob - templates/design40_webpages/io/select_item.html
date error in mapping
[mfinanz.git] / templates / design40_webpages / io / select_item.html
1 [% USE LxERP %]
2 [% USE HTML %]
3 [% USE L %]
4 [% USE P %]
5 [% SET COLS = 8 %]
6 <h1>[% title %]</h1>
7
8  <form method="post" action="[% HTML.escape(script) %]" id="form">
9
10 <table class="tbl-list wi-moderate">
11   <thead>
12     <tr>
13      [% IF MYCONFIG.item_multiselect %]
14        <th>[% LxERP.t8('Qty') %]</th>
15      [% ELSE %]
16        <th>&nbsp;</th>
17      [% END %]
18      <th>[% LxERP.t8('Number') %]</th>
19      <th>[% LxERP.t8('Part Classification') %]</th>
20      <th>[% LxERP.t8('Part Description') %]</th>
21      [% IF INSTANCE_CONF.get_show_longdescription_select_item %]
22        [% SET COLS = COLS + 1 %]
23        <th>[% LxERP.t8('Long Description') %]</th>
24      [% END %]
25      <th>[% LxERP.t8('Other Matches') %]</th>
26      <th class="right">[% LxERP.t8('Price') %]</th>
27      [% IF IS_PURCHASE %]
28        [% SET COLS = COLS + 1 %]
29        <th class="right">[% LxERP.t8('ROP') %]</th>
30      [% END %]
31      <th class="right">[% LxERP.t8('Qty') %]</th>
32      <th>[% LxERP.t8('Unit') %]</th>
33     </tr>
34   </thead>
35   <tbody>
36     [% FOREACH item = ITEM_LIST %]
37     <tr class="listrow[% loop.count % 2 %]">
38       [% IF MYCONFIG.item_multiselect %]
39         <td>[% L.input_tag('select_qty_' _ HTML.escape(item.id), '', size => 5) %]</td>
40       [% ELSE %]
41         <td><input name="select_item_id" type="radio" value="[% HTML.escape(item.id) %]"[% IF loop.first %] checked[% END %]></td>
42       [% END %]
43       <td>[% HTML.escape(item.partnumber) %]</td>
44       <td>[% HTML.escape(item.type_and_classific) %]</td>
45       <td>[% HTML.escape(item.description) %]</td>
46       [% IF INSTANCE_CONF.get_show_longdescription_select_item %]
47         <td>[% P.restricted_html(item.longdescription) %]</td>
48       [% END %]
49       <td>[% HTML.escape(item.matches).join('<br>') %]</td>
50       <td class="numeric">[% LxERP.format_amount(item.display_sellprice, 2) %]</td>
51       [% IF IS_PURCHASE %]
52         <td class="numeric">[% LxERP.format_amount(item.rop, '') %]</td>
53       [% END %]
54       <td class="numeric">[% LxERP.format_amount(item.onhand, '') %]</td>
55       <td>[% HTML.escape(item.unit) %]</td>
56     </tr>
57     [% END %]
58     </tbody>
59   </table>
60   <p>&nbsp;</p>
61   [% L.hidden_tag('select_item_mode', MODE) %]
62   [% L.hidden_tag('select_item_previous_form', PREVIOUS_FORM) %]
63   [% L.hidden_tag('action', 'item_selected') %]
64  </form>
65
66 [% IF MYCONFIG.item_multiselect %]
67  <script type='text/javascript'>
68    var first_click = 1;;
69    [% FOREACH item = ITEM_LIST %]
70      [% SET THIS_ID = 'select_qty_' _ HTML.escape(item.id) %]
71      $('#[% THIS_ID %]').click(function(){
72        var qty = '1';
73        if (first_click) {
74          qty = '[% LxERP.format_amount(PRE_ENTERED_QTY, 5) %]';
75        }
76        first_click = 0;
77        if ($('#[% THIS_ID %]').attr('value') == '') {
78          $('#[% THIS_ID %]').attr('value', qty); $('#[% THIS_ID %]').select();
79        }
80      });
81    [% END %]
82  </script>
83 [% END %]