This commit is contained in:
parent
7a557be09a
commit
c8e7706652
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue