2024-01-15 11:31:03 +00:00
|
|
|
DELIMITER $$
|
2024-08-20 08:06:10 +00:00
|
|
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`saleGroup_setParking`(
|
2024-07-08 11:17:29 +00:00
|
|
|
vSaleGroupFk VARCHAR(8),
|
|
|
|
vParkingFk INT
|
|
|
|
)
|
|
|
|
BEGIN
|
2024-01-15 11:31:03 +00:00
|
|
|
/**
|
2024-07-08 11:17:29 +00:00
|
|
|
* Aparca una preparación previa en un parking.
|
2024-01-15 11:31:03 +00:00
|
|
|
*
|
|
|
|
* @param vSaleGroupFk id de la preparación previa
|
|
|
|
* @param vParkingFk id del parking
|
|
|
|
*/
|
2024-07-08 11:17:29 +00:00
|
|
|
UPDATE saleGroup sg
|
2024-01-15 11:31:03 +00:00
|
|
|
SET sg.parkingFk = vParkingFk
|
2024-07-26 12:05:22 +00:00
|
|
|
WHERE sg.id = vSaleGroupFk
|
|
|
|
AND sg.created >= util.VN_CURDATE() - INTERVAL 1 WEEK;
|
2024-01-15 11:31:03 +00:00
|
|
|
|
2024-07-08 11:17:29 +00:00
|
|
|
CALL ticket_setNextState(ticket_get(vSaleGroupFk));
|
2024-01-15 11:31:03 +00:00
|
|
|
END$$
|
|
|
|
DELIMITER ;
|