Fix is_aggregated_amount of stock_current did not work anymore

This commit is contained in:
Bernd Bestel
2020-11-10 20:11:43 +01:00
parent 62e8d88adb
commit 8c54131921
13 changed files with 532 additions and 578 deletions

View File

@@ -141,20 +141,3 @@ WHERE pr.parent_product_id != pr.sub_product_id
GROUP BY pr.sub_product_id
HAVING SUM(s.amount) > 0;
DROP VIEW products_resolved;
CREATE VIEW products_resolved AS
SELECT
p.parent_product_id parent_product_id,
p.id as sub_product_id
FROM products p
WHERE p.parent_product_id IS NOT NULL
AND p.active = 1
UNION
SELECT
p.id parent_product_id,
p.id as sub_product_id
FROM products p
WHERE p.parent_product_id IS NULL
AND p.active = 1;