From 9d1440fb453ca8daf137f972f6e2ad31462b959b Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Sat, 10 Jul 2021 18:30:50 +0200 Subject: [PATCH] Typo... --- migrations/0140.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migrations/0140.sql b/migrations/0140.sql index 33126b61..c03d5054 100644 --- a/migrations/0140.sql +++ b/migrations/0140.sql @@ -114,7 +114,7 @@ AS SELECT pr.parent_product_id AS product_id, IFNULL((SELECT SUM(amount) FROM stock WHERE product_id = pr.parent_product_id), 0) AS amount, - SUM(s.amount) * IFNULL(qucr.factor, 1.0) AS amount_aggregated, + SUM(s.amount * IFNULL(qucr.factor, 1.0)) AS amount_aggregated, IFNULL(ROUND((SELECT SUM(IFNULL(price,0) * amount) FROM stock WHERE product_id = pr.parent_product_id), 2), 0) AS value, MIN(s.best_before_date) AS best_before_date, IFNULL((SELECT SUM(amount) FROM stock WHERE product_id = pr.parent_product_id AND open = 1), 0) AS amount_opened,