From 73b43aa254f4896261c1cc692fb6fd2dc5f8629e Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 8 Jul 2024 13:22:10 +0200 Subject: [PATCH] refactor: refs #7580 Fixes --- db/routines/vn/procedures/setParking.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/routines/vn/procedures/setParking.sql b/db/routines/vn/procedures/setParking.sql index c4e1fd19f..107ef66f4 100644 --- a/db/routines/vn/procedures/setParking.sql +++ b/db/routines/vn/procedures/setParking.sql @@ -33,9 +33,9 @@ BEGIN SET vLastWeek = util.VN_CURDATE() - INTERVAL 1 WEEK; -- Comprobamos si es una prep. previa, ticket o colección - IF (SELECT TRUE FROM saleGroup sg WHERE sg.id = vParam) THEN + IF (SELECT TRUE FROM saleGroup WHERE id = vParam) THEN CALL saleGroup_setParking(vParam, vParkingFk); - ELSEIF (SELECT TRUE FROM ticket WHERE id = vParam shipped >= vLastWeek) THEN + ELSEIF (SELECT TRUE FROM ticket WHERE id = vParam AND shipped >= vLastWeek) THEN CALL ticket_setParking(vParam, vParkingFk); ELSEIF (SELECT TRUE FROM `collection` WHERE id = vParam AND created >= vLastWeek) THEN CALL collection_setParking(vParam, vParkingFk);