Skip to content

Commit

Permalink
Fixed Double scan issue, cudi tool
Browse files Browse the repository at this point in the history
  • Loading branch information
wiskiv1 authored and Tiddons committed Dec 4, 2024
1 parent 376efbf commit b0a24a7
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions module/CudiBundle/Resources/assets/sale/js/saleInterface.js
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,8 @@
}

function _addArticle($this, id) {
console.log("_addArticle");

var settings = $this.data('saleInterfaceSettings');
$this.find('#article-' + id + ':not(.inactive)').each(function () {
if ($(this).data('info').currentNumber < $(this).data('info').number) {
Expand Down Expand Up @@ -531,6 +533,8 @@
}

function _gotBarcode($this, barcode) {
console.log("_gotBarcode");

var settings = $this.data('saleInterfaceSettings');

var found = false;
Expand All @@ -543,16 +547,17 @@
found = true;
}

if (found) {
return false;
}

$($this.data('info').barcodes).each(function () {
if (_barcodeEquals(length, this, barcode)) {
$this.find('.addArticle').click();
found = true;
return false;
}
});

if (found)
return false;
});

if (found)
Expand Down

0 comments on commit b0a24a7

Please sign in to comment.