This commit is contained in:
parent
c1c64d0f89
commit
a4419a2542
|
@ -57,7 +57,7 @@ module.exports = Self => {
|
|||
AND dt.code = 'cmr'
|
||||
`, [ticketId]);
|
||||
|
||||
if (!dms.lenght) throw new UserError('Cmr file does not exist');
|
||||
if (!dms.length) throw new UserError('Cmr file does not exist');
|
||||
|
||||
const response = await models.Dms.downloadFile(ctx, dms[0].id);
|
||||
|
||||
|
|
|
@ -134,7 +134,8 @@ module.exports = Self => {
|
|||
if (location) await setLocation(ticketId);
|
||||
if (!await hasSignDms(ticketId) && !isSignUploaded)
|
||||
await createGestDoc(ticketId);
|
||||
await models.TicketDms.create({ticketFk: ticket.id, dmsFk: dms[0].id}, myOptions);
|
||||
if (isSignUploaded)
|
||||
await models.TicketDms.create({ticketFk: ticket.id, dmsFk: dms[0].id}, myOptions);
|
||||
await ticket.updateAttribute('isSigned', true, myOptions);
|
||||
|
||||
const deliveryState = await models.State.findOne({
|
||||
|
|
Loading…
Reference in New Issue