corretto totali in attesa
This commit is contained in:
@@ -437,7 +437,10 @@ module.exports.updateStockQtaDalMagazzino = async function (idorderscart) {
|
|||||||
stockQty: -order.quantity
|
stockQty: -order.quantity
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
await Product.findOneAndUpdate({ _id: order.idProduct }, update, { new: false });
|
const ris = await Product.findOneAndUpdate({ _id: order.idProduct }, update, { new: false });
|
||||||
|
if (ris) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -462,7 +465,7 @@ module.exports.updateCmd = async function (ordersCart, status, value) {
|
|||||||
|
|
||||||
// Aggiorna anche il Magazzino, togliendo le quantità in Stock
|
// Aggiorna anche il Magazzino, togliendo le quantità in Stock
|
||||||
if (value) {
|
if (value) {
|
||||||
OrdersCart.updateStockQtaDalMagazzino(id);
|
await OrdersCart.updateStockQtaDalMagazzino(id);
|
||||||
}
|
}
|
||||||
ris = await OrdersCart.setEvasoById(value, myOrderCart);
|
ris = await OrdersCart.setEvasoById(value, myOrderCart);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user