cmd: p.type doesn't exist

This commit is contained in:
Adnan Zahir
2026-04-23 22:41:32 +07:00
parent cdcc268d89
commit 65299d7913
3 changed files with 10 additions and 3 deletions
@@ -225,7 +225,10 @@ JOIN product_warehouses wp
ON wp.warehouse_id = w.id
JOIN products p
ON p.id = wp.product_id
AND UPPER(COALESCE(p.type, '')) IN ('PAKAN', 'OVK')
JOIN flags f
ON f.flagable_id = p.id
AND f.flagable_type = 'products'
AND UPPER(f.name) IN ('PAKAN', 'OVK')
LEFT JOIN product_warehouses cpw
ON cpw.product_id = wp.product_id
AND cpw.warehouse_id = correct_w.id