From b0a24a75aa1845e06723667ae0e61e623fc6bc30 Mon Sep 17 00:00:00 2001 From: Wiskiv1 Date: Wed, 4 Dec 2024 14:46:32 +0100 Subject: [PATCH] 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)