7773-testToMaster_2430 #2774

Merged
alexm merged 368 commits from 7773-testToMaster_2430 into master 2024-07-23 06:21:03 +00:00
1 changed files with 4 additions and 3 deletions
Showing only changes of commit 6702ff8616 - Show all commits

View File

@ -34,17 +34,18 @@ BEGIN
IF vParam REGEXP '^[0-9]+$' THEN IF vParam REGEXP '^[0-9]+$' THEN
SET vLastWeek = util.VN_CURDATE() - INTERVAL 1 WEEK; 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 IF (SELECT TRUE FROM saleGroup WHERE id = vParam) THEN
CALL saleGroup_setParking(vParam, vParkingFk); CALL saleGroup_setParking(vParam, vParkingFk);
ELSEIF (SELECT TRUE FROM ticket WHERE id = vParam AND shipped >= vLastWeek) THEN ELSEIF (SELECT TRUE FROM ticket WHERE id = vParam AND shipped >= vLastWeek) THEN
CALL ticket_setParking(vParam, vParkingFk); CALL ticket_setParking(vParam, vParkingFk);
ELSEIF (SELECT TRUE FROM `collection` WHERE id = vParam AND created >= vLastWeek) THEN ELSEIF (SELECT TRUE FROM `collection` WHERE id = vParam AND created >= vLastWeek) THEN
CALL collection_setParking(vParam, vParkingFk); 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; END IF;
ELSE ELSE
-- Por descarte, se considera una matrícula CALL util.throw('paramNotExist');
CALL shelving_setParking(vParam, vParkingFk);
END IF; END IF;
COMMIT; COMMIT;