8355-testToMaster #3336
|
@ -91,6 +91,10 @@ module.exports = Self => {
|
||||||
{
|
{
|
||||||
arg: 'supplierActivityFk',
|
arg: 'supplierActivityFk',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
arg: 'companyFk',
|
||||||
|
type: 'number',
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
returns: {
|
returns: {
|
||||||
|
@ -161,8 +165,8 @@ module.exports = Self => {
|
||||||
: {'ii.id': {nin: correcteds.map(x => x.correctingFk)}};
|
: {'ii.id': {nin: correcteds.map(x => x.correctingFk)}};
|
||||||
case 'correctedFk':
|
case 'correctedFk':
|
||||||
return {'ii.id': {inq: correctings.map(x => x.correctingFk)}};
|
return {'ii.id': {inq: correctings.map(x => x.correctingFk)}};
|
||||||
case 'supplierActivityFk':
|
case 'companyFk':
|
||||||
return {'s.supplierActivityFk': value};
|
return {'ii.companyFk': value};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -184,7 +188,8 @@ module.exports = Self => {
|
||||||
s.name supplierName,
|
s.name supplierName,
|
||||||
s.account,
|
s.account,
|
||||||
SUM(iid.amount) amount,
|
SUM(iid.amount) amount,
|
||||||
sub.code awbCode
|
sub.code awbCode,
|
||||||
|
c.code
|
||||||
FROM invoiceIn ii
|
FROM invoiceIn ii
|
||||||
JOIN supplier s ON s.id = ii.supplierFk
|
JOIN supplier s ON s.id = ii.supplierFk
|
||||||
LEFT JOIN invoiceInDueDay iid ON iid.invoiceInFk = ii.id
|
LEFT JOIN invoiceInDueDay iid ON iid.invoiceInFk = ii.id
|
||||||
|
@ -199,7 +204,8 @@ module.exports = Self => {
|
||||||
GROUP BY de.duaFk
|
GROUP BY de.duaFk
|
||||||
) sub ON sub.duaFk = d.id
|
) sub ON sub.duaFk = d.id
|
||||||
LEFT JOIN company co ON co.id = ii.companyFk
|
LEFT JOIN company co ON co.id = ii.companyFk
|
||||||
LEFT JOIN dms dm ON dm.id = ii.docFk`
|
LEFT JOIN dms dm ON dm.id = ii.docFk
|
||||||
|
JOIN company c ON c.id = ii.companyFk`,
|
||||||
);
|
);
|
||||||
|
|
||||||
const sqlWhere = conn.makeWhere(filter.where);
|
const sqlWhere = conn.makeWhere(filter.where);
|
||||||
|
|
Loading…
Reference in New Issue