Merge branch 'master' into 6404-sendMailOnDeadLine
gitea/salix/pipeline/pr-master Build queued...
Details
gitea/salix/pipeline/pr-master Build queued...
Details
This commit is contained in:
commit
7a0d107943
|
@ -145,15 +145,10 @@ module.exports = Self => {
|
||||||
|
|
||||||
const newTicket = await models.Ticket.new(ctx, myOptions);
|
const newTicket = await models.Ticket.new(ctx, myOptions);
|
||||||
|
|
||||||
const ticketRefund = await models.TicketRefund.findOne({
|
await models.TicketRefund.create({
|
||||||
where: {refundTicketFk: ticketId}
|
originalTicketFk: ticketId,
|
||||||
|
refundTicketFk: newTicket.id
|
||||||
}, myOptions);
|
}, myOptions);
|
||||||
if (negative && (withWarehouse || !ticketRefund?.id)) {
|
|
||||||
await models.TicketRefund.create({
|
|
||||||
originalTicketFk: ticketId,
|
|
||||||
refundTicketFk: newTicket.id
|
|
||||||
}, myOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
return newTicket;
|
return newTicket;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue