DELIMITER $$ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`saleGroup_setParking`(IN `vSaleGroupFk` VARCHAR(8), IN `vParkingFk` INT) proc: BEGIN /** * Aparca una preparaciĆ³n previa en un parking * * @param vSaleGroupFk id de la preparaciĆ³n previa * @param vParkingFk id del parking */ UPDATE vn.saleGroup sg SET sg.parkingFk = vParkingFk WHERE sg.id = vSaleGroupFk AND sg.created >= TIMESTAMPADD(WEEK,-1,util.VN_CURDATE()); CALL vn.ticket_setNextState(vn.ticket_get(vSaleGroupFk)); END$$ DELIMITER ;