refactor: refs #7640 multipleInventoryFix #2689
|
@ -40,8 +40,7 @@ proc: BEGIN
|
|||
(PRIMARY KEY (itemFk))
|
||||
ENGINE = MEMORY
|
||||
SELECT itemFk,
|
||||
SUM(quantity) quantity,
|
||||
SUM(quantity) visible
|
||||
SUM(quantity) quantity
|
||||
FROM (
|
||||
SELECT s.itemFk, - s.quantity quantity
|
||||
FROM sale s
|
||||
|
@ -78,7 +77,7 @@ proc: BEGIN
|
|||
UPDATE tmp.itemInventory ai
|
||||
JOIN tItemInventoryCalc iic ON iic.itemFk = ai.id
|
||||
SET ai.inventory = iic.quantity,
|
||||
ai.visible = iic.visible,
|
||||
ai.visible = iic.quantity,
|
||||
ai.avalaible = iic.quantity,
|
||||
ai.sd = iic.quantity;
|
||||
|
||||
|
|
Loading…
Reference in New Issue