7806_devToTest_2332 #2801
|
@ -75,13 +75,6 @@ proc: BEGIN
|
||||||
) sub
|
) sub
|
||||||
GROUP BY itemFk;
|
GROUP BY itemFk;
|
||||||
|
|
||||||
UPDATE tmp.itemInventory ai
|
|
||||||
JOIN tItemInventoryCalc iic ON iic.itemFk = ai.id
|
|
||||||
SET ai.inventory = iic.quantity,
|
|
||||||
ai.visible = iic.quantity,
|
|
||||||
ai.avalaible = iic.quantity,
|
|
||||||
ai.sd = iic.quantity;
|
|
||||||
|
|
||||||
-- Cálculo del visible
|
-- Cálculo del visible
|
||||||
CALL cache.visible_refresh(vCalcFk, FALSE, vWarehouseFk);
|
CALL cache.visible_refresh(vCalcFk, FALSE, vWarehouseFk);
|
||||||
|
|
||||||
|
@ -93,8 +86,12 @@ proc: BEGIN
|
||||||
WHERE calc_id = vCalcFk;
|
WHERE calc_id = vCalcFk;
|
||||||
|
|
||||||
UPDATE tmp.itemInventory it
|
UPDATE tmp.itemInventory it
|
||||||
|
JOIN tItemInventoryCalc iic ON iic.itemFk = it.id
|
||||||
JOIN tItemVisibleCalc ivc ON ivc.item_id = it.id
|
JOIN tItemVisibleCalc ivc ON ivc.item_id = it.id
|
||||||
SET it.visible = it.visible + ivc.visible;
|
SET it.inventory = iic.quantity,
|
||||||
|
it.visible = ivc.visible,
|
||||||
|
it.avalaible = iic.quantity,
|
||||||
|
it.sd = iic.quantity;
|
||||||
|
|
||||||
-- Calculo del disponible
|
-- Calculo del disponible
|
||||||
CREATE OR REPLACE TEMPORARY TABLE tmp.itemCalc
|
CREATE OR REPLACE TEMPORARY TABLE tmp.itemCalc
|
||||||
|
|
Loading…
Reference in New Issue