]> wagnertech.de Git - mfinanz.git/blobdiff - templates/webpages/io/select_item.html
Bei Kunden/Lieferanten Recht customer_vendor_all_edit prüfen
[mfinanz.git] / templates / webpages / io / select_item.html
index 9252b45fc3899a80ce17ed5881d9d7567343cbd8..566b1a1ce3f86b1b690ad0c20eb29cf19b3c27bc 100644 (file)
@@ -5,9 +5,16 @@
 
   <table width="100%">
    <tr class="listheading">
-    <th>&nbsp;</th>
+    [%- IF myconfig_item_multiselect %]
+      <th>[% LxERP.t8('Qty') %]</th>
+    [%- ELSE %]
+      <th>&nbsp;</th>
+    [%- END %]
     <th>[% LxERP.t8('Number') %]</th>
     <th>[% LxERP.t8('Part Description') %]</th>
+    [%- IF SHOW_NOTES %]
+      <th>[% LxERP.t8('Long Description') %]</th>
+    [%- END %]
     <th>[% LxERP.t8('Other Matches') %]</th>
     <th>[% LxERP.t8('Price') %]</th>
     [%- IF IS_PURCHASE %]
 
    [%- FOREACH item = ITEM_LIST %]
    <tr class="listrow[% loop.count % 2 %]">
-    <td><input name="select_item_id" class="radio" type="radio" value="[% HTML.escape(item.id) %]"[% IF loop.first %] checked[% END %]></td>
+    [%- IF myconfig_item_multiselect %]
+      <td>[% L.input_tag('select_qty_' _ HTML.escape(item.id), '', size => 5) %]</td>
+    [%- ELSE %]
+      <td><input name="select_item_id" class="radio" type="radio" value="[% HTML.escape(item.id) %]"[% IF loop.first %] checked[% END %]></td>
+    [%- END %]
     <td>[% HTML.escape(item.partnumber) %]</td>
     <td>[% HTML.escape(item.description) %]</td>
+    [%- IF SHOW_NOTES %]
+      [% USE P %]
+      <td>[% P.restricted_html(item.notes) %]</td>
+    [%- END %]
     <td>[% HTML.escape(item.matches).join('<br>') %]</td>
     <td align="right">[% LxERP.format_amount(item.display_sellprice, 2) %]</td>
     [%- IF IS_PURCHASE %]
 
   [% L.submit_tag('action', LxERP.t8('Continue')) %]
  </form>
+
+[%- IF myconfig_item_multiselect %]
+ <script type='text/javascript'>
+   var first_click = 1;;
+   [%- FOREACH item = ITEM_LIST %]
+     [% SET THIS_ID = 'select_qty_' _ HTML.escape(item.id) %]
+     $('#[% THIS_ID %]').click(function(){
+       var qty = '1';
+       if (first_click) {
+         qty = '[% LxERP.format_amount(PRE_ENTERED_QTY, 5) %]';
+       }
+       first_click = 0;
+       if ($('#[% THIS_ID %]').attr('value') == '') {
+         $('#[% THIS_ID %]').attr('value', qty); $('#[% THIS_ID %]').select();
+       }
+     });
+   [%- END %]
+ </script>
+[%- END %]