salix/print/templates/reports/balance-compensation/sql/client.sql

12 lines
251 B
SQL

SELECT
c.name,
c.socialName,
c.street,
c.fi,
c.city,
r.amountPaid,
r.payed
FROM client c
JOIN receipt r ON r.clientFk = c.id
JOIN supplier s ON c.fi = s.nif
WHERE r.id = ?