refactor: refs #7640 multipleInventoryFix #2689

Merged
guillermo merged 4 commits from 7640-multipleInventoryFix into master 2024-07-08 05:52:52 +00:00
1 changed files with 2 additions and 3 deletions
Showing only changes of commit 3a2acfb7f8 - Show all commits

View File

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