refs#6493 update
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Juanjo Breso 2024-03-22 08:32:38 +01:00
parent 84f544dd2b
commit f2a1d401ca
2 changed files with 5 additions and 5 deletions

View File

@ -103,7 +103,7 @@ proc: BEGIN
CALL item_getAtp(vDated);
CREATE OR REPLACE TEMPORARY TABLE availableTraslate
CREATE OR REPLACE TEMPORARY TABLE tmp.availableTraslate
(PRIMARY KEY (item_id))
ENGINE = MEMORY
SELECT t.item_id, SUM(stock) available

View File

@ -68,19 +68,19 @@ BEGIN
AND v.`visible`
ON DUPLICATE KEY UPDATE visibleLanding = v.`visible`;
CALL vn.available_traslate(vWarehouseOut, vDateShipped, NULL);
CALL available_traslate(vWarehouseOut, vDateShipped, NULL);
INSERT INTO tItem(itemFk, available)
SELECT a.item_id, a.available
FROM availableTraslate a
FROM tmp.availableTraslate a
WHERE a.available
ON DUPLICATE KEY UPDATE available = a.available;
CALL vn.available_traslate(vWarehouseIn, vDateLanded, vWarehouseOut);
CALL available_traslate(vWarehouseIn, vDateLanded, vWarehouseOut);
INSERT INTO tItem(itemFk, availableLanding)
SELECT a.item_id, a.available
FROM availableTraslate a
FROM tmp.availableTraslate a
WHERE a.available
ON DUPLICATE KEY UPDATE availableLanding = a.available;
ELSE