From ae78bed41d6ca6de523859676a6eaba37fb6fce6 Mon Sep 17 00:00:00 2001 From: Lucas Marcouiller Date: Sat, 23 Oct 2021 14:36:31 +0200 Subject: [PATCH] call to ajax file --- htdocs/product/inventory/inventory.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/htdocs/product/inventory/inventory.php b/htdocs/product/inventory/inventory.php index 9445e7896c6..f2702fbc0db 100644 --- a/htdocs/product/inventory/inventory.php +++ b/htdocs/product/inventory/inventory.php @@ -600,6 +600,16 @@ if ($object->id > 0) { function barcodeserialforproduct(textarray,tabproduct,barcodeproductqty,selectaddorreplace,mode,autodetect=false){ textarray.forEach(function(element,index){ + $.ajax({ url: \''.DOL_URL_ROOT.'/product/inventory/ajax/searchfrombarcode.php\', + data: { "action":"existbarcode","barcode":element}, + type: \'POST\', + success: function(response) { + console.log("test+1"); + }, + error : function(output) { + console.error("Error on Fetch of KM articles"); + }, + }); console.log("Product "+(index+=1)+": "+element); BarCodeDoesNotExist=0; tabproduct.forEach(product => {