fix: refs #3979 si se abona un abono sin almacen no falla
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
0130130cee
commit
26a05a4840
|
@ -109,7 +109,10 @@ module.exports = Self => {
|
|||
|
||||
const newTicket = await models.Ticket.new(ctx, myOptions);
|
||||
|
||||
if (negative) {
|
||||
const ticketRefund = await models.TicketRefund.findOne({
|
||||
where: {refundTicketFk: ticketId}
|
||||
}, myOptions);
|
||||
if (negative && (withWarehouse || !ticketRefund?.id)) {
|
||||
await models.TicketRefund.create({
|
||||
originalTicketFk: ticketId,
|
||||
refundTicketFk: newTicket.id
|
||||
|
|
Loading…
Reference in New Issue