From 7f73715a1600c23a7fdfe043c71974e75c1c8072 Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Sat, 14 Apr 2018 00:16:56 -0600 Subject: [PATCH] Make sure barcode box is emptied --- static/js/pos.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) {