From 75f39211f7c4bfdb2a9c4de23d78d42d1c360619 Mon Sep 17 00:00:00 2001 From: Wiskiv1 Date: Wed, 4 Dec 2024 14:46:32 +0100 Subject: [PATCH 1/2] Fixed Double scan issue, cudi tool --- .../Resources/assets/sale/js/saleInterface.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/module/CudiBundle/Resources/assets/sale/js/saleInterface.js b/module/CudiBundle/Resources/assets/sale/js/saleInterface.js index 4658e31669..b75761594a 100644 --- a/module/CudiBundle/Resources/assets/sale/js/saleInterface.js +++ b/module/CudiBundle/Resources/assets/sale/js/saleInterface.js @@ -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) { @@ -531,6 +533,8 @@ } function _gotBarcode($this, barcode) { + console.log("_gotBarcode"); + var settings = $this.data('saleInterfaceSettings'); var found = false; @@ -543,6 +547,10 @@ found = true; } + if (found) { + return false; + } + $($this.data('info').barcodes).each(function () { if (_barcodeEquals(length, this, barcode)) { $this.find('.addArticle').click(); @@ -550,9 +558,6 @@ return false; } }); - - if (found) - return false; }); if (found) From 6959d16d5f0bd571022a0ffab06506daa0b72b90 Mon Sep 17 00:00:00 2001 From: Wiskiv1 Date: Wed, 4 Dec 2024 15:13:13 +0100 Subject: [PATCH 2/2] removed unused log statements --- module/CudiBundle/Resources/assets/sale/js/saleInterface.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/module/CudiBundle/Resources/assets/sale/js/saleInterface.js b/module/CudiBundle/Resources/assets/sale/js/saleInterface.js index b75761594a..a69cf47d2f 100644 --- a/module/CudiBundle/Resources/assets/sale/js/saleInterface.js +++ b/module/CudiBundle/Resources/assets/sale/js/saleInterface.js @@ -407,8 +407,6 @@ } 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) { @@ -533,8 +531,6 @@ } function _gotBarcode($this, barcode) { - console.log("_gotBarcode"); - var settings = $this.data('saleInterfaceSettings'); var found = false;