7729-devToTest_2430 #2739
|
@ -25,7 +25,7 @@ proc: BEGIN
|
||||||
WHERE warehouse_id = v_warehouse;
|
WHERE warehouse_id = v_warehouse;
|
||||||
|
|
||||||
-- Calculamos los movimientos confirmados de hoy
|
-- Calculamos los movimientos confirmados de hoy
|
||||||
CALL vn.item_getVisible(v_warehouse, util.VN_CURDATE(), NULL);
|
CALL vn.item_calcVisible(v_warehouse, util.VN_CURDATE(), NULL);
|
||||||
DELETE FROM visible WHERE calc_id = v_calc;
|
DELETE FROM visible WHERE calc_id = v_calc;
|
||||||
|
|
||||||
INSERT INTO visible (calc_id, item_id,visible)
|
INSERT INTO visible (calc_id, item_id,visible)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`item_getVisible`(
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`item_calcVisible`(
|
||||||
vWarehouseFk INT,
|
vWarehouseFk INT,
|
||||||
vDated INT,
|
vDated INT,
|
||||||
vItemFk INT
|
vItemFk INT
|
|
@ -86,7 +86,7 @@ proc: BEGIN
|
||||||
SELECT item_id, amount stock, amount visible FROM `cache`.stock
|
SELECT item_id, amount stock, amount visible FROM `cache`.stock
|
||||||
WHERE warehouse_id = vWarehouseFk;
|
WHERE warehouse_id = vWarehouseFk;
|
||||||
|
|
||||||
CALL item_getVisible(vWarehouseFk, util.VN_CURDATE(), NULL);
|
CALL item_calcVisible(vWarehouseFk, util.VN_CURDATE(), NULL);
|
||||||
UPDATE tmp.itemInventory it
|
UPDATE tmp.itemInventory it
|
||||||
JOIN tmp.itemVisible iv ON iv.item_id = it.id
|
JOIN tmp.itemVisible iv ON iv.item_id = it.id
|
||||||
SET it.visible = iv.visible;
|
SET it.visible = iv.visible;
|
||||||
|
|
Loading…
Reference in New Issue