fix: refs #7781 prevent pallet merge #2792
|
@ -52,7 +52,7 @@ BEGIN
|
||||||
FROM tExpedition
|
FROM tExpedition
|
||||||
WHERE palletFk IS NULL;
|
WHERE palletFk IS NULL;
|
||||||
|
|
||||||
SELECT GROUP_CONCAT(expeditionFk SEPARATOR ', ') INTO vExpeditionWithPallet
|
SELECT COUNT(expeditionFk) INTO vExpeditionWithPallet
|
||||||
FROM tExpedition
|
FROM tExpedition
|
||||||
WHERE palletFk;
|
WHERE palletFk;
|
||||||
|
|
||||||
|
@ -60,7 +60,6 @@ BEGIN
|
||||||
CALL util.throw ('NO_FREE_EXPEDITIONS');
|
CALL util.throw ('NO_FREE_EXPEDITIONS');
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
|
|
||||||
SELECT roadmapStopFk INTO vTruckFk
|
SELECT roadmapStopFk INTO vTruckFk
|
||||||
FROM (
|
FROM (
|
||||||
SELECT rm.roadmapStopFk, count(*) n
|
SELECT rm.roadmapStopFk, count(*) n
|
||||||
|
@ -91,12 +90,16 @@ BEGIN
|
||||||
|
|
||||||
INSERT INTO expeditionState(expeditionFk, typeFk)
|
INSERT INTO expeditionState(expeditionFk, typeFk)
|
||||||
SELECT expeditionFk, vExpeditionStateTypeFk
|
SELECT expeditionFk, vExpeditionStateTypeFk
|
||||||
FROM tExpedition
|
FROM tExpedition
|
||||||
pablone marked this conversation as resolved
Outdated
|
|||||||
WHERE palletFk IS NULL;
|
WHERE palletFk IS NULL;
|
||||||
|
|
||||||
IF vExpeditionWithPallet THEN
|
IF vExpeditionWithPallet THEN
|
||||||
UPDATE arcRead
|
UPDATE arcRead
|
||||||
SET error = vExpeditionWithPallet
|
SET error = (
|
||||||
|
SELECT GROUP_CONCAT(expeditionFk SEPARATOR ', ')
|
||||||
|
FROM tExpedition
|
||||||
|
WHERE palletFk
|
||||||
|
)
|
||||||
WHERE id = vArcId;
|
WHERE id = vArcId;
|
||||||
ELSE
|
ELSE
|
||||||
UPDATE arcRead SET error = NULL WHERE id = vArcId;
|
UPDATE arcRead SET error = NULL WHERE id = vArcId;
|
||||||
|
|
Loading…
Reference in New Issue
Si dalt se ha fet
IF NOT vExpeditionWithPallet
no entrarà mai per el else.Volies ficar
vExpeditionWithOutPallet
?si