feat: refs #6968 Requested changes
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Guillermo Bonet 2024-04-17 07:15:24 +02:00
parent 7a557be09a
commit c8e7706652
1 changed files with 4 additions and 4 deletions

View File

@ -13,7 +13,7 @@ BEGIN
DECLARE vWarehouseFk SMALLINT;
DECLARE vDate DATE;
DECLARE vGrouping INT;
DECLARE vGroupingModeFk VARCHAR(255);
DECLARE vGroupingMode VARCHAR(255);
DECLARE vPacking INT;
DECLARE vRoundQuantity INT DEFAULT 1;
DECLARE vLanded DATE;
@ -56,15 +56,15 @@ BEGIN
CALL buyUltimate(vWarehouseFk, vDate);
SELECT `grouping`, groupingMode, packing
INTO vGrouping,vGroupingModeFk,vPacking
INTO vGrouping,vGroupingMode,vPacking
FROM buy b
JOIN tmp.buyUltimate tmp ON b.id = tmp.buyFk
WHERE tmp.itemFk = vNewItemFk AND tmp.WarehouseFk = vWarehouseFk;
IF vGroupingModeFk = 'packing' AND vPacking > 0 THEN
IF vGroupingMode = 'packing' AND vPacking > 0 THEN
SET vRoundQuantity = vPacking;
END IF;
IF vGroupingModeFk = 'grouping' AND vGrouping > 0 THEN
IF vGroupingMode = 'grouping' AND vGrouping > 0 THEN
SET vRoundQuantity = vGrouping;
END IF;