modificaciones
gitea/salix/pipeline/pr-dev This commit looks good
Details
gitea/salix/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
c942786783
commit
9aae9677e6
|
@ -61,6 +61,8 @@ BEGIN
|
|||
|
||||
w1: WHILE vQuantity >= vPacking DO
|
||||
|
||||
SET vQuantity = vQuantity - vPacking;
|
||||
|
||||
SET vItemShelvingFk = NULL;
|
||||
|
||||
SELECT sub.id
|
||||
|
@ -86,7 +88,7 @@ w1: WHILE vQuantity >= vPacking DO
|
|||
LIMIT 1;
|
||||
|
||||
IF vItemShelvingFk THEN
|
||||
/* INSERT INTO itemShelvingSale
|
||||
INSERT INTO itemShelvingSale
|
||||
SET itemShelvingFk = vItemShelvingFk,
|
||||
saleFk = vSaleFk,
|
||||
quantity = vPacking,
|
||||
|
@ -94,7 +96,7 @@ w1: WHILE vQuantity >= vPacking DO
|
|||
isPicked = TRUE;
|
||||
|
||||
SET vItemShelvingSaleFk = LAST_INSERT_ID();
|
||||
*/
|
||||
|
||||
UPDATE sale SET isPicked = FALSE WHERE id = vSaleFk;
|
||||
ELSE
|
||||
LEAVE w1;
|
||||
|
@ -188,10 +190,10 @@ w1: WHILE vQuantity >= vPacking DO
|
|||
WHERE id = vItemShelvingSaleFk;
|
||||
|
||||
SET vItemShelvingSaleFk = vItemShelvingSaleFk_old;
|
||||
/* ELSE
|
||||
ELSE
|
||||
UPDATE itemShelvingSale
|
||||
SET saleFk = vNewSaleFk
|
||||
WHERE id = vItemShelvingSaleFk; */
|
||||
WHERE id = vItemShelvingSaleFk;
|
||||
END IF;
|
||||
ELSE
|
||||
INSERT INTO sale(ticketFk, itemFk, concept, quantity, discount, price)
|
||||
|
@ -206,9 +208,10 @@ w1: WHILE vQuantity >= vPacking DO
|
|||
FROM saleComponent
|
||||
WHERE saleFk = vSaleFk;
|
||||
|
||||
/* UPDATE itemShelvingSale
|
||||
SET saleFk = vNewSaleFk */
|
||||
|
||||
UPDATE itemShelvingSale
|
||||
SET saleFk = vNewSaleFk
|
||||
WHERE id = vItemShelvingSaleFk;
|
||||
|
||||
END IF;
|
||||
|
||||
INSERT IGNORE INTO saleTracking(saleFk, isChecked, workerFk, stateFk)
|
||||
|
@ -277,6 +280,7 @@ w1: WHILE vQuantity >= vPacking DO
|
|||
DELETE FROM sale
|
||||
WHERE quantity = 0
|
||||
AND id = vSaleFk;
|
||||
|
||||
END WHILE;
|
||||
|
||||
END$$
|
||||
|
|
Loading…
Reference in New Issue