refs #5525 fix accountDetailValue #2701
|
@ -7,7 +7,6 @@ SELECT
|
||||||
s.city,
|
s.city,
|
||||||
sp.name province,
|
sp.name province,
|
||||||
s.nif,
|
s.nif,
|
||||||
sa.iban,
|
|
||||||
sa.supplierFk,
|
sa.supplierFk,
|
||||||
be.name bankName,
|
be.name bankName,
|
||||||
ad.value accountDetailValue
|
ad.value accountDetailValue
|
||||||
|
@ -21,9 +20,10 @@ FROM
|
||||||
LEFT JOIN supplierAccount sa ON sa.supplierFk = s.id
|
LEFT JOIN supplierAccount sa ON sa.supplierFk = s.id
|
||||||
LEFT JOIN bankEntity be ON sa.bankEntityFk = be.id
|
LEFT JOIN bankEntity be ON sa.bankEntityFk = be.id
|
||||||
LEFT JOIN accountDetail ad ON ad.supplierAccountFk = sa.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 AND adt.id = 3
|
||||||
WHERE
|
WHERE
|
||||||
(m.companyFk = ? OR m.companyFk IS NULL)
|
(m.companyFk = ? OR m.companyFk IS NULL)
|
||||||
AND (c.id = ? OR (c.id IS NULL AND c.countryFk = sa.countryFk))
|
AND (c.id = ? OR (c.id IS NULL AND c.countryFk = sa.countryFk))
|
||||||
|
GROUP BY ad.value
|
||||||
jgallego marked this conversation as resolved
|
|||||||
ORDER BY
|
ORDER BY
|
||||||
m.created DESC;
|
m.created DESC;
|
||||||
|
|
Loading…
Reference in New Issue
açò va dalt