feat: refs #6968 Changed groupingMode to enum #2306

Merged
guillermo merged 3 commits from 6968-groupingModeRefactor into dev 2024-04-17 06:48:44 +00:00
1 changed files with 4 additions and 4 deletions
Showing only changes of commit c8e7706652 - Show all commits

View File

@ -13,7 +13,7 @@ BEGIN
DECLARE vWarehouseFk SMALLINT;
DECLARE vDate DATE;
DECLARE vGrouping INT;
DECLARE vGroupingModeFk VARCHAR(255);
DECLARE vGroupingMode VARCHAR(255);
guillermo marked this conversation as resolved Outdated

vGroupingMode no es una Fk

vGroupingMode no es una Fk
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;