This commit is contained in:
parent
26c2ab867d
commit
0045edb698
|
@ -58,7 +58,10 @@ module.exports = Self => {
|
|||
for (const param in args)
|
||||
params[param] = args[param];
|
||||
|
||||
if (!recipient) params.recipient = models.Client.findById(recipientId, {fields: ['email']});
|
||||
if (!recipient) {
|
||||
client = await models.Client.findById(recipientId, {fields: ['email']});
|
||||
params.recipient = client.email;
|
||||
}
|
||||
|
||||
const email = new Email('delivery-note', params);
|
||||
|
||||
|
|
Loading…
Reference in New Issue