8144-devToTest_2444 #3137
|
@ -74,7 +74,8 @@ module.exports = Self => {
|
||||||
pm.name payMethod,
|
pm.name payMethod,
|
||||||
r.finished IS NULL hasRecovery,
|
r.finished IS NULL hasRecovery,
|
||||||
dp.id departmentFk,
|
dp.id departmentFk,
|
||||||
dp.name departmentName
|
dp.name departmentName,
|
||||||
|
dp.notificationEmail departmentEmail
|
||||||
FROM defaulter d
|
FROM defaulter d
|
||||||
JOIN client c ON c.id = d.clientFk
|
JOIN client c ON c.id = d.clientFk
|
||||||
JOIN country cn ON cn.id = c.countryFk
|
JOIN country cn ON cn.id = c.countryFk
|
||||||
|
|
|
@ -47,7 +47,7 @@ module.exports = Self => {
|
||||||
await models.Mail.create({
|
await models.Mail.create({
|
||||||
subject: $t('Comment added to client', {clientFk: defaulter.clientFk}),
|
subject: $t('Comment added to client', {clientFk: defaulter.clientFk}),
|
||||||
body: body,
|
body: body,
|
||||||
receiver: `${defaulter.salesPersonName}@verdnatura.es`,
|
receiver: `${defaulter.departmentEmail}`,
|
||||||
replyTo: `${user.name}@verdnatura.es`
|
replyTo: `${user.name}@verdnatura.es`
|
||||||
}, myOptions);
|
}, myOptions);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue