fix: refs #7781 leave early before any updates on the proc
gitea/salix/pipeline/pr-master This commit looks good
Details
gitea/salix/pipeline/pr-master This commit looks good
Details
This commit is contained in:
parent
09031822a6
commit
72bab95be1
|
@ -5,7 +5,7 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`expeditionPallet_bu
|
|||
vWorkerFk INT,
|
||||
OUT vPalletFk INT
|
||||
)
|
||||
BEGIN
|
||||
proc: BEGIN
|
||||
/**
|
||||
* Builds an expedition pallet.
|
||||
*
|
||||
|
@ -56,6 +56,17 @@ BEGIN
|
|||
FROM tExpedition
|
||||
WHERE palletFk;
|
||||
|
||||
IF vExpeditionWithPallet THEN
|
||||
UPDATE arcRead
|
||||
SET error = (
|
||||
SELECT GROUP_CONCAT(expeditionFk SEPARATOR ', ')
|
||||
FROM tExpedition
|
||||
WHERE palletFk
|
||||
)
|
||||
WHERE id = vArcId;
|
||||
LEAVE proc;
|
||||
END IF;
|
||||
|
||||
IF NOT vFreeExpeditionCount THEN
|
||||
CALL util.throw ('NO_FREE_EXPEDITIONS');
|
||||
END IF;
|
||||
|
@ -93,15 +104,6 @@ BEGIN
|
|||
FROM tExpedition
|
||||
WHERE palletFk IS NULL;
|
||||
|
||||
IF vExpeditionWithPallet THEN
|
||||
UPDATE arcRead
|
||||
SET error = (
|
||||
SELECT GROUP_CONCAT(expeditionFk SEPARATOR ', ')
|
||||
FROM tExpedition
|
||||
WHERE palletFk
|
||||
)
|
||||
WHERE id = vArcId;
|
||||
ELSE
|
||||
UPDATE arcRead SET error = NULL WHERE id = vArcId;
|
||||
|
||||
SELECT printerFk INTO vPrinterFk FROM arcRead WHERE id = vArcId;
|
||||
|
@ -115,7 +117,6 @@ BEGIN
|
|||
);
|
||||
|
||||
UPDATE expeditionPallet SET isPrint = TRUE WHERE id = vPalletFk;
|
||||
END IF;
|
||||
|
||||
DROP TEMPORARY TABLE tExpedition;
|
||||
END$$
|
||||
|
|
Loading…
Reference in New Issue