refactor: refs #7505 item_getVisible refactor #2573
|
@ -83,7 +83,7 @@ proc: BEGIN
|
||||||
ai.sd = iic.quantity;
|
ai.sd = iic.quantity;
|
||||||
|
|
||||||
-- Cálculo del visible
|
-- Cálculo del visible
|
||||||
CALL cache.stock_refresh(false);
|
CALL cache.stock_refresh(false);
|
||||||
|
|
||||||
CREATE OR REPLACE TEMPORARY TABLE tmp.itemVisible
|
CREATE OR REPLACE TEMPORARY TABLE tmp.itemVisible
|
||||||
(PRIMARY KEY (item_id))
|
(PRIMARY KEY (item_id))
|
||||||
|
@ -92,7 +92,7 @@ proc: BEGIN
|
||||||
FROM cache.stock
|
FROM cache.stock
|
||||||
WHERE warehouse_id = vWarehouseFk;
|
WHERE warehouse_id = vWarehouseFk;
|
||||||
|
|
||||||
CALL item_calcVisible(NULL, vWarehouseFk, util.VN_CURDATE());
|
CALL item_calcVisible(NULL, vWarehouseFk, vDate);
|
||||||
UPDATE tmp.itemInventory it
|
UPDATE tmp.itemInventory it
|
||||||
JOIN tmp.itemVisible iv ON iv.item_id = it.id
|
JOIN tmp.itemVisible iv ON iv.item_id = it.id
|
||||||
SET it.visible = it.visible + iv.visible;
|
SET it.visible = it.visible + iv.visible;
|
||||||
|
|
Loading…
Reference in New Issue