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

11 lines
254 B
SQL

SELECT
i.id,
i.name,
i.stems,
i.size,
b.packing
FROM vn.item i
JOIN cache.last_buy clb ON clb.item_id = i.id
JOIN vn.buy b ON b.id = clb.buy_id
JOIN vn.entry e ON e.id = b.entryFk
WHERE i.id = ? AND clb.warehouse_id = ?