From bfc2d6f73422069c16d746db10fc4d6165d99209 Mon Sep 17 00:00:00 2001 From: robert Date: Tue, 23 Jul 2024 11:38:05 +0200 Subject: [PATCH 1/2] feat: refs #7716 travel_setDelivered --- db/routines/vn/events/travel_setDelivered.sql | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 db/routines/vn/events/travel_setDelivered.sql diff --git a/db/routines/vn/events/travel_setDelivered.sql b/db/routines/vn/events/travel_setDelivered.sql new file mode 100644 index 000000000..769ee9d24 --- /dev/null +++ b/db/routines/vn/events/travel_setDelivered.sql @@ -0,0 +1,12 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`travel_setDelivered` + ON SCHEDULE EVERY 1 DAY + STARTS '2024-07-12 00:10:00.000' + ON COMPLETION PRESERVE + ENABLE +DO BEGIN + UPDATE travel t + SET t.isDelivered = TRUE + WHERE t.shipped < util.VN_CURDATE(); +END$$ +DELIMITER ; From db31ac3b60660e557186b65f38364c82eba14dfd Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 24 Jul 2024 09:39:33 +0200 Subject: [PATCH 2/2] fix: refs #7662 ticket_splitItemPackingType --- db/routines/vn/procedures/ticket_splitItemPackingType.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/db/routines/vn/procedures/ticket_splitItemPackingType.sql b/db/routines/vn/procedures/ticket_splitItemPackingType.sql index c2ec50fd9..5ae9fb9bc 100644 --- a/db/routines/vn/procedures/ticket_splitItemPackingType.sql +++ b/db/routines/vn/procedures/ticket_splitItemPackingType.sql @@ -1,7 +1,7 @@ DELIMITER $$ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_splitItemPackingType`( vSelf INT, - vItemPackingTypeFk VARCHAR(1) + vOriginalItemPackingTypeFk VARCHAR(1) ) BEGIN /** @@ -9,7 +9,7 @@ BEGIN * Respeta el id inicial para el tipo propuesto. * * @param vSelf Id ticket - * @param vItemPackingTypeFk Tipo para el que se reserva el número de ticket original + * @param vOriginalItemPackingTypeFk Tipo para el que se reserva el número de ticket original * @return table tmp.ticketIPT(ticketFk, itemPackingTypeFk) */ DECLARE vItemPackingTypeFk VARCHAR(1) DEFAULT 'H'; @@ -23,7 +23,7 @@ BEGIN SELECT itemPackingTypeFk FROM tSaleGroup WHERE itemPackingTypeFk IS NOT NULL - ORDER BY (itemPackingTypeFk = vItemPackingTypeFk) DESC; + ORDER BY (itemPackingTypeFk = vOriginalItemPackingTypeFk) DESC; DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;