Scontistica- Parte 1
This commit is contained in:
@@ -157,6 +157,20 @@ module.exports.findAllIdApp = async function (idapp) {
|
||||
as: 'provider'
|
||||
}
|
||||
},
|
||||
{
|
||||
$lookup: {
|
||||
from: 'scontisticas',
|
||||
localField: 'idScontisticas',
|
||||
foreignField: '_id',
|
||||
as: 'scontistica'
|
||||
}
|
||||
},
|
||||
{
|
||||
$unwind: {
|
||||
path: '$scontistica',
|
||||
preserveNullAndEmptyArrays: true,
|
||||
},
|
||||
},
|
||||
{ $unwind: '$product' },
|
||||
{ $unwind: '$producer' },
|
||||
{ $unwind: '$provider' },
|
||||
@@ -244,6 +258,20 @@ module.exports.getTotalOrderById = async function (id) {
|
||||
as: 'provider'
|
||||
}
|
||||
},
|
||||
{
|
||||
$lookup: {
|
||||
from: 'scontisticas',
|
||||
localField: 'idScontisticas',
|
||||
foreignField: '_id',
|
||||
as: 'scontistica'
|
||||
}
|
||||
},
|
||||
{
|
||||
$unwind: {
|
||||
path: '$scontistica',
|
||||
preserveNullAndEmptyArrays: true,
|
||||
},
|
||||
},
|
||||
{ $unwind: '$product' },
|
||||
{ $unwind: '$producer' },
|
||||
{ $unwind: '$storehouse' },
|
||||
|
||||
Reference in New Issue
Block a user