refactor: refs #6453 order_confirmWithUser #2694

Merged
guillermo merged 16 commits from 6453-orderConfirm into dev 2024-08-02 10:15:00 +00:00
1 changed files with 8 additions and 8 deletions
Showing only changes of commit 0e760ba505 - Show all commits

View File

@ -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

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.

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.
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