From 194361008a99849970c51a49c241a89e5d3eca57 Mon Sep 17 00:00:00 2001 From: Philipp Metzner Date: Mon, 23 Mar 2026 12:18:54 +0100 Subject: [PATCH] Avoid using deleted products in Stock Planning --- include/stock_overview.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/stock_overview.php b/include/stock_overview.php index 039c8dec..5b4660c6 100644 --- a/include/stock_overview.php +++ b/include/stock_overview.php @@ -118,6 +118,8 @@ function box_state_id_from_filter($applied_filter) products as b ON upper(a.name)=upper(b.name) WHERE a.camp_id = :camp_id and b.camp_id = :camp_id and a.id<=b.id + AND (NOT a.deleted OR a.deleted IS NULL) + AND (NOT b.deleted OR b.deleted IS NULL) GROUP BY upper(a.name) ) prod_a