This commit is contained in:
parent
a9aa47fef1
commit
abfbf13440
|
@ -21,8 +21,8 @@ proc:BEGIN
|
|||
(PRIMARY KEY (item_id))
|
||||
ENGINE = MEMORY
|
||||
SELECT s.item_id, SUM(s.amount) stock, SUM(s.amount) visible
|
||||
FROM cache.stock s
|
||||
JOIN warehouse w ON w.id = s.warehouse_id
|
||||
FROM stock s
|
||||
JOIN vn.warehouse w ON w.id = s.warehouse_id
|
||||
WHERE (v_warehouse IS NULL OR s.warehouse_id = v_warehouse)
|
||||
AND w.isComparative
|
||||
GROUP BY s.item_id;
|
||||
|
|
Loading…
Reference in New Issue