From 6702ff86168544fdebbb954f23405cf92fdd8a12 Mon Sep 17 00:00:00 2001 From: guillermo Date: Thu, 11 Jul 2024 14:50:21 +0200 Subject: [PATCH] feat: refs #7580 Requested changes --- db/routines/vn/procedures/setParking.sql | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/db/routines/vn/procedures/setParking.sql b/db/routines/vn/procedures/setParking.sql index 087fb4c07..7d0c52919 100644 --- a/db/routines/vn/procedures/setParking.sql +++ b/db/routines/vn/procedures/setParking.sql @@ -34,17 +34,18 @@ BEGIN IF vParam REGEXP '^[0-9]+$' THEN SET vLastWeek = util.VN_CURDATE() - INTERVAL 1 WEEK; - -- Comprobamos si es una prep. previa, ticket o colección + -- Comprobamos si es una prep. previa, ticket, colección o shelving IF (SELECT TRUE FROM saleGroup WHERE id = vParam) THEN CALL saleGroup_setParking(vParam, vParkingFk); 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); + ELSEIF (SELECT TRUE FROM shelving WHERE code = vParam COLLATE utf8_unicode_ci) THEN + CALL shelving_setParking(vParam, vParkingFk); END IF; ELSE - -- Por descarte, se considera una matrícula - CALL shelving_setParking(vParam, vParkingFk); + CALL util.throw('paramNotExist'); END IF; COMMIT;