- aggiunto bottone per Confermare tutti gli ordini

- 1 bottone per Consegnare e Pagare
This commit is contained in:
Surya Paolo
2024-02-16 14:11:03 +01:00
parent 5a6c08e908
commit 1c31543af8
2 changed files with 27 additions and 14 deletions

View File

@@ -128,4 +128,16 @@ PaoloRiso: -44.4 €]
Dom 07/01 ORE 16:24: [<b>Euro</b>]: Inviate Monete da PaoloRiso a 44.4 € [causale: Pagato Ordine n.101]
Saldi:
PaoloRiso: -88.8 €]
: 88.8 €]
: 88.8 €]
Ven 16/02 ORE 13:51: [<b>Euro</b>]: Inviate Monete da PaoloRiso a piuchebuono 9.6 € [causale: Pagato Ordine n.169]
Saldi:
PaoloRiso: -98 €]
piuchebuono: 1109.1799999999998 €]
Ven 16/02 ORE 13:57: [<b>Euro</b>]: Inviate Monete da Barbara a piuchebuono 15.6 € [causale: Pagato Ordine n.171]
Saldi:
Barbara: -61.2 €]
piuchebuono: 1124.7799999999997 €]
Ven 16/02 ORE 14:05: [<b>Euro</b>]: Inviate Monete da Loabati a piuchebuono 6 € [causale: Pagato Ordine n.174]
Saldi:
Loabati: -24.6 €]
piuchebuono: 1130.7799999999997 €]

View File

@@ -376,25 +376,26 @@ router.post('/:userId/ordercartstatus', authenticate, async function (req, res,
const userDest = await User.findById(myOrdersCart.userId).lean();
if (ris) {
let ordertype = '';
// Aggiorna gli Stati Interni !
myOrdersCart = await OrdersCart.updateCmd(myOrdersCart, status, true, options);
let ordertype = '';
if ((options.hasOwnProperty('sendmail') && options.sendmail) || !options.hasOwnProperty('sendmail')) {
if (status === shared_consts.OrderStatus.ORDER_CONFIRMED) {
ordertype = 'order_confirmed';
} else if (status === shared_consts.OrderStatus.DELIVERED) {
ordertype = 'order_consegnato';
} else if (status === shared_consts.OrderStatus.CANCELED) {
ordertype = 'order_canceled';
}
if (status === shared_consts.OrderStatus.ORDER_CONFIRMED) {
ordertype = 'order_confirmed';
} else if (status === shared_consts.OrderStatus.DELIVERED) {
ordertype = 'order_consegnato';
} else if (status === shared_consts.OrderStatus.CANCELED) {
ordertype = 'order_canceled';
}
if (ordertype !== '') {
sendemail.sendEmail_Order(userDest.lang, idapp, myOrdersCart, userDest, ordertype, status)
.then((ris) => {
if (ordertype !== '') {
sendemail.sendEmail_Order(userDest.lang, idapp, myOrdersCart, userDest, ordertype, status)
.then((ris) => {
})
})
}
}
}