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

This commit is contained in:
Carlos Satorres 2024-07-08 13:43:08 +02:00
parent dd2101790d
commit 03b95eb9f6
1 changed files with 4 additions and 3 deletions

View File

@ -7,7 +7,6 @@ SELECT
s.city,
sp.name province,
s.nif,
sa.iban,
sa.supplierFk,
be.name bankName,
ad.value accountDetailValue
@ -21,9 +20,11 @@ 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
LEFT JOIN accountDetailType adt ON adt.id = ad.accountDetailTypeFk AND adt.id = 3
JOIN accountDetailType adt ON adt.id = ad.accountDetailTypeFk
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;
m.created DESC;