From 5f28d39bbf02702916124fd8a1841f9b5450dc8b Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Thu, 21 Nov 2019 09:33:08 +0100 Subject: [PATCH] dynamic header & footer texts by company #1336 --- db/dump/fixtures.sql | 2 +- .../components/email-footer/email-footer.html | 6 +-- .../components/email-footer/email-footer.js | 3 +- .../components/email-footer/locale/en.yml | 17 +++++++ .../components/email-footer/locale/es.yml | 31 +++++++------ .../components/email-footer/locale/fr.yml | 31 +++++++------ .../components/email-footer/locale/pt.yml | 17 +++++++ .../components/email-header/email-header.js | 3 +- .../components/report-footer/locale/en.yml | 8 ++++ .../components/report-footer/locale/es.yml | 2 - .../components/report-footer/locale/fr.yml | 2 - .../components/report-footer/locale/pt.yml | 2 - .../report-footer/report-footer.html | 2 +- .../components/report-footer/report-footer.js | 16 ++++++- .../components/report-header/locale/en.yml | 2 + .../components/report-header/locale/es.yml | 5 +-- .../components/report-header/locale/fr.yml | 2 + .../components/report-header/locale/pt.yml | 5 +-- .../report-header/report-header.html | 9 +++- .../components/report-header/report-header.js | 44 ++++++++++++++++++- print/core/database.js | 23 +++++++++- print/core/mixins/user-locale.js | 6 ++- .../claim-pickup-order.html | 10 +---- .../email/client-welcome/client-welcome.html | 10 +---- .../delivery-note-link.html | 10 +---- .../email/delivery-note/delivery-note.html | 10 +---- .../email/driver-route/driver-route.html | 10 +---- .../letter-debtor-nd/letter-debtor-nd.html | 11 +---- .../letter-debtor-st/letter-debtor-st.html | 11 +---- .../email/payment-update/payment-update.html | 10 +---- .../email/printer-setup/printer-setup.html | 10 +---- .../templates/email/sepa-core/sepa-core.html | 10 +---- .../claim-pickup-order.html | 8 +--- .../reports/delivery-note/delivery-note.html | 9 ++-- .../reports/delivery-note/delivery-note.js | 3 +- .../reports/delivery-note/locale/en.yml | 26 +++++++++++ .../reports/delivery-note/locale/fr.yml | 14 +++--- .../reports/driver-route/driver-route.html | 10 ++--- .../reports/letter-debtor/letter-debtor.html | 8 +--- print/templates/reports/receipt/receipt.html | 8 +--- .../reports/sepa-core/sepa-core.html | 8 +--- 41 files changed, 246 insertions(+), 188 deletions(-) create mode 100644 print/core/components/email-footer/locale/en.yml create mode 100644 print/core/components/email-footer/locale/pt.yml create mode 100644 print/core/components/report-footer/locale/en.yml create mode 100644 print/core/components/report-header/locale/en.yml create mode 100644 print/core/components/report-header/locale/fr.yml create mode 100644 print/templates/reports/delivery-note/locale/en.yml diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index 21413d329..cf760e25a 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -31,7 +31,7 @@ INSERT INTO `hedera`.`tpvConfig`(`id`, `currency`, `terminal`, `transactionType` INSERT INTO `account`.`user`(`id`,`name`,`password`,`role`,`active`,`email`,`lang`) VALUES (101, 'BruceWayne', 'ac754a330530832ba1bf7687f577da91', 2, 1, 'BruceWayne@mydomain.com', 'es'), - (102, 'PetterParker', 'ac754a330530832ba1bf7687f577da91', 2, 1, 'PetterParker@mydomain.com', 'es'), + (102, 'PetterParker', 'ac754a330530832ba1bf7687f577da91', 2, 1, 'PetterParker@mydomain.com', 'en'), (103, 'ClarkKent', 'ac754a330530832ba1bf7687f577da91', 2, 1, 'ClarkKent@mydomain.com', 'fr'), (104, 'TonyStark', 'ac754a330530832ba1bf7687f577da91', 2, 1, 'TonyStark@mydomain.com', 'es'), (105, 'MaxEisenhardt', 'ac754a330530832ba1bf7687f577da91', 2, 1, 'MaxEisenhardt@mydomain.com', 'pt'), diff --git a/print/core/components/email-footer/email-footer.html b/print/core/components/email-footer/email-footer.html index b60125c5d..a033ec633 100644 --- a/print/core/components/email-footer/email-footer.html +++ b/print/core/components/email-footer/email-footer.html @@ -39,9 +39,9 @@
-

{{$t('privacy.fiscalAddress')}}

-

{{$t('privacy.disclaimer')}}

-

{{$t('privacy.law')}}

+

{{$t('fiscalAddress')}}

+

{{$t('disclaimer')}}

+

{{$t('privacy')}}

\ No newline at end of file diff --git a/print/core/components/email-footer/email-footer.js b/print/core/components/email-footer/email-footer.js index 527c8121a..d21ad348e 100755 --- a/print/core/components/email-footer/email-footer.js +++ b/print/core/components/email-footer/email-footer.js @@ -1,4 +1,3 @@ module.exports = { - name: 'email-footer', - props: ['isPreview', 'locale'] + name: 'email-footer' }; diff --git a/print/core/components/email-footer/locale/en.yml b/print/core/components/email-footer/locale/en.yml new file mode 100644 index 000000000..ccc0832e8 --- /dev/null +++ b/print/core/components/email-footer/locale/en.yml @@ -0,0 +1,17 @@ +buttons: + webAcccess: Visit our website + info: Help us to improve +fiscalAddress: VERDNATURA LEVANTE SL, B97367486 Avda. Espioca, 100, 46460 Silla + · www.verdnatura.es · clientes@verdnatura.es +disclaimer: '- NOTICE - This message is private and confidential, and should be used + exclusively by the person receiving it. If you have received this message by mistake, + please notify the sender and delete that message and any attached documents that it may contain. + Verdnatura Levante SL does not waive confidentiality or any privilege due to erroneous + transmission or malfunction. Likewise, it is not responsible for the changes, alterations, + errors or omissions that could be made to the message once sent.' +privacy: 'In compliance with the provisions of Organic Law 15/1999, on the + Protection of Personal Data, we inform you that the personal data you provide + will be included in automated files of VERDNATURA LEVANTE SL, being able at all + times to exercise the rights of access, rectification, cancellation and opposition, + communicating it in writing to the registered office of the entity. + The purpose of the file is administrative management, accounting, and billing.' diff --git a/print/core/components/email-footer/locale/es.yml b/print/core/components/email-footer/locale/es.yml index 592a46737..7f4b13045 100644 --- a/print/core/components/email-footer/locale/es.yml +++ b/print/core/components/email-footer/locale/es.yml @@ -1,19 +1,18 @@ buttons: webAcccess: Visita nuestra Web info: Ayúdanos a mejorar -privacy: - fiscalAddress: VERDNATURA LEVANTE SL, B97367486 Avda. Espioca, 100, 46460 Silla - · www.verdnatura.es · clientes@verdnatura.es - disclaimer: '- AVISO - Este mensaje es privado y confidencial, y debe ser utilizado - exclusivamente por la persona destinataria del mismo. Si has recibido este mensaje - por error, te rogamos lo comuniques al remitente y borres dicho mensaje y cualquier - documento adjunto que pudiera contener. Verdnatura Levante SL no renuncia a la - confidencialidad ni a ningún privilegio por causa de transmisión errónea o mal - funcionamiento. Igualmente no se hace responsable de los cambios, alteraciones, - errores u omisiones que pudieran hacerse al mensaje una vez enviado.' - law: En cumplimiento de lo dispuesto en la Ley Orgánica 15/1999, de Protección de - Datos de Carácter Personal, te comunicamos que los datos personales que facilites - se incluirán en ficheros automatizados de VERDNATURA LEVANTE S.L., pudiendo en - todo momento ejercitar los derechos de acceso, rectificación, cancelación y oposición, - comunicándolo por escrito al domicilio social de la entidad. La finalidad del - fichero es la gestión administrativa, contabilidad, y facturación. +fiscalAddress: VERDNATURA LEVANTE SL, B97367486 Avda. Espioca, 100, 46460 Silla + · www.verdnatura.es · clientes@verdnatura.es +disclaimer: '- AVISO - Este mensaje es privado y confidencial, y debe ser utilizado + exclusivamente por la persona destinataria del mismo. Si has recibido este mensaje + por error, te rogamos lo comuniques al remitente y borres dicho mensaje y cualquier + documento adjunto que pudiera contener. Verdnatura Levante SL no renuncia a la + confidencialidad ni a ningún privilegio por causa de transmisión errónea o mal + funcionamiento. Igualmente no se hace responsable de los cambios, alteraciones, + errores u omisiones que pudieran hacerse al mensaje una vez enviado.' +privacy: En cumplimiento de lo dispuesto en la Ley Orgánica 15/1999, de Protección de + Datos de Carácter Personal, te comunicamos que los datos personales que facilites + se incluirán en ficheros automatizados de VERDNATURA LEVANTE S.L., pudiendo en + todo momento ejercitar los derechos de acceso, rectificación, cancelación y oposición, + comunicándolo por escrito al domicilio social de la entidad. La finalidad del + fichero es la gestión administrativa, contabilidad, y facturación. diff --git a/print/core/components/email-footer/locale/fr.yml b/print/core/components/email-footer/locale/fr.yml index c3eb5c3ff..d93f9769e 100644 --- a/print/core/components/email-footer/locale/fr.yml +++ b/print/core/components/email-footer/locale/fr.yml @@ -1,19 +1,18 @@ buttons: webAcccess: Visitez notre site web info: Aidez-nous à améliorer -privacy: - fiscalAddress: VERDNATURA LEVANTE SL, B97367486 Avda. Espioca, 100, 46460 Silla - · www.verdnatura.es · clientes@verdnatura.es - disclaimer: "- AVIS - Ce message est privé et confidentiel et doit être utilisé - exclusivement par le destinataire. Si vous avez reçu ce message par erreur, - veuillez en informer l'expéditeur et supprimer ce message ainsi que tous les - documents joints qu'il pourrait contenir. Verdnatura Levante SL ne renonce pas à la - confidentialité ni aux privilèges résultant d'une transmission erronée ou d'un dysfonctionnement. - De même, il n'est pas responsable des modifications, altérations, erreurs ou - omissions qui pourraient être apportées au message une fois envoyé." - law: En cumplimiento de lo dispuesto en la Ley Orgánica 15/1999, de Protección de - Datos de Carácter Personal, te comunicamos que los datos personales que facilites - se incluirán en ficheros automatizados de VERDNATURA LEVANTE S.L.,pudiendo en - todo momento ejercitar los derechos de acceso, rectificación, cancelación y oposición, - comunicándolo porescrito al domicilio social de la entidad. La finalidad del fichero - es la gestión administrativa, contabilidad, y facturación. +fiscalAddress: VERDNATURA LEVANTE SL, B97367486 Avda. Espioca, 100, 46460 Silla + · www.verdnatura.es · clientes@verdnatura.es +disclaimer: "- AVIS - Ce message est privé et confidentiel et doit être utilisé + exclusivement par le destinataire. Si vous avez reçu ce message par erreur, + veuillez en informer l'expéditeur et supprimer ce message ainsi que tous les + documents joints qu'il pourrait contenir. Verdnatura Levante SL ne renonce pas à la + confidentialité ni aux privilèges résultant d'une transmission erronée ou d'un dysfonctionnement. + De même, il n'est pas responsable des modifications, altérations, erreurs ou + omissions qui pourraient être apportées au message une fois envoyé." +privacy: Conformément aux dispositions de la loi organique 15/1999 sur la protection + des données personnelles, nous vous informons que les données personnelles que + vous fournissez seront incluses dans des dossiers. VERDNATURA LEVANTE S.L., vous + pouvez à tout moment, exercer les droits d'accès, de rectification, d'annulation + et d'opposition, en communiquant par écrit au siège social de la société. Le dossier + a pour objet la gestion administrative, la comptabilité et la facturation. diff --git a/print/core/components/email-footer/locale/pt.yml b/print/core/components/email-footer/locale/pt.yml new file mode 100644 index 000000000..d7267dbaf --- /dev/null +++ b/print/core/components/email-footer/locale/pt.yml @@ -0,0 +1,17 @@ +buttons: + webAcccess: Visite o nosso site + info: Ajude-nos a melhorar +fiscalAddress: VERDNATURA LEVANTE SL, B97367486 Avda. Espioca, 100, 46460 Silla + · www.verdnatura.es · clientes@verdnatura.es +disclaimer: '- AVISO - Esta mensagem é privada e confidencial e deve ser usada exclusivamente + pela pessoa que a recebe. Se você recebeu esta mensagem por engano, notifique o remetente e + exclua essa mensagem e todos os documentos anexos que ela possa conter. + A Verdnatura Levante SL não renuncia à confidencialidade ou a qualquer privilégio devido a + transmissão ou mau funcionamento incorretos. Da mesma forma, não se responsabiliza pelas alterações, + alterações, erros ou omissões que possam ser feitos na mensagem após o envio.' +privacy: Em cumprimento do disposto na lei Orgânica 15/1999, de Protecção de Dados + de Carácter Pessoal, comunicamos que os dados pessoais que facilite se incluirão + nos ficheiros automatizados de VERDNATURA LEVANTE S.L., podendo em todo momento + exercer os direitos de acesso, rectificação, cancelação e oposição, comunicando + por escrito ao domicílio social da entidade. A finalidade do ficheiro é a gestão + administrativa, contabilidade e facturação. diff --git a/print/core/components/email-header/email-header.js b/print/core/components/email-header/email-header.js index 257770cad..0f5a6845d 100755 --- a/print/core/components/email-header/email-header.js +++ b/print/core/components/email-header/email-header.js @@ -1,4 +1,3 @@ module.exports = { - name: 'email-header', - props: ['locale'] + name: 'email-header' }; diff --git a/print/core/components/report-footer/locale/en.yml b/print/core/components/report-footer/locale/en.yml new file mode 100644 index 000000000..404c7e7a4 --- /dev/null +++ b/print/core/components/report-footer/locale/en.yml @@ -0,0 +1,8 @@ +numPages: Page {{page}} of {{pages}} +law: + privacy: 'In compliance with the provisions of Organic Law 15/1999, on the + Protection of Personal Data, we inform you that the personal data you provide + will be included in automated files of VERDNATURA LEVANTE SL, being able at all + times to exercise the rights of access, rectification, cancellation and opposition, + communicating it in writing to the registered office of the entity. + The purpose of the file is administrative management, accounting, and billing.' diff --git a/print/core/components/report-footer/locale/es.yml b/print/core/components/report-footer/locale/es.yml index 8c54b796f..39dae8b58 100644 --- a/print/core/components/report-footer/locale/es.yml +++ b/print/core/components/report-footer/locale/es.yml @@ -1,7 +1,5 @@ numPages: Página {{page}} de {{pages}} law: - phytosanitary: 'VERDNATURA LEVANTE SL - Pasaporte Fitosanitario R.P. Generalitat - Valenciana - Nº Comerciante: ES17462130' privacy: En cumplimiento de lo dispuesto en la Ley Orgánica 15/1999, de Protección de Datos de Carácter Personal, le comunicamos que los datos personales que facilite se incluirán en ficheros automatizados de VERDNATURA LEVANTE S.L., pudiendo en diff --git a/print/core/components/report-footer/locale/fr.yml b/print/core/components/report-footer/locale/fr.yml index e35f9fb7f..8f2543640 100644 --- a/print/core/components/report-footer/locale/fr.yml +++ b/print/core/components/report-footer/locale/fr.yml @@ -1,7 +1,5 @@ numPages: Page {{page}} de {{pages}} law: - phytosanitary: 'VERDNATURA LEVANTE SL - Passeport Phytosanitaire R.P. Generalitat - Valenciana - Numéro d''opérateur: ES17462130' privacy: Conformément aux dispositions de la loi organique 15/1999 sur la protection des données personnelles, nous vous informons que les données personnelles que vous fournissez seront incluses dans des dossiers. VERDNATURA LEVANTE S.L., vous diff --git a/print/core/components/report-footer/locale/pt.yml b/print/core/components/report-footer/locale/pt.yml index 8494c1ed5..8b4987bb7 100644 --- a/print/core/components/report-footer/locale/pt.yml +++ b/print/core/components/report-footer/locale/pt.yml @@ -1,7 +1,5 @@ numPages: Página {{page}} de {{pages}} law: - phytosanitary: 'VERDNATURA LEVANTE S.L - Passaporte Fitossanitário R.P. Generalitat - Valenciana - Nº Comerciante: ES17462130' privacy: Em cumprimento do disposto na lei Orgânica 15/1999, de Protecção de Dados de Carácter Pessoal, comunicamos que os dados pessoais que facilite se incluirão nos ficheiros automatizados de VERDNATURA LEVANTE S.L., podendo em todo momento diff --git a/print/core/components/report-footer/report-footer.html b/print/core/components/report-footer/report-footer.html index a87c36109..4e0b7e327 100644 --- a/print/core/components/report-footer/report-footer.html +++ b/print/core/components/report-footer/report-footer.html @@ -4,6 +4,6 @@
{{centerText}}
{{$t('numPages')}}
-

{{$t('law.phytosanitary')}}

+

{{phytosanitary}}

diff --git a/print/core/components/report-footer/report-footer.js b/print/core/components/report-footer/report-footer.js index df1dca665..749170a0a 100755 --- a/print/core/components/report-footer/report-footer.js +++ b/print/core/components/report-footer/report-footer.js @@ -1,4 +1,18 @@ +const db = require('../../database'); + module.exports = { name: 'report-footer', - props: ['leftText', 'centerText', 'locale', 'showPhytosanitary'] + async serverPrefetch() { + const companyCode = this.companyCode || 'VNL'; + + this.phytosanitary = await this.getPhytosanitary(companyCode); + }, + methods: { + getPhytosanitary(code) { + return db.findValue(` + SELECT phytosanitary FROM company c + WHERE c.code = :code`, {code}); + } + }, + props: ['companyCode', 'showPhytosanitary', 'leftText', 'centerText'] }; diff --git a/print/core/components/report-header/locale/en.yml b/print/core/components/report-header/locale/en.yml new file mode 100644 index 000000000..334f50ce9 --- /dev/null +++ b/print/core/components/report-header/locale/en.yml @@ -0,0 +1,2 @@ +company: + contactData: www.verdnatura.es - clientes@verdnatura.es \ No newline at end of file diff --git a/print/core/components/report-header/locale/es.yml b/print/core/components/report-header/locale/es.yml index 51552c24c..fe4222eb0 100644 --- a/print/core/components/report-header/locale/es.yml +++ b/print/core/components/report-header/locale/es.yml @@ -1,5 +1,2 @@ company: - fiscalAddress: VERDNATURA LEVANTE S.L., B97367486 Avda. Espioca, 100, 46460 Silla - - www.verdnatura.es - clientes@verdnatura.es - registry: 'CIF: B97367486 Registro Mercantil de Valencia, Tomo 8041, Libro 5334, - Folio 160, Sección 8, Hoja V 102076' + contactData: www.verdnatura.es - clientes@verdnatura.es diff --git a/print/core/components/report-header/locale/fr.yml b/print/core/components/report-header/locale/fr.yml new file mode 100644 index 000000000..fe4222eb0 --- /dev/null +++ b/print/core/components/report-header/locale/fr.yml @@ -0,0 +1,2 @@ +company: + contactData: www.verdnatura.es - clientes@verdnatura.es diff --git a/print/core/components/report-header/locale/pt.yml b/print/core/components/report-header/locale/pt.yml index 51552c24c..4e138c69c 100644 --- a/print/core/components/report-header/locale/pt.yml +++ b/print/core/components/report-header/locale/pt.yml @@ -1,5 +1,2 @@ company: - fiscalAddress: VERDNATURA LEVANTE S.L., B97367486 Avda. Espioca, 100, 46460 Silla - - www.verdnatura.es - clientes@verdnatura.es - registry: 'CIF: B97367486 Registro Mercantil de Valencia, Tomo 8041, Libro 5334, - Folio 160, Sección 8, Hoja V 102076' + contactData: · www.verdnatura.es · clientes@verdnatura.es \ No newline at end of file diff --git a/print/core/components/report-header/report-header.html b/print/core/components/report-header/report-header.html index 6cfe65870..2667f14ed 100644 --- a/print/core/components/report-header/report-header.html +++ b/print/core/components/report-header/report-header.html @@ -1,5 +1,10 @@
Verdnatura -
{{$t('company.fiscalAddress')}}
-
{{$t('company.registry')}}
+
+ {{companyName}}. {{company.street}}. + {{company.postCode}} {{company.city}}. + ☎ {{companyPhone}} + · {{$t('company.contactData')}} +
+
CIF: {{fiscalAddress.nif}} {{fiscalAddress.register}}
diff --git a/print/core/components/report-header/report-header.js b/print/core/components/report-header/report-header.js index d86080f9e..9d501d3ba 100755 --- a/print/core/components/report-header/report-header.js +++ b/print/core/components/report-header/report-header.js @@ -1,4 +1,46 @@ +const db = require('../../database'); + module.exports = { name: 'report-header', - props: ['isPreview', 'locale'] + async serverPrefetch() { + const companyCode = this.companyCode || 'VNL'; + + this.company = await this.getCompany(companyCode); + this.fiscalAddress = await this.getFiscalAddress(companyCode); + }, + computed: { + companyName() { + if (!this.company.name) return; + + return this.company.name.toUpperCase(); + }, + companyPhone() { + if (!this.company.phone) return; + + let phone = this.company.phone; + + if (phone.length >= 13) { + const prefix = parseInt(phone.substr(0, 4)); + const number = phone.substr(5, phone.length); + return `+${prefix} ${number}`; + } else + return phone; + } + }, + methods: { + getCompany(code) { + return db.findOne(` + SELECT s.name, s.street, s.postCode, s.city, s.phone + FROM company c + JOIN supplier s ON s.id = c.id + WHERE c.code = :code`, {code}); + }, + getFiscalAddress(code) { + return db.findOne(` + SELECT nif, register FROM company c + JOIN supplier s ON s.id = c.id + WHERE c.code = :code`, {code}); + } + }, + props: ['companyCode'] }; diff --git a/print/core/database.js b/print/core/database.js index 553fe3265..a2e6e9573 100644 --- a/print/core/database.js +++ b/print/core/database.js @@ -15,15 +15,34 @@ module.exports = { * @param {String} query - The raw SQL query * @param {Object} params - Parameterized values * - * @return {Object} - Result + * @return {Object} - Result promise */ rawSql(query, params) { return this.pool.query(query, params).then(([rows]) => { return rows; }); }, + /** + * Returns the first row from a given raw sql + * @param {String} query - The raw SQL query + * @param {Object} params - Parameterized values + * + * @return {Object} - Result promise + */ findOne(query, params) { - return this.rawSql(query, params).then(([rows]) => rows); + return this.rawSql(query, params).then(([row]) => row); + }, + /** + * Returns the first property from a given raw sql + * @param {String} query - The raw SQL query + * @param {Object} params - Parameterized values + * + * @return {Object} - Result promise + */ + findValue(query, params) { + return this.findOne(query, params).then(row => { + return Object.values(row)[0]; + }); }, findFromDef() { diff --git a/print/core/mixins/user-locale.js b/print/core/mixins/user-locale.js index bb688b7bf..f8001aefc 100644 --- a/print/core/mixins/user-locale.js +++ b/print/core/mixins/user-locale.js @@ -1,5 +1,7 @@ const Vue = require('vue'); const db = require('../database'); +const config = require('../config'); +const fallbackLocale = config.i18n.fallbackLocale; const userLocale = { async serverPrefetch() { if (this.clientId) @@ -13,7 +15,9 @@ const userLocale = { return db.findOne(` SELECT lang FROM account.user WHERE id = ?`, [clientId]).then(rows => { - return rows.lang; + if (rows) + return rows.lang; + else return fallbackLocale; }); } }, diff --git a/print/templates/email/claim-pickup-order/claim-pickup-order.html b/print/templates/email/claim-pickup-order/claim-pickup-order.html index 039f5761a..b00338467 100644 --- a/print/templates/email/claim-pickup-order/claim-pickup-order.html +++ b/print/templates/email/claim-pickup-order/claim-pickup-order.html @@ -17,10 +17,7 @@
- - +
@@ -34,10 +31,7 @@
- - +
diff --git a/print/templates/email/client-welcome/client-welcome.html b/print/templates/email/client-welcome/client-welcome.html index dc5c5e572..c5f203621 100644 --- a/print/templates/email/client-welcome/client-welcome.html +++ b/print/templates/email/client-welcome/client-welcome.html @@ -17,10 +17,7 @@
- - +
@@ -80,10 +77,7 @@
- - +
diff --git a/print/templates/email/delivery-note-link/delivery-note-link.html b/print/templates/email/delivery-note-link/delivery-note-link.html index 2be79a118..28dbc7922 100644 --- a/print/templates/email/delivery-note-link/delivery-note-link.html +++ b/print/templates/email/delivery-note-link/delivery-note-link.html @@ -22,10 +22,7 @@
- - +
@@ -57,10 +54,7 @@
- - +
diff --git a/print/templates/email/delivery-note/delivery-note.html b/print/templates/email/delivery-note/delivery-note.html index dcc7f0d56..0ee59a26f 100644 --- a/print/templates/email/delivery-note/delivery-note.html +++ b/print/templates/email/delivery-note/delivery-note.html @@ -17,10 +17,7 @@
- - +
@@ -37,10 +34,7 @@
- - +
diff --git a/print/templates/email/driver-route/driver-route.html b/print/templates/email/driver-route/driver-route.html index 40635bab1..b9d0aeab5 100644 --- a/print/templates/email/driver-route/driver-route.html +++ b/print/templates/email/driver-route/driver-route.html @@ -17,10 +17,7 @@
- - +
@@ -33,10 +30,7 @@
- - +
diff --git a/print/templates/email/letter-debtor-nd/letter-debtor-nd.html b/print/templates/email/letter-debtor-nd/letter-debtor-nd.html index 5299ab5be..c7a6faebc 100644 --- a/print/templates/email/letter-debtor-nd/letter-debtor-nd.html +++ b/print/templates/email/letter-debtor-nd/letter-debtor-nd.html @@ -17,10 +17,7 @@
- - +
@@ -69,7 +66,6 @@ @@ -77,10 +73,7 @@
- - +
diff --git a/print/templates/email/letter-debtor-st/letter-debtor-st.html b/print/templates/email/letter-debtor-st/letter-debtor-st.html index 40c1b76b1..d277d363a 100644 --- a/print/templates/email/letter-debtor-st/letter-debtor-st.html +++ b/print/templates/email/letter-debtor-st/letter-debtor-st.html @@ -17,10 +17,7 @@
- - +
@@ -52,7 +49,6 @@ @@ -60,10 +56,7 @@
- - +
diff --git a/print/templates/email/payment-update/payment-update.html b/print/templates/email/payment-update/payment-update.html index 49bdc4e1b..6bba77308 100644 --- a/print/templates/email/payment-update/payment-update.html +++ b/print/templates/email/payment-update/payment-update.html @@ -17,10 +17,7 @@
- - +
@@ -54,10 +51,7 @@
- - +
diff --git a/print/templates/email/printer-setup/printer-setup.html b/print/templates/email/printer-setup/printer-setup.html index e6b66cd98..12dcf4877 100644 --- a/print/templates/email/printer-setup/printer-setup.html +++ b/print/templates/email/printer-setup/printer-setup.html @@ -17,10 +17,7 @@
- - +
@@ -77,10 +74,7 @@
- - +
diff --git a/print/templates/email/sepa-core/sepa-core.html b/print/templates/email/sepa-core/sepa-core.html index 0fc09cc9c..b71c8e10f 100644 --- a/print/templates/email/sepa-core/sepa-core.html +++ b/print/templates/email/sepa-core/sepa-core.html @@ -17,10 +17,7 @@
- - +
@@ -45,10 +42,7 @@
- - +
diff --git a/print/templates/reports/claim-pickup-order/claim-pickup-order.html b/print/templates/reports/claim-pickup-order/claim-pickup-order.html index 860d17b08..9c6b0fa4e 100644 --- a/print/templates/reports/claim-pickup-order/claim-pickup-order.html +++ b/print/templates/reports/claim-pickup-order/claim-pickup-order.html @@ -8,10 +8,7 @@
- - +
@@ -93,8 +90,7 @@ + v-bind="$props"> diff --git a/print/templates/reports/delivery-note/delivery-note.html b/print/templates/reports/delivery-note/delivery-note.html index 3908133cc..812ef0715 100644 --- a/print/templates/reports/delivery-note/delivery-note.html +++ b/print/templates/reports/delivery-note/delivery-note.html @@ -8,9 +8,8 @@
- +
@@ -238,11 +237,11 @@
+ v-bind="$props">
diff --git a/print/templates/reports/delivery-note/delivery-note.js b/print/templates/reports/delivery-note/delivery-note.js index ece7521e9..f22d7694a 100755 --- a/print/templates/reports/delivery-note/delivery-note.js +++ b/print/templates/reports/delivery-note/delivery-note.js @@ -57,8 +57,9 @@ module.exports = { `SELECT t.id, t.shipped, - t.companyFk + c.code companyCode FROM ticket t + JOIN company c ON c.id = t.companyFk WHERE t.id = ?`, [ticketId]); }, fetchAddress(ticketId) { diff --git a/print/templates/reports/delivery-note/locale/en.yml b/print/templates/reports/delivery-note/locale/en.yml new file mode 100644 index 000000000..8810a7595 --- /dev/null +++ b/print/templates/reports/delivery-note/locale/en.yml @@ -0,0 +1,26 @@ +title: Delivery note +ticketId: Delivery note +clientId: Client +deliveryAddress: Delivery address +fiscalData: Fiscal data +saleLines: Line items +date: Date +reference: Ref. +quantity: Qty. +concept: Concept +price: PSP/u +discount: Disc. +vat: VAT +amount: Amount +type: Type +taxBase: Tax base +tax: Tax +fee: Fee +total: Total +subtotal: Subtotal +taxBreakdown: Tax breakdown +packagings: Buckets and packaging +services: Services +vatType: VAT Type +digitalSignature: Digital signature +ticket: Delivery note {0} \ No newline at end of file diff --git a/print/templates/reports/delivery-note/locale/fr.yml b/print/templates/reports/delivery-note/locale/fr.yml index 98b1264b1..4dc7d4ff9 100644 --- a/print/templates/reports/delivery-note/locale/fr.yml +++ b/print/templates/reports/delivery-note/locale/fr.yml @@ -1,10 +1,10 @@ -title: Bon de livraison -ticketId: Bon de livraison -clientId: Client -deliveryAddress: Addresse de livraison +title: Albarán +ticketId: Albarán +clientId: Cliente +deliveryAddress: Dirección de entrega fiscalData: Datos fiscales saleLines: Líneas de pedido -date: Date +date: Fecha reference: Ref. quantity: Cant. concept: Concepto @@ -18,8 +18,8 @@ tax: Tasa fee: Cuota total: Total subtotal: Subtotal -taxBreakdown: Répartition de la taxe -packagings: Seaux et emballages +taxBreakdown: Desglose impositivo +packagings: Cubos y embalajes services: Servicios vatType: Tipo de IVA digitalSignature: Firma digital diff --git a/print/templates/reports/driver-route/driver-route.html b/print/templates/reports/driver-route/driver-route.html index 453c4eab5..bfeba3b8a 100644 --- a/print/templates/reports/driver-route/driver-route.html +++ b/print/templates/reports/driver-route/driver-route.html @@ -8,10 +8,7 @@
- - +
@@ -159,10 +156,9 @@
- + v-bind="$props">
diff --git a/print/templates/reports/letter-debtor/letter-debtor.html b/print/templates/reports/letter-debtor/letter-debtor.html index 23fc4daed..93e59bba1 100644 --- a/print/templates/reports/letter-debtor/letter-debtor.html +++ b/print/templates/reports/letter-debtor/letter-debtor.html @@ -8,10 +8,7 @@
- - +
@@ -91,8 +88,7 @@ + v-bind="$props"> diff --git a/print/templates/reports/receipt/receipt.html b/print/templates/reports/receipt/receipt.html index ffcc4ffb1..5538b7c3f 100644 --- a/print/templates/reports/receipt/receipt.html +++ b/print/templates/reports/receipt/receipt.html @@ -8,10 +8,7 @@
- - +
@@ -44,8 +41,7 @@ + v-bind="$props"> diff --git a/print/templates/reports/sepa-core/sepa-core.html b/print/templates/reports/sepa-core/sepa-core.html index 69bf2651b..720f70058 100644 --- a/print/templates/reports/sepa-core/sepa-core.html +++ b/print/templates/reports/sepa-core/sepa-core.html @@ -8,10 +8,7 @@
- - +
@@ -174,8 +171,7 @@ + v-bind="$props">