feat: refs #7640 Optimization
gitea/salix/pipeline/pr-master This commit looks good Details

This commit is contained in:
Guillermo Bonet 2024-07-08 07:21:53 +02:00
parent 55f0e90771
commit 3a2acfb7f8
1 changed files with 2 additions and 3 deletions

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;