[Fix] POS Scanner
Search item based on key press instead of 1sec wait
Fast Scanning needs this to avoid 1sec delay
diff --git a/erpnext/accounts/page/pos/pos.js b/erpnext/accounts/page/pos/pos.js
index d69a306..ee4644a 100644
--- a/erpnext/accounts/page/pos/pos.js
+++ b/erpnext/accounts/page/pos/pos.js
@@ -426,11 +426,11 @@
});
this.serach_item.make_input();
- this.serach_item.$input.on("keyup", function () {
- setTimeout(function () {
+ this.serach_item.$input.on("keypress", function (event) {
+ if((me.serach_item.$input.val() != "") && (event.which == 13)){
me.items = me.get_items();
me.make_item_list();
- }, 1000);
+ }
});
this.search_item_group = this.wrapper.find('.search-item-group');