refs #6184 saveCmr #1788
|
@ -75,7 +75,7 @@ module.exports = Self => {
|
||||||
if (ticketDms?.dms()?.id) return true;
|
if (ticketDms?.dms()?.id) return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function createGestDoc(id) {
|
async function createGestDoc() {
|
||||||
const ctxUploadFile = Object.assign({}, ctx);
|
const ctxUploadFile = Object.assign({}, ctx);
|
||||||
ctxUploadFile.args = {
|
ctxUploadFile.args = {
|
||||||
warehouseId: ticket.warehouseFk,
|
warehouseId: ticket.warehouseFk,
|
||||||
|
@ -138,7 +138,7 @@ module.exports = Self => {
|
||||||
if (location) await setLocation(ticketId);
|
if (location) await setLocation(ticketId);
|
||||||
if (!await hasSignDms(ticketId) && !gestDocCreated)
|
if (!await hasSignDms(ticketId) && !gestDocCreated)
|
||||||
await createGestDoc(ticketId);
|
await createGestDoc(ticketId);
|
||||||
await models.TicketDms.create({ticketFk: id, dmsFk: dms[0].id}, myOptions);
|
await models.TicketDms.create({ticketFk: ticketId, 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