This commit is contained in:
parent
03b95eb9f6
commit
06ae86d78f
|
@ -20,11 +20,10 @@ FROM
|
|||
LEFT JOIN supplierAccount sa ON sa.supplierFk = s.id
|
||||
LEFT JOIN bankEntity be ON sa.bankEntityFk = be.id
|
||||
LEFT JOIN accountDetail ad ON ad.supplierAccountFk = sa.id
|
||||
JOIN accountDetailType adt ON adt.id = ad.accountDetailTypeFk
|
||||
JOIN accountDetailType adt ON adt.id = ad.accountDetailTypeFk AND adt.id = 3
|
||||
WHERE
|
||||
(m.companyFk = ? OR m.companyFk IS NULL)
|
||||
AND (c.id = ? OR (c.id IS NULL AND c.countryFk = sa.countryFk))
|
||||
AND adt.id = 3
|
||||
GROUP BY ad.value
|
||||
ORDER BY
|
||||
m.created DESC;
|
||||
|
|
Loading…
Reference in New Issue