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

14 lines
327 B
MySQL
Raw Normal View History

2020-09-25 12:45:00 +00:00
SELECT
i.id,
i.name,
i.stems,
i.size,
2022-11-18 10:46:13 +00:00
b.packing,
p.name as 'producer'
2020-09-25 12:45:00 +00:00
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
2022-11-18 10:46:13 +00:00
JOIN vn.producer p ON p.id = i.producerFk
2020-09-25 12:45:00 +00:00
WHERE i.id = ? AND clb.warehouse_id = ?