refs #6755 fix ticket

This commit is contained in:
Carlos Satorres 2024-03-05 09:43:07 +01:00
parent 893320b114
commit cac388f986
1 changed files with 1 additions and 11 deletions

View File

@ -30,18 +30,8 @@ module.exports = Self => {
Object.assign(myOptions, options); Object.assign(myOptions, options);
const ticket = await models.Ticket.findById(id, { const ticket = await models.Ticket.findById(id, {
include: [{ fields: ['originFk', 'creationDate', 'newInstance']
relation: 'client',
scope: {
fields: ['id', 'salesPersonFk']
}
}]
}, myOptions); }, myOptions);
const lastUpdatedTicket = await models.ticketLog.findById(id, {
include: [{
}]
});
const now = Date.vnNew(); const now = Date.vnNew();
const maxDate = new Date(ticket.updated); const maxDate = new Date(ticket.updated);