feat: refs #7936 add company filter
gitea/salix/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
4234e614fb
commit
5db1262e08
|
@ -91,6 +91,10 @@ module.exports = Self => {
|
|||
{
|
||||
arg: 'supplierActivityFk',
|
||||
type: 'string',
|
||||
},
|
||||
{
|
||||
arg: 'companyFk',
|
||||
type: 'number',
|
||||
}
|
||||
],
|
||||
returns: {
|
||||
|
@ -161,8 +165,8 @@ module.exports = Self => {
|
|||
: {'ii.id': {nin: correcteds.map(x => x.correctingFk)}};
|
||||
case 'correctedFk':
|
||||
return {'ii.id': {inq: correctings.map(x => x.correctingFk)}};
|
||||
case 'supplierActivityFk':
|
||||
return {'s.supplierActivityFk': value};
|
||||
case 'companyFk':
|
||||
return {'ii.companyFk': value};
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -184,7 +188,8 @@ module.exports = Self => {
|
|||
s.name supplierName,
|
||||
s.account,
|
||||
SUM(iid.amount) amount,
|
||||
sub.code awbCode
|
||||
sub.code awbCode,
|
||||
c.code
|
||||
FROM invoiceIn ii
|
||||
JOIN supplier s ON s.id = ii.supplierFk
|
||||
LEFT JOIN invoiceInDueDay iid ON iid.invoiceInFk = ii.id
|
||||
|
@ -199,7 +204,8 @@ module.exports = Self => {
|
|||
GROUP BY de.duaFk
|
||||
) sub ON sub.duaFk = d.id
|
||||
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);
|
||||
|
|
Loading…
Reference in New Issue