refactor: refs #6453 order_confirmWithUser
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
a8d0345073
commit
0e760ba505
|
@ -37,13 +37,13 @@ BEGIN
|
|||
DECLARE vAvailable INT;
|
||||
|
||||
DECLARE cDates CURSOR FOR
|
||||
SELECT zgs.shipped, r.warehouse_id
|
||||
SELECT zgs.shipped, r.warehouseFk
|
||||
FROM `order` o
|
||||
JOIN order_row r ON r.order_id = o.id
|
||||
LEFT JOIN tmp.zoneGetShipped zgs ON zgs.warehouseFk = r.warehouse_id
|
||||
JOIN orderRow r ON r.orderFk = o.id
|
||||
LEFT JOIN tmp.zoneGetShipped zgs ON zgs.warehouseFk = r.warehouseFk
|
||||
WHERE o.id = vSelf
|
||||
AND r.amount
|
||||
GROUP BY r.warehouse_id;
|
||||
GROUP BY r.warehouseFk;
|
||||
|
||||
DECLARE cRows CURSOR FOR
|
||||
SELECT r.id, r.itemFk, i.name, r.amount, r.price, r.rate, i.isFloramondo
|
||||
|
@ -101,8 +101,8 @@ BEGIN
|
|||
|
||||
-- Check order is not empty
|
||||
SELECT COUNT(*) > 0 INTO vIsOk
|
||||
FROM order_row
|
||||
WHERE order_id = vSelf
|
||||
FROM orderRow
|
||||
WHERE orderFk = vSelf
|
||||
AND amount > 0;
|
||||
|
||||
IF NOT vIsOk THEN
|
||||
|
@ -233,8 +233,8 @@ BEGIN
|
|||
GROUP BY vSaleFk, rc.componentFk;
|
||||
END IF;
|
||||
|
||||
UPDATE order_row
|
||||
SET Id_Movimiento = vSaleFk
|
||||
UPDATE orderRow
|
||||
SET saleFk = vSaleFk
|
||||
WHERE id = vRowFk;
|
||||
|
||||
-- Inserta en putOrder si la compra es de Floramondo
|
||||
|
|
Loading…
Reference in New Issue