Commit 967171b2 by Yvon Kerdoncuff

in shelf inventory, interrupt scan.pos.barcode event if fired from quantity…

in shelf inventory, interrupt scan.pos.barcode event if fired from quantity edition input, so that it does not bother user with barcode not found popup
parent 34d61306
Pipeline #4214 failed with stage
in 0 seconds
......@@ -1256,6 +1256,14 @@ function init() {
}
});
$(document).on('scan.pos.barcode', function(event) {
//This events sometimes fire after user types some digits then press enter
//in the Quantity field.
//To avoid this, we return if focus is in Quantity field when events fires.
const focused = document.activeElement;
if ($(focused).is('#edition_input')) {
return;
}
//access `event.code` - barcode data
var barcode = event.code;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment