salix/print/templates/reports/item-label-barcode/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 = ?