This commit is contained in:
parent
9f2057fdd0
commit
225060ff74
|
@ -52,7 +52,7 @@ BEGIN
|
|||
FROM tExpedition
|
||||
WHERE palletFk IS NULL;
|
||||
|
||||
SELECT GROUP_CONCAT(expeditionFk SEPARATOR ', ') INTO vExpeditionWithPallet
|
||||
SELECT COUNT(expeditionFk) INTO vExpeditionWithPallet
|
||||
FROM tExpedition
|
||||
WHERE palletFk;
|
||||
|
||||
|
@ -60,7 +60,6 @@ BEGIN
|
|||
CALL util.throw ('NO_FREE_EXPEDITIONS');
|
||||
END IF;
|
||||
|
||||
|
||||
SELECT roadmapStopFk INTO vTruckFk
|
||||
FROM (
|
||||
SELECT rm.roadmapStopFk, count(*) n
|
||||
|
@ -91,12 +90,16 @@ BEGIN
|
|||
|
||||
INSERT INTO expeditionState(expeditionFk, typeFk)
|
||||
SELECT expeditionFk, vExpeditionStateTypeFk
|
||||
FROM tExpedition
|
||||
WHERE palletFk IS NULL;
|
||||
FROM tExpedition
|
||||
WHERE palletFk IS NULL;
|
||||
|
||||
IF vExpeditionWithPallet THEN
|
||||
UPDATE arcRead
|
||||
SET error = vExpeditionWithPallet
|
||||
SET error = (
|
||||
SELECT GROUP_CONCAT(expeditionFk SEPARATOR ', ')
|
||||
FROM tExpedition
|
||||
WHERE palletFk
|
||||
)
|
||||
WHERE id = vArcId;
|
||||
ELSE
|
||||
UPDATE arcRead SET error = NULL WHERE id = vArcId;
|
||||
|
|
Loading…
Reference in New Issue