+
+[%- 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 %]