From bd5d88f5ef1a6163c9a289caa904f56db7c88eaa Mon Sep 17 00:00:00 2001 From: ivanm Date: Mon, 4 Mar 2024 08:41:09 +0100 Subject: [PATCH 1/2] refs #6969 Error packaging --- db/routines/vn/procedures/buyUltimateFromInterval.sql | 1 - 1 file changed, 1 deletion(-) diff --git a/db/routines/vn/procedures/buyUltimateFromInterval.sql b/db/routines/vn/procedures/buyUltimateFromInterval.sql index 92434a47b..f78174482 100644 --- a/db/routines/vn/procedures/buyUltimateFromInterval.sql +++ b/db/routines/vn/procedures/buyUltimateFromInterval.sql @@ -39,7 +39,6 @@ BEGIN WHERE t.landed BETWEEN vStarted AND vEnded AND (vWarehouseFk IS NULL OR t.warehouseInFk = vWarehouseFk) AND b.price2 > 0 - AND b.quantity > 0 ORDER BY NOT b.isIgnored DESC, t.landed DESC, b.id DESC LIMIT 10000000000000000000) sub GROUP BY itemFk, warehouseFk; -- 2.40.1 From 492c6f4dd6aa596f2e2b10b0c96c1604fee3e2f7 Mon Sep 17 00:00:00 2001 From: ivanm Date: Wed, 6 Mar 2024 12:50:44 +0100 Subject: [PATCH 2/2] refs #6969 test --- db/routines/vn/procedures/buyUltimateFromInterval.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/db/routines/vn/procedures/buyUltimateFromInterval.sql b/db/routines/vn/procedures/buyUltimateFromInterval.sql index f78174482..e264b500d 100644 --- a/db/routines/vn/procedures/buyUltimateFromInterval.sql +++ b/db/routines/vn/procedures/buyUltimateFromInterval.sql @@ -43,6 +43,7 @@ BEGIN LIMIT 10000000000000000000) sub GROUP BY itemFk, warehouseFk; + INSERT IGNORE INTO tmp.buyUltimateFromInterval(itemFk, warehouseFk, buyFk, landed, isIgnored) SELECT b.itemFk, -- 2.40.1