call to ajax file

This commit is contained in:
Lucas Marcouiller 2021-10-23 14:36:31 +02:00
parent 56ff2412c1
commit ae78bed41d

View File

@ -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 => {