From 3f9cc211e52b6c97e0b40f812b8b17c0d4f51afb Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Tue, 22 Aug 2023 19:40:00 +0200 Subject: [PATCH] Adapted code style --- migrations/0233.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/migrations/0233.sql b/migrations/0233.sql index e511a256..5fa4f54b 100644 --- a/migrations/0233.sql +++ b/migrations/0233.sql @@ -1,4 +1,4 @@ -DROP VIEW IF EXISTS "main"."stock_current"; +DROP VIEW stock_current; CREATE VIEW stock_current AS SELECT @@ -9,7 +9,7 @@ SELECT 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, IFNULL((SELECT SUM(amount) FROM stock WHERE product_id IN (SELECT sub_product_id FROM products_resolved WHERE parent_product_id = pr.parent_product_id) AND open = 1), 0) * IFNULL(qucr.factor, 1) AS amount_opened_aggregated, - CASE WHEN COUNT(p_sub.parent_product_id) > 0 THEN 1 ELSE 0 END AS is_aggregated_amount, + CASE WHEN COUNT(p_sub.parent_product_id) > 0 THEN 1 ELSE 0 END AS is_aggregated_amount, MAX(p_parent.due_type) AS due_type FROM products_resolved pr JOIN stock s @@ -48,4 +48,4 @@ JOIN products p_sub AND p_sub.active = 1 WHERE pr.parent_product_id != pr.sub_product_id GROUP BY pr.sub_product_id -HAVING SUM(s.amount) > 0 \ No newline at end of file +HAVING SUM(s.amount) > 0;