Bug #657 mandar una notificacion al comercial de un cliente falla
This commit is contained in:
parent
0f14bf9d27
commit
3fafadf5c8
|
@ -69,6 +69,8 @@ module.exports = function(Self) {
|
||||||
let ctx = {req: {accessToken: accessToken}};
|
let ctx = {req: {accessToken: accessToken}};
|
||||||
let insurance = await Self.findById(data.id, filter);
|
let insurance = await Self.findById(data.id, filter);
|
||||||
let customer = insurance.classification().customer();
|
let customer = insurance.classification().customer();
|
||||||
|
|
||||||
|
if (!customer.salesPerson()) return;
|
||||||
let salesPerson = customer.salesPerson().user().name;
|
let salesPerson = customer.salesPerson().user().name;
|
||||||
let grade = data.grade ? `(Grado ${data.grade})` : '(Sin grado)';
|
let grade = data.grade ? `(Grado ${data.grade})` : '(Sin grado)';
|
||||||
let message = {
|
let message = {
|
||||||
|
|
Loading…
Reference in New Issue