Merge branch 'test' into dev
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Guillermo Bonet 2024-05-27 13:51:16 +02:00
commit 55fd94a12a
5 changed files with 2 additions and 20 deletions

View File

@ -22,6 +22,7 @@ BEGIN
BEGIN
IF vLockName IS NOT NULL THEN
DO RELEASE_LOCK(vLockName);
CALL util.debugAdd('releaseLock', vLockName); -- Tmp
END IF;
RESIGNAL;

View File

@ -49,6 +49,7 @@ BEGIN
BEGIN
IF vLockName IS NOT NULL THEN
DO RELEASE_LOCK(vLockName);
CALL util.debugAdd('releaseLock', vLockName); -- Tmp
END IF;
RESIGNAL;

View File

@ -1,18 +0,0 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticketRefund_beforeUpsert`(vRefundTicketFk INT, vOriginalTicketFk INT)
BEGIN
DECLARE vAlreadyExists BOOLEAN DEFAULT FALSE;
IF vRefundTicketFk = vOriginalTicketFk THEN
CALL util.throw('Original ticket and refund ticket has same id');
END IF;
SELECT COUNT(*) INTO vAlreadyExists
FROM ticketRefund
WHERE refundTicketFk = vOriginalTicketFk;
IF vAlreadyExists > 0 THEN
CALL util.throw('This ticket is already a refund');
END IF;
END$$
DELIMITER ;

View File

@ -4,6 +4,5 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketRefund_beforeIn
FOR EACH ROW
BEGIN
SET NEW.editorFk = account.myUser_getId();
CALL ticketRefund_beforeUpsert(NEW.refundTicketFk, NEW.originalTicketFk);
END$$
DELIMITER ;

View File

@ -4,6 +4,5 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketRefund_beforeUp
FOR EACH ROW
BEGIN
SET NEW.editorFk = account.myUser_getId();
CALL ticketRefund_beforeUpsert(NEW.refundTicketFk, NEW.originalTicketFk);
END$$
DELIMITER ;