diff --git a/static/js/pos.js b/static/js/pos.js index 09819d1..270519c 100644 --- a/static/js/pos.js +++ b/static/js/pos.js @@ -67,7 +67,6 @@ function findItem(q) { } } addItem(item['name'], code, price); - $("#barcode").val(""); } if (q == "") { return; @@ -170,11 +169,13 @@ $("#pos-lines-box").on("keypress", ".item-qty,.item-price", function (e) { $("#barcode").on('keypress', function (e) { if (e.which === 13) { findItem($("#barcode").val()); + $("#barcode").val(""); } }); $("#barcodebtn").on("click", function () { findItem($("#barcode").val()); + $("#barcode").val(""); }); $("body").on("keypress", "input[type=money],input[type=number]", function (e) {