- Cataloghi

- Import ed Export Pagine
- ObjectID sostituita con ObjectId
This commit is contained in:
Surya Paolo
2024-12-17 17:55:47 +01:00
parent 14b3e18986
commit 300bab2125
91 changed files with 404 additions and 272 deletions

View File

@@ -4,7 +4,7 @@ const Schema = mongoose.Schema;
const shared_consts = require('../tools/shared_nodejs');
const { ObjectID } = require('mongodb');
const { ObjectId } = require('mongodb');
mongoose.Promise = global.Promise;
mongoose.level = "F";
@@ -377,7 +377,7 @@ module.exports.updateTotals = function (order) {
module.exports.getTotalOrderById = async function (id) {
const query = [
{ $match: { _id: ObjectID(id) } },
{ $match: { _id: ObjectId(id) } },
{
$lookup: {
from: 'products',
@@ -660,7 +660,7 @@ module.exports.GeneraCSVOrdineProdotti = async function () {
const myidGasordine = '65c2a8cc379ee4f57e865ee7';
const myquery = [
{ $match: { idGasordine: ObjectID(myidGasordine) } },
{ $match: { idGasordine: ObjectId(myidGasordine) } },
{
$lookup: {
from: 'products',