salix/print/templates/reports/entry-order/sql/supplier.sql

11 lines
195 B
SQL

SELECT s.name,
s.street,
s.nif,
s.postCode,
s.city,
p.name province
FROM supplier s
JOIN entry e ON e.supplierFk = s.id
LEFT JOIN province p ON p.id = s.provinceFk
WHERE e.id = ?