Merge pull request '#6900 rectificative filter' (!2845) from 6900-fineTunningInvoiceIn into dev
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #2845 Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
commit
d6bea43731
|
@ -119,6 +119,7 @@ module.exports = Self => {
|
|||
}
|
||||
|
||||
let correctings;
|
||||
|
||||
let correcteds;
|
||||
if (args.correctedFk) {
|
||||
correctings = await models.InvoiceInCorrection.find({
|
||||
|
@ -154,6 +155,7 @@ module.exports = Self => {
|
|||
case 'awbCode':
|
||||
return {'sub.code': value};
|
||||
case 'correctingFk':
|
||||
if (!correcteds.length && !args.correctingFk) return;
|
||||
return args.correctingFk
|
||||
? {'ii.id': {inq: correcteds.map(x => x.correctingFk)}}
|
||||
: {'ii.id': {nin: correcteds.map(x => x.correctingFk)}};
|
||||
|
|
Loading…
Reference in New Issue