2020-09-25 12:45:00 +00:00
|
|
|
SELECT
|
|
|
|
c.dueDay,
|
|
|
|
c.iban,
|
|
|
|
sa.iban,
|
|
|
|
be.name AS bankName
|
|
|
|
FROM client c
|
|
|
|
JOIN company AS cny
|
2022-09-12 10:45:52 +00:00
|
|
|
JOIN supplierAccount AS sa ON
|
|
|
|
IF (ct.code = 'PT', sa.id = 907, sa.id = cny.supplierAccountFk)
|
2020-09-25 12:45:00 +00:00
|
|
|
JOIN bankEntity be ON be.id = sa.bankEntityFk
|
|
|
|
WHERE c.id = ? AND cny.id = ?
|