Bug #657 mandar una notificacion al comercial de un cliente falla

This commit is contained in:
gerard 2018-09-14 08:08:38 +02:00
parent 0f14bf9d27
commit 3fafadf5c8
1 changed files with 3 additions and 1 deletions

View File

@ -69,6 +69,8 @@ module.exports = function(Self) {
let ctx = {req: {accessToken: accessToken}};
let insurance = await Self.findById(data.id, filter);
let customer = insurance.classification().customer();
if (!customer.salesPerson()) return;
let salesPerson = customer.salesPerson().user().name;
let grade = data.grade ? `(Grado ${data.grade})` : '(Sin grado)';
let message = {