feat: ref#7902 Triggers vn.ticketRefund to control deleted tickets
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Carlos Andrés 2024-09-30 14:33:58 +02:00
parent 08c7bd2c42
commit 41af809917
1 changed files with 3 additions and 2 deletions

View File

@ -13,9 +13,10 @@ BEGIN
*/ */
DECLARE vIsDeleted BOOL; DECLARE vIsDeleted BOOL;
SELECT SUM(ABS(isDeleted)) INTO vIsDeleted SELECT COUNT(*) INTO vIsDeleted
FROM ticket FROM ticket
WHERE id IN (vRefundTicketFk, vOriginalTicketFk); WHERE id IN (vRefundTicketFk, vOriginalTicketFk)
AND isDeleted;
IF vIsDeleted THEN IF vIsDeleted THEN
CALL util.throw('The refund ticket can not be deleted tickets'); CALL util.throw('The refund ticket can not be deleted tickets');