From 562ebceebe0f08b4861ce7acf47f16d49180617f Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Wed, 3 Jun 2020 14:56:34 +0200 Subject: [PATCH 1/4] Fixed closure sql --- print/methods/closure.js | 1 + 1 file changed, 1 insertion(+) diff --git a/print/methods/closure.js b/print/methods/closure.js index a3d540d84..931ebac4a 100644 --- a/print/methods/closure.js +++ b/print/methods/closure.js @@ -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 From e606f95b65b29579b463d72a3efc01583645306d Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Wed, 3 Jun 2020 16:14:18 +0200 Subject: [PATCH 2/4] Fixed translations --- print/templates/email/delivery-note-link/locale/en.yml | 2 +- print/templates/email/delivery-note/locale/en.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/print/templates/email/delivery-note-link/locale/en.yml b/print/templates/email/delivery-note-link/locale/en.yml index f2d789364..b83bc2185 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 2cc05c5f2..fcabe11ec 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! From 9615fb063d493b172bfaf5c6cbed77859fdf3f27 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Wed, 3 Jun 2020 16:43:51 +0200 Subject: [PATCH 3/4] Fixed translation --- print/templates/email/delivery-note-link/locale/en.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/print/templates/email/delivery-note-link/locale/en.yml b/print/templates/email/delivery-note-link/locale/en.yml index b83bc2185..5f1526828 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! From ba3a52d7bb513d92318851f0e1bdfa40570ca31d Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Wed, 3 Jun 2020 18:06:30 +0200 Subject: [PATCH 4/4] Fixed request args --- print/methods/closure.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/print/methods/closure.js b/print/methods/closure.js index 931ebac4a..c947a0468 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' }); @@ -54,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) {