product
This commit is contained in:
@@ -113,7 +113,7 @@ const orderSchema = new Schema({
|
||||
date_delivered: {
|
||||
type: Date
|
||||
},
|
||||
notes: {
|
||||
note: {
|
||||
type: String
|
||||
},
|
||||
modify_at: {
|
||||
|
||||
@@ -89,6 +89,12 @@ const OrdersCartSchema = new Schema({
|
||||
note: {
|
||||
type: String
|
||||
},
|
||||
note_per_gestore: {
|
||||
type: String
|
||||
},
|
||||
note_per_admin: {
|
||||
type: String
|
||||
},
|
||||
modify_at: {
|
||||
type: Date
|
||||
},
|
||||
|
||||
@@ -193,15 +193,20 @@ module.exports.getProductById = async function (id) {
|
||||
return arrris && arrris.length > 0 ? arrris[0] : null
|
||||
}
|
||||
|
||||
module.exports.findAllIdApp = async function (idapp, code, id) {
|
||||
module.exports.findAllIdApp = async function (idapp, code, id, all) {
|
||||
let myfind = {};
|
||||
let myqueryadd = {};
|
||||
let query = [];
|
||||
|
||||
try {
|
||||
|
||||
if (idapp)
|
||||
myfind = { idapp, active: true };
|
||||
if (idapp){
|
||||
myfind = { idapp };
|
||||
}
|
||||
|
||||
if (!all) {
|
||||
myfind = { ...myfind, active: true }
|
||||
}
|
||||
|
||||
if (code) {
|
||||
myfind = { ...myfind, code }
|
||||
|
||||
Reference in New Issue
Block a user