Page 1 of 1

Always selects the last SKU entry from dropdown list under title

Posted: Sun Feb 26, 2017 4:23 pm
by pareeka2
Hello,

I observed a bug while creating Invoice. I added multiple entries in Inventory such as SU00001,SU00002,....,SU00020. Now when i create invoice, under title when i type "SU", i get these 20 suggestion in dropdown through Autocomplete......Now let say i click on SU00007...But in text box it still sets SU00020 which is the last entry of dropdown list.

Above event is true for both filter_name and filter_sku (if i change the query in invoice.php from "=" to "LIKE" with "%")

Any idea whats the issue here.
Any help will be appreciated.Thanks in advance.

-Ashutosh

Re: Always selects the last SKU entry from dropdown list under title

Posted: Mon Feb 27, 2017 9:45 am
by Esmond
I've just done a test on a clean installation, doesn't seem to have any such issues on our end

Re: Always selects the last SKU entry from dropdown list under title

Posted: Mon Feb 27, 2017 6:05 pm
by pareeka2
Ok...got it... It used to work value in response was item['name'] and in my case all the inventory qualities have same Name but different SKU.

response($.map(json, function (item) {
return {
label: item['name']+ ' (' + item['sku'] + ')',
value: item['name'],
sell: item['sell']
}
I changed filter by sku and value: item['sku'] and it worked...
Thanks a lot for your reply

Re: Always selects the last SKU entry from dropdown list under title

Posted: Mon Feb 27, 2017 9:26 pm
by Esmond
okay that's great to hear. if there's further issues or bugs do let us know