Merge branch 'master' into 6744-hotfix-showChangePass
gitea/salix/pipeline/pr-master This commit looks good Details

This commit is contained in:
Jorge Penadés 2024-06-19 14:50:32 +00:00
commit 4b8b503964
1 changed files with 3 additions and 8 deletions

View File

@ -145,15 +145,10 @@ module.exports = Self => {
const newTicket = await models.Ticket.new(ctx, myOptions);
const ticketRefund = await models.TicketRefund.findOne({
where: {refundTicketFk: ticketId}
}, myOptions);
if (negative && (withWarehouse || !ticketRefund?.id)) {
await models.TicketRefund.create({
originalTicketFk: ticketId,
refundTicketFk: newTicket.id
}, myOptions);
}
return newTicket;
}