fix: refs #7505 fix
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Guillermo Bonet 2024-07-23 14:18:52 +02:00
parent a9aa47fef1
commit abfbf13440
1 changed files with 2 additions and 2 deletions

View File

@ -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;