- aggiornamento 1.2.71

This commit is contained in:
Surya Paolo
2025-10-05 12:17:45 +02:00
parent 4e37475d00
commit ede8a2db3d
4 changed files with 15 additions and 7 deletions

View File

@@ -143,6 +143,7 @@ async function filterValidItems(mycart) {
try {
mycart.newitems = [];
let haschanged = false;
for (let item of mycart.items) {
try {
if (

View File

@@ -329,7 +329,7 @@ module.exports.updateTotals = async function (order, codice_sconto) {
module.exports.getTotalOrderById = async function (id) {
const query = [
{ $match: { _id: new mongoose.Types.ObjectId(id) } },
{ $match: { _id: new ObjectId(id) } },
{
$lookup: {
from: 'products',
@@ -543,6 +543,8 @@ module.exports.getTotalOrderById = async function (id) {
},
];
const ris = await Order.aggregate(query);
return ris;
};