This commit is contained in:
parent
9db989d191
commit
b36846994d
|
@ -198,9 +198,9 @@ module.exports = Self => {
|
|||
if (payMethodChanged || ibanChanged || dueDayChanged) {
|
||||
const message = `La forma de pago del cliente con id ${instance.id} ha cambiado`;
|
||||
const salesPersonFk = instance.salesPersonFk;
|
||||
const salesPerson = await Self.app.models.Worker.findById(salesPersonFk);
|
||||
|
||||
if (salesPerson) {
|
||||
if (salesPersonFk) {
|
||||
const salesPerson = await Self.app.models.Worker.findById(salesPersonFk);
|
||||
await Self.app.models.Message.send(ctx, {
|
||||
recipientFk: salesPerson.userFk,
|
||||
message: message
|
||||
|
|
Loading…
Reference in New Issue