diff --git a/print/methods/closure.js b/print/methods/closure.js
index a3d540d844..c947a04683 100644
--- a/print/methods/closure.js
+++ b/print/methods/closure.js
@@ -4,11 +4,11 @@ const smtp = require('../core/smtp');
const config = require('../core/config');
module.exports = app => {
- app.get('/api/closure/by-ticket', async function(request, response) {
+ app.get('/api/closure/by-ticket', async function(req, res) {
});
- app.get('/api/closure/all', async function(request, response) {
- response.status(200).json({
+ app.get('/api/closure/all', async function(req, res) {
+ res.status(200).json({
message: 'Task executed successfully'
});
@@ -19,6 +19,7 @@ module.exports = app => {
t.clientFk,
c.email recipient,
c.isToBeMailed,
+ c.salesPersonFk,
eu.email salesPersonEmail
FROM expedition e
JOIN ticket t ON t.id = e.ticketFk
@@ -53,11 +54,13 @@ module.exports = app => {
continue;
}
- const args = {
+ const reqArgs = req.args;
+ const args = Object.assign({
ticketId: ticket.id,
recipientId: ticket.clientFk,
recipient: ticket.recipient
- };
+ }, reqArgs);
+
const email = new Email('delivery-note-link', args);
await email.send();
} catch (error) {
diff --git a/print/templates/email/delivery-note-link/locale/en.yml b/print/templates/email/delivery-note-link/locale/en.yml
index f2d7893646..5f15268284 100644
--- a/print/templates/email/delivery-note-link/locale/en.yml
+++ b/print/templates/email/delivery-note-link/locale/en.yml
@@ -5,6 +5,6 @@ description: The delivery note from the order {0} is now availa
You can download it by clicking this link.
copyLink: 'As an alternative, you can copy the following link in your browser:'
poll: If you wish, you can answer our satisfaction survey to
- help us provide better service. Your opinion is very important for us!
+ help us provide better service. Your opinion is very important for us!
help: Any questions that arise, do not hesitate to consult it, we are here to assist you!
conclusion: Thanks for your attention!
diff --git a/print/templates/email/delivery-note/locale/en.yml b/print/templates/email/delivery-note/locale/en.yml
index 2cc05c5f22..fcabe11ec6 100644
--- a/print/templates/email/delivery-note/locale/en.yml
+++ b/print/templates/email/delivery-note/locale/en.yml
@@ -4,6 +4,6 @@ dear: Dear client
description: The delivery note from the order {0} is now available.
You can download it by clicking on the attachment of this email.
poll: If you wish, you can answer our satisfaction survey to
- help us provide better service. Your opinion is very important for us!
+ help us provide better service. Your opinion is very important for us!
help: Any questions that arise, do not hesitate to consult it, we are here to assist you!
conclusion: Thanks for your attention!