#7919 delete if ticketRefund #3091
Labels
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: verdnatura/salix#3091
Loading…
Reference in New Issue
No description provided.
Delete Branch "7919-deleteTicketRefund"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
chore: refs #7919 delete if ticketRefundto WIP: #7919 delete if ticketRefundWIP: #7919 delete if ticketRefundto #7919 delete if ticketRefund@ -52,3 +54,3 @@
const allDeleted = ticketRefunds.every(refund => refund.refundTicket().isDeleted);
if (ticketRefunds?.length && !allDeleted) {
if (!isRefund) await models.TicketRefund.destroyAll({refundTicketFk: id}, myOptions);
Si no es originalTicket entrará en el if y solo si existe en la tabla ticketRefund como refundTicket lo eliminará.