6995-testToMaster_2410 #2139
|
@ -57,7 +57,7 @@ module.exports = Self => {
|
||||||
AND dt.code = 'cmr'
|
AND dt.code = 'cmr'
|
||||||
`, [ticketId]);
|
`, [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);
|
const response = await models.Dms.downloadFile(ctx, dms[0].id);
|
||||||
|
|
||||||
|
|
|
@ -134,7 +134,8 @@ module.exports = Self => {
|
||||||
if (location) await setLocation(ticketId);
|
if (location) await setLocation(ticketId);
|
||||||
if (!await hasSignDms(ticketId) && !isSignUploaded)
|
if (!await hasSignDms(ticketId) && !isSignUploaded)
|
||||||
await createGestDoc(ticketId);
|
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);
|
await ticket.updateAttribute('isSigned', true, myOptions);
|
||||||
|
|
||||||
const deliveryState = await models.State.findOne({
|
const deliveryState = await models.State.findOne({
|
||||||
|
|
Loading…
Reference in New Issue