refs #5525 fix adt
gitea/salix/pipeline/pr-master This commit looks good Details

This commit is contained in:
Carlos Satorres 2024-07-08 13:45:16 +02:00
parent 03b95eb9f6
commit 06ae86d78f
1 changed files with 1 additions and 2 deletions

View File

@ -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;