From f2a1d401ca6abe74dba801987fab8de285dc1527 Mon Sep 17 00:00:00 2001 From: Jbreso Date: Fri, 22 Mar 2024 08:32:38 +0100 Subject: [PATCH] refs#6493 update --- db/routines/vn/procedures/available_traslate.sql | 2 +- db/routines/vn/procedures/entry_getTransfer.sql | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/db/routines/vn/procedures/available_traslate.sql b/db/routines/vn/procedures/available_traslate.sql index 44b76d0c2..ad442a724 100644 --- a/db/routines/vn/procedures/available_traslate.sql +++ b/db/routines/vn/procedures/available_traslate.sql @@ -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 diff --git a/db/routines/vn/procedures/entry_getTransfer.sql b/db/routines/vn/procedures/entry_getTransfer.sql index e7ddcea31..165c87dc7 100644 --- a/db/routines/vn/procedures/entry_getTransfer.sql +++ b/db/routines/vn/procedures/entry_getTransfer.sql @@ -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