feat: refs #7640 Minor change
gitea/salix/pipeline/pr-master There was a failure building this commit
Details
gitea/salix/pipeline/pr-master There was a failure building this commit
Details
This commit is contained in:
parent
3ddf49da0a
commit
55f0e90771
|
@ -75,6 +75,13 @@ proc: BEGIN
|
|||
) sub
|
||||
GROUP BY itemFk;
|
||||
|
||||
UPDATE tmp.itemInventory ai
|
||||
JOIN tItemInventoryCalc iic ON iic.itemFk = ai.id
|
||||
SET ai.inventory = iic.quantity,
|
||||
ai.visible = iic.visible,
|
||||
ai.avalaible = iic.quantity,
|
||||
ai.sd = iic.quantity;
|
||||
|
||||
-- Cálculo del visible
|
||||
CREATE OR REPLACE TEMPORARY TABLE tItemVisibleCalc
|
||||
(PRIMARY KEY (itemFk))
|
||||
|
@ -118,12 +125,8 @@ proc: BEGIN
|
|||
GROUP BY itemFk;
|
||||
|
||||
UPDATE tmp.itemInventory ai
|
||||
JOIN tItemInventoryCalc iic ON iic.itemFk = ai.id
|
||||
LEFT JOIN tItemVisibleCalc ivc ON ivc.itemFk = iic.itemFk
|
||||
SET ai.inventory = iic.quantity,
|
||||
ai.visible = iic.visible + IFNULL(ivc.visible, 0),
|
||||
ai.avalaible = iic.quantity,
|
||||
ai.sd = iic.quantity;
|
||||
JOIN tItemVisibleCalc ivc ON ivc.itemFk = ai.id
|
||||
SET ai.visible = ai.visible + ivc.visible;
|
||||
|
||||
-- Calculo del disponible
|
||||
CREATE OR REPLACE TEMPORARY TABLE tmp.itemCalc
|
||||
|
|
Loading…
Reference in New Issue