Always selects the last SKU entry from dropdown list under title

Discuss bugs related to Logic Invoice.
Post Reply
pareeka2
Posts: 4
Joined: Sun Feb 05, 2017 11:23 pm

Always selects the last SKU entry from dropdown list under title

Post by pareeka2 » Sun Feb 26, 2017 4:23 pm

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

User avatar
Esmond
Site Admin
Posts: 242
Joined: Tue Sep 15, 2015 3:08 pm
Location: Singapore
Contact:

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

Post by Esmond » Mon Feb 27, 2017 9:45 am

I've just done a test on a clean installation, doesn't seem to have any such issues on our end

pareeka2
Posts: 4
Joined: Sun Feb 05, 2017 11:23 pm

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

Post by pareeka2 » Mon Feb 27, 2017 6:05 pm

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

User avatar
Esmond
Site Admin
Posts: 242
Joined: Tue Sep 15, 2015 3:08 pm
Location: Singapore
Contact:

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

Post by Esmond » Mon Feb 27, 2017 9:26 pm

okay that's great to hear. if there's further issues or bugs do let us know

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests