salix/print/templates/reports/item-label-qr/sql/company.sql

6 lines
164 B
SQL

SELECT co.code
FROM warehouse w
JOIN address a ON a.id = w.addressFk
JOIN client c ON c.id = a.clientFk
JOIN company co ON co.clientFk = c.id
WHERE w.id = ?