Commit ae224347 by François C.

Add barcode encoded qty functionality to shelf inventory interface

parent e2a1e194
Pipeline #2174 passed with stage
in 1 minute 28 seconds
...@@ -150,7 +150,9 @@ div#container_edition { ...@@ -150,7 +150,9 @@ div#container_edition {
#product_uom { #product_uom {
font-size: small; font-size: small;
} }
#reset_to_previous_qty {
cursor: pointer;
}
.blink_me { .blink_me {
animation: blinker 1s ease-in-out; animation: blinker 1s ease-in-out;
} }
......
...@@ -102,6 +102,12 @@ function barcode_analyzer(chars) { ...@@ -102,6 +102,12 @@ function barcode_analyzer(chars) {
select_product_from_bc(barcode); select_product_from_bc(barcode);
} }
} }
function reset_previous_value() {
if (editing_item != null) {
$('#edition_input').val(editing_item.qty);
}
}
// Directly send a line to edition when barcode is read // Directly send a line to edition when barcode is read
function select_product_from_bc(barcode) { function select_product_from_bc(barcode) {
var found = null, var found = null,
...@@ -837,7 +843,10 @@ function init() { ...@@ -837,7 +843,10 @@ function init() {
*/ */
}); });
if ($(this).val().length > 0) { if ($(this).val().length > 0) {
$("#reset_to_previous_qty").show(); let reset_icon = $("#reset_to_previous_qty");
reset_icon.show();
reset_icon.off();
reset_icon.on("click", reset_previous_value);
} else { } else {
$("#reset_to_previous_qty").hide(); $("#reset_to_previous_qty").hide();
} }
......
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