Bug #220 Al crear un consignatario mirar RE
This commit is contained in:
parent
d29dcf2e11
commit
02a173da36
|
@ -45,5 +45,16 @@ module.exports = function(Self) {
|
|||
};
|
||||
await Self.updateAll(filter, {isDefaultAddress: false});
|
||||
}
|
||||
|
||||
if (ctx.isNewInstance == true) {
|
||||
let filter = {
|
||||
where: {
|
||||
id: ctx.instance.clientFk
|
||||
},
|
||||
fields: ['isEqualizated']
|
||||
};
|
||||
let findOneResponse = await Self.app.models.Client.findOne(filter);
|
||||
ctx.instance.isEqualizated = findOneResponse.isEqualizated;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue