- preordinabili corretti + altro
This commit is contained in:
@@ -123,7 +123,7 @@ router.post('/import', authenticate, async (req, res) => {
|
||||
isnuovo = true;
|
||||
}
|
||||
|
||||
if (!options.aggiornaStockQta && esisteindb) {
|
||||
if (!options.aggiornaStockQty && esisteindb) {
|
||||
delete product.stockQty;
|
||||
delete product.bookableQty;
|
||||
}
|
||||
|
||||
@@ -377,8 +377,8 @@ router.post('/:userId/ordercartstatus', authenticate, async function (req, res,
|
||||
|
||||
if (status === shared_consts.OrderStatus.ORDER_CONFIRMED) {
|
||||
ordertype = 'order_confirmed';
|
||||
} else if (status === shared_consts.OrderStatus.COMPLETED) {
|
||||
ordertype = 'order_completed';
|
||||
} else if (status === shared_consts.OrderStatus.DELIVERED) {
|
||||
ordertype = 'order_consegnato';
|
||||
} else if (status === shared_consts.OrderStatus.CANCELED) {
|
||||
ordertype = 'order_canceled';
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ const { authenticate, authenticate_noerror } = require('../middleware/authentica
|
||||
const Cart = require('../models/cart');
|
||||
const CartClass = require('../modules/Cart');
|
||||
const Product = require('../models/product');
|
||||
const ProductInfo = require('../models/productInfo');
|
||||
const Order = require('../models/order');
|
||||
const OrdersCart = require('../models/orderscart');
|
||||
const Variant = require('../models/variant');
|
||||
@@ -1307,8 +1308,8 @@ async function eseguiDbOp(idapp, mydata, locale, req, res) {
|
||||
|
||||
} else if (mydata.dbop === 'dropProducts') {
|
||||
|
||||
ris = Product.collection.drop();
|
||||
ris = ProductInfo.collection.drop();
|
||||
await Product.collection.drop();
|
||||
ris = await ProductInfo.collection.drop();
|
||||
|
||||
} else if (mydata.dbop === 'dropAllOrders') {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user