7596-devToTest_2426 #2600

Merged
alexm merged 115 commits from 7596-devToTest_2426 into test 2024-06-18 06:19:51 +00:00
1 changed files with 1 additions and 8 deletions
Showing only changes of commit 340a8c119e - Show all commits

View File

@ -140,14 +140,7 @@ module.exports = Self => {
await models.TicketDms.create({ticketFk: ticket.id, dmsFk: dms[0].id}, myOptions);
await ticket.updateAttribute('isSigned', true, myOptions);
const deliveryState = await models.State.findOne({
where: {code: 'DELIVERED'}
}, myOptions);
await models.Ticket.state(ctx, {
ticketFk: ticketId,
stateFk: deliveryState.id
}, myOptions);
await Self.rawSql(`CALL vn.ticket_setState(?, ?)`, [params.ticketFk, params.code], myOptions);
if (ticket?.address()?.province()?.country()?.code != 'ES' && ticket.cmrFk) {
await models.Ticket.saveCmr(ctx, [ticketId], myOptions);