- aggiunto note 'note_ordine_gas'

- corretto bug
This commit is contained in:
Surya Paolo
2024-03-26 15:36:49 +01:00
parent bf1e9b83ba
commit 39687265c8
10 changed files with 83 additions and 14 deletions

View File

@@ -108,7 +108,7 @@ async function completaSettaggioProduct_AndProductInfo(arrcampi_productInfo, arr
productInfo._id = precid;
else
delete productInfo._id;
productInfo.code = preccode;
}
}
@@ -472,6 +472,7 @@ router.post('/import', authenticate, async (req, res) => {
}
}
if (!rec.hasOwnProperty('active')) {
product.active = true;
}
@@ -508,6 +509,13 @@ router.post('/import', authenticate, async (req, res) => {
recGas = await Gasordine.findOne({ idapp, name: rec.gas_name }).lean();
}
if (recGas) {
if (rec.hasOwnProperty('note_ordine_gas')) {
const note_ordine_gas = rec['note_ordine_gas'];
await Gasordine.findOneAndUpdate({ _id: recGas._id }, { $set: { note_ordine_gas } });
}
}
let recProductExist = null;
let queryprod = { idProductInfo: product.idProductInfo };