From 7fda58d4a4fef14dcd557c90fa7be07caadcf122 Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 16 Apr 2024 12:29:44 +0200 Subject: [PATCH] hotfix: ticket#174308 Ekt load packing --- db/routines/edi/procedures/ekt_load.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/routines/edi/procedures/ekt_load.sql b/db/routines/edi/procedures/ekt_load.sql index ccdcd1999..adbaf4628 100644 --- a/db/routines/edi/procedures/ekt_load.sql +++ b/db/routines/edi/procedures/ekt_load.sql @@ -147,7 +147,7 @@ proc:BEGIN (@t := IF(i.stems, i.stems, 1)) * e.pri / IFNULL(i.stemMultiplier, 1) buyingValue, IFNULL(vItem, vDefaultEntry) itemFk, e.qty stickers, - @pac := IFNULL(i.stemMultiplier, 1) * e.pac / @t packing, + @pac := GREATEST(1, i.stemMultiplier * e.pac / @t) packing, IFNULL(b.`grouping`, e.pac), @pac * e.qty, vForceToPacking,