This commit is contained in:
parent
29f9fa0ce3
commit
c2e9095ccd
|
@ -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_calcVisible(NULL, util.VN_CURDATE(), v_warehouse);
|
CALL vn.item_calcVisible(NULL, v_warehouse);
|
||||||
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,7 +1,6 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`item_calcVisible`(
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`item_calcVisible`(
|
||||||
vSelf INT,
|
vSelf INT,
|
||||||
vDated DATE,
|
|
||||||
vWarehouseFk INT
|
vWarehouseFk INT
|
||||||
)
|
)
|
||||||
BEGIN
|
BEGIN
|
||||||
|
@ -9,11 +8,11 @@ BEGIN
|
||||||
* Calcula el visible de un artículo o de todos.
|
* Calcula el visible de un artículo o de todos.
|
||||||
*
|
*
|
||||||
* @param vWarehouse Warehouse id
|
* @param vWarehouse Warehouse id
|
||||||
* @param vDated Max date to filter
|
|
||||||
* @param vSelf Item id
|
* @param vSelf Item id
|
||||||
* @param tmp.itemVisible(item_id, stock, visible)
|
* @param tmp.itemVisible(item_id, stock, visible)
|
||||||
*/
|
*/
|
||||||
DECLARE vTomorrow DATETIME DEFAULT vDated + INTERVAL 1 DAY;
|
DECLARE vDated DATE DEFAULT util.VN_CURDATE();
|
||||||
|
DECLARE vTomorrow DATETIME DEFAULT util.tomorrow();
|
||||||
|
|
||||||
INSERT INTO tmp.itemVisible(item_id, visible)
|
INSERT INTO tmp.itemVisible(item_id, visible)
|
||||||
SELECT itemFk, SUM(quantity)
|
SELECT itemFk, SUM(quantity)
|
||||||
|
|
Loading…
Reference in New Issue