Risolto problema blocco
This commit is contained in:
@@ -28,7 +28,8 @@ const orderSchema = new Schema({
|
||||
idScontisticas: [{ type: Schema.Types.ObjectId, ref: 'Scontistica' }],
|
||||
idProvider: { type: Schema.Types.ObjectId, ref: 'Provider' },
|
||||
price: {
|
||||
type: Number
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
after_price: {
|
||||
type: String
|
||||
@@ -40,7 +41,12 @@ const orderSchema = new Schema({
|
||||
type: String
|
||||
},
|
||||
quantity: {
|
||||
type: Number
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
TotalPriceProduct: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
evaso: { // e quindi è stato tolto dal magazzino (aggiornando il campo StockQty)
|
||||
type: Boolean,
|
||||
|
||||
@@ -544,7 +544,7 @@ module.exports.getmsgorderTelegram = async function (ordersCart) {
|
||||
msg += '<br><br>Lista Prodotti:';
|
||||
for (const ord of ordersCart.items) {
|
||||
msg += '<br>';
|
||||
msg += '✅ [' + ord.order.quantity + '] ' + ord.order.product.name + ' (' + ord.order.price + ' € ' + (ord.order.after_price ? ord.order.after_price : '') + ')';
|
||||
msg += '✅ [' + ord.order.quantity + '] ' + ord.order.product.name + ' (' + ord.order.price + ' € ' + (ord.order.after_price ? ord.order.after_price : '') + ' Tot=' + ord.order.TotalPriceProduct + '€ )';
|
||||
}
|
||||
|
||||
msg += '<br>';
|
||||
|
||||
Reference in New Issue
Block a user