salix/db/routines/vn/procedures/inventoryMakeLauncher.sql

13 lines
304 B
SQL

DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`inventoryMakeLauncher`()
BEGIN
/**
* Recalculate the inventories of all warehouses
*/
CALL inventoryMake(
util.VN_CURDATE() -
INTERVAL (SELECT daysInPastForInventory FROM inventoryConfig LIMIT 1) DAY
);
END$$
DELIMITER ;