Server error on change paymethod #1687
gitea/salix/dev There was a failure building this commit
Details
gitea/salix/dev There was a failure building this commit
Details
This commit is contained in:
parent
7ecb67052d
commit
0ed240df0b
|
@ -209,9 +209,9 @@ module.exports = Self => {
|
||||||
if (payMethodChanged || ibanChanged || dueDayChanged) {
|
if (payMethodChanged || ibanChanged || dueDayChanged) {
|
||||||
const message = `La forma de pago del cliente con id ${instance.id} ha cambiado`;
|
const message = `La forma de pago del cliente con id ${instance.id} ha cambiado`;
|
||||||
const salesPersonFk = instance.salesPersonFk;
|
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, {
|
await Self.app.models.Message.send(ctx, {
|
||||||
recipientFk: salesPerson.userFk,
|
recipientFk: salesPerson.userFk,
|
||||||
message: message
|
message: message
|
||||||
|
|
Loading…
Reference in New Issue