This commit is contained in:
parent
324875ec1f
commit
5d7d9f8d9e
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue