fix: refs #6861 deleteAdded
gitea/salix/pipeline/pr-master This commit looks good Details

This commit is contained in:
Carlos Andrés 2024-10-04 13:07:54 +02:00
parent 324875ec1f
commit 5d7d9f8d9e
1 changed files with 4 additions and 3 deletions

View File

@ -22,9 +22,10 @@ proc: BEGIN
SELECT iss.saleFk INTO vSaleFk
FROM itemShelvingSale iss
JOIN sale s ON s.id = iss.saleFk
WHERE iss.id = vSelf AND s.isAdded;
WHERE iss.id = vSelf AND s.isAdded
FOR UPDATE;
IF vSaleFk IS NULL THEN
IF vSaleFk IS NULL THEN
CALL util.throw('The sale can not be deleted');
END IF;
@ -32,7 +33,7 @@ proc: BEGIN
FROM itemShelvingSale
WHERE saleFk = vSaleFk AND isPicked;
IF vHasSalesPicked THEN
IF vHasSalesPicked THEN
CALL util.throw('A sale with picked sales cannot be deleted');
END IF;