refactor: refs #6453 order_confirmWithUser #2694
|
@ -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;
|
||||
|
||||
guillermo marked this conversation as resolved
Outdated
|
||||
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
el isOk es una cosa antiga d'un camp que ja no existeix.
Jo posaria vHasRows que es molt mes intuitiu per a qui vinga raere.