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

13 lines
304 B
MySQL
Raw Normal View History

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