feat: refs #8227 Undo vehicle_checkNumberPlate change and triggers checks
gitea/salix/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
e9f1e28ac0
commit
75b0589561
|
@ -13,18 +13,12 @@ BEGIN
|
||||||
*/
|
*/
|
||||||
DECLARE vRegex VARCHAR(45);
|
DECLARE vRegex VARCHAR(45);
|
||||||
|
|
||||||
IF vCountryCodeFk IS NULL THEN
|
SELECT regex INTO vRegex
|
||||||
SET vRegex = '^[A-Z0-9 -]{6,12}$';
|
FROM vehiclePlateRegex
|
||||||
ELSE
|
WHERE countryCodeFk = vCountryCodeFk;
|
||||||
SELECT regex INTO vRegex
|
|
||||||
FROM vehiclePlateRegex
|
|
||||||
WHERE countryCodeFk = vCountryCodeFk;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NOT vNumberPlate REGEXP BINARY (vRegex)THEN
|
IF NOT vNumberPlate REGEXP BINARY (vRegex)THEN
|
||||||
CALL util.throw(CONCAT('La matricula ', vNumberPlate,
|
CALL util.throw(CONCAT('Error: la matricula ', vNumberPlate, ' no es valida para ',vCountryCodeFk));
|
||||||
' no es valida', IF(vCountryCodeFk IS NOT NULL,
|
|
||||||
CONCAT(' para ', vCountryCodeFk), '')));
|
|
||||||
END IF;
|
END IF;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -7,13 +7,6 @@ BEGIN
|
||||||
IF NEW.etd > NEW.eta THEN
|
IF NEW.etd > NEW.eta THEN
|
||||||
CALL util.throw('Departure time can not be after arrival time');
|
CALL util.throw('Departure time can not be after arrival time');
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
IF NEW.tractorPlate IS NOT NULL THEN
|
|
||||||
CALL vehicle_checkNumberPlate(NEW.tractorPlate, NULL);
|
|
||||||
END IF;
|
|
||||||
IF NEW.trailerPlate IS NOT NULL THEN
|
|
||||||
CALL vehicle_checkNumberPlate(NEW.trailerPlate, NULL);
|
|
||||||
END IF;
|
|
||||||
SET NEW.name = UCASE(NEW.name);
|
SET NEW.name = UCASE(NEW.name);
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
|
@ -7,13 +7,6 @@ BEGIN
|
||||||
IF NEW.etd > NEW.eta THEN
|
IF NEW.etd > NEW.eta THEN
|
||||||
CALL util.throw('Departure time can not be after arrival time');
|
CALL util.throw('Departure time can not be after arrival time');
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
IF NEW.tractorPlate IS NOT NULL THEN
|
|
||||||
CALL vehicle_checkNumberPlate(NEW.tractorPlate, NULL);
|
|
||||||
END IF;
|
|
||||||
IF NEW.trailerPlate IS NOT NULL THEN
|
|
||||||
CALL vehicle_checkNumberPlate(NEW.trailerPlate, NULL);
|
|
||||||
END IF;
|
|
||||||
SET NEW.name = UCASE(NEW.name);
|
SET NEW.name = UCASE(NEW.name);
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
Loading…
Reference in New Issue