componentUpdate
This commit is contained in:
parent
2fdd275085
commit
85db094f1d
|
@ -88,13 +88,17 @@ module.exports = Self => {
|
|||
if (!zoneShipped || zoneShipped.zoneFk != zoneId)
|
||||
throw new UserError(`You don't have privileges to change the zone`);
|
||||
}
|
||||
const originalTicket = await models.Ticket.findById(id);
|
||||
const originalTicket = await models.Ticket.findById(id, {fields:
|
||||
['id', 'clientFk', 'agencyModeFk', 'addressFk', 'zoneFk',
|
||||
'warehouseFk', 'companyFk', 'shipped', 'landed', 'isDeleted']
|
||||
});
|
||||
const properties = Object.assign({}, ctx.args);
|
||||
delete properties.ctx;
|
||||
delete properties.option;
|
||||
// Force unroute
|
||||
const hasToBeUnrouted = true;
|
||||
console.log('args', originalTicket);
|
||||
console.log('originalTicket', originalTicket);
|
||||
console.log('properties', properties);
|
||||
let query = 'CALL vn.ticket_componentMakeUpdate(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)';
|
||||
let res = await Self.rawSql(query, [
|
||||
id,
|
||||
|
|
Loading…
Reference in New Issue