salix/print/templates/email/letter-debtor-st/sql/client.sql

10 lines
263 B
SQL

SELECT c.dueDay,
sa.iban,
be.name bankName
FROM client c
JOIN supplierAccount sa ON sa.id = cny.supplierAccountFk
JOIN bankEntity be ON be.id = sa.bankEntityFk
JOIN company cny
WHERE c.id = ?
AND cny.id = ?