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

12 lines
211 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 = ?