- aggiunto note 'note_ordine_gas'
- corretto bug
This commit is contained in:
@@ -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 };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user