[Fix] POS Scanner

Search item based on key press instead of 1sec wait
Fast Scanning needs this to avoid 1sec delay
This commit is contained in:
Revant Nandgaonkar 2017-08-26 09:58:15 +05:30
parent 2d2b12c800
commit 2f7cb82ca0

View File

@ -426,11 +426,11 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
}); });
this.serach_item.make_input(); this.serach_item.make_input();
this.serach_item.$input.on("keyup", function () { this.serach_item.$input.on("keypress", function (event) {
setTimeout(function () { if((me.serach_item.$input.val() != "") && (event.which == 13)){
me.items = me.get_items(); me.items = me.get_items();
me.make_item_list(); me.make_item_list();
}, 1000); }
}); });
this.search_item_group = this.wrapper.find('.search-item-group'); this.search_item_group = this.wrapper.find('.search-item-group');