feat: refs#8087 Redadas en travel
gitea/salix/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Carlos Andrés 2024-11-19 13:40:12 +01:00
parent b8f2e0b906
commit 6a43d3c752
5 changed files with 36 additions and 20 deletions

View File

@ -0,0 +1,17 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`travel_checkRaid`(
vIsRaid BOOL,
vDaysInForward INT
)
BEGIN
/**
* Check if the values of isRaid and daysInforward are correct
*
* @param vIsRaid idRaid value
* @param vDaysInForward daysInForward value
*/
IF (NOT vIsRaid AND vDaysInForward IS NOT NULL) OR (vIsRaid AND vDaysInForward IS NULL) THEN
CALL util.throw('The raid information is not correct');
END IF;
END$$
DELIMITER ;

View File

@ -1,10 +0,0 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`town_beforeUpdate`
BEFORE UPDATE ON `town`
FOR EACH ROW
BEGIN
-- IF !(OLD.geoFk <=> NEW.geoFk) THEN
-- CALL zoneGeo_throwNotEditable;
-- END IF;
END$$
DELIMITER ;

View File

@ -9,6 +9,10 @@ BEGIN
CALL travel_checkWarehouseIsFeedStock(NEW.warehouseInFk);
IF NEW.isRaid IS NOT NULL OR NEW.daysInForward IS NOT NULL THEN
CALL travel_checkRaid(NEW.isRaid, NEW.daysInForward);
END IF;
IF NEW.awbFk IS NOT NULL THEN
CALL travel_throwAwb(NEW.id);
END IF;

View File

@ -20,6 +20,10 @@ BEGIN
CALL travel_checkWarehouseIsFeedStock(NEW.warehouseInFk);
END IF;
IF NOT (NEW.isRaid <=> OLD.isRaid) OR NOT (NEW.daysInForward <=> OLD.daysInForward) THEN
CALL travel_checkRaid(NEW.isRaid, NEW.daysInForward);
END IF;
IF NOT (NEW.awbFk <=> OLD.awbFk)THEN
SELECT COUNT(*) INTO vHasAnyInvoiceBooked
FROM travel t

View File

@ -245,5 +245,6 @@
"ticketLostExpedition": "The ticket [{{ticketId}}]({{{ticketUrl}}}) has the following lost expedition:{{ expeditionId }}",
"null": "null",
"Invalid or expired verification code": "Invalid or expired verification code",
"Payment method is required": "Payment method is required"
"Payment method is required": "Payment method is required",
"The raid information is not correct": "The raid information is not correct"
}