dynamic header & footer texts by company #1336

This commit is contained in:
Joan Sanchez 2019-11-21 09:33:08 +01:00
parent 37618efb58
commit 5f28d39bbf
41 changed files with 246 additions and 188 deletions

View File

@ -31,7 +31,7 @@ INSERT INTO `hedera`.`tpvConfig`(`id`, `currency`, `terminal`, `transactionType`
INSERT INTO `account`.`user`(`id`,`name`,`password`,`role`,`active`,`email`,`lang`) INSERT INTO `account`.`user`(`id`,`name`,`password`,`role`,`active`,`email`,`lang`)
VALUES VALUES
(101, 'BruceWayne', 'ac754a330530832ba1bf7687f577da91', 2, 1, 'BruceWayne@mydomain.com', 'es'), (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'), (103, 'ClarkKent', 'ac754a330530832ba1bf7687f577da91', 2, 1, 'ClarkKent@mydomain.com', 'fr'),
(104, 'TonyStark', 'ac754a330530832ba1bf7687f577da91', 2, 1, 'TonyStark@mydomain.com', 'es'), (104, 'TonyStark', 'ac754a330530832ba1bf7687f577da91', 2, 1, 'TonyStark@mydomain.com', 'es'),
(105, 'MaxEisenhardt', 'ac754a330530832ba1bf7687f577da91', 2, 1, 'MaxEisenhardt@mydomain.com', 'pt'), (105, 'MaxEisenhardt', 'ac754a330530832ba1bf7687f577da91', 2, 1, 'MaxEisenhardt@mydomain.com', 'pt'),

View File

@ -39,9 +39,9 @@
<!-- Privacy block --> <!-- Privacy block -->
<div class="privacy"> <div class="privacy">
<p>{{$t('privacy.fiscalAddress')}}</p> <p>{{$t('fiscalAddress')}}</p>
<p>{{$t('privacy.disclaimer')}}</p> <p>{{$t('disclaimer')}}</p>
<p>{{$t('privacy.law')}}</p> <p>{{$t('privacy')}}</p>
</div> </div>
<!-- Privacy block end --> <!-- Privacy block end -->
</footer> </footer>

View File

@ -1,4 +1,3 @@
module.exports = { module.exports = {
name: 'email-footer', name: 'email-footer'
props: ['isPreview', 'locale']
}; };

View File

@ -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.'

View File

@ -1,19 +1,18 @@
buttons: buttons:
webAcccess: Visita nuestra Web webAcccess: Visita nuestra Web
info: Ayúdanos a mejorar info: Ayúdanos a mejorar
privacy: fiscalAddress: VERDNATURA LEVANTE SL, B97367486 Avda. Espioca, 100, 46460 Silla
fiscalAddress: VERDNATURA LEVANTE SL, B97367486 Avda. Espioca, 100, 46460 Silla · www.verdnatura.es · clientes@verdnatura.es
· www.verdnatura.es · clientes@verdnatura.es disclaimer: '- AVISO - Este mensaje es privado y confidencial, y debe ser utilizado
disclaimer: '- AVISO - Este mensaje es privado y confidencial, y debe ser utilizado exclusivamente por la persona destinataria del mismo. Si has recibido este mensaje
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
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
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
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,
funcionamiento. Igualmente no se hace responsable de los cambios, alteraciones, errores u omisiones que pudieran hacerse al mensaje una vez enviado.'
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
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
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
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,
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
comunicándolo por escrito al domicilio social de la entidad. La finalidad del fichero es la gestión administrativa, contabilidad, y facturación.
fichero es la gestión administrativa, contabilidad, y facturación.

View File

@ -1,19 +1,18 @@
buttons: buttons:
webAcccess: Visitez notre site web webAcccess: Visitez notre site web
info: Aidez-nous à améliorer info: Aidez-nous à améliorer
privacy: fiscalAddress: VERDNATURA LEVANTE SL, B97367486 Avda. Espioca, 100, 46460 Silla
fiscalAddress: VERDNATURA LEVANTE SL, B97367486 Avda. Espioca, 100, 46460 Silla · www.verdnatura.es · clientes@verdnatura.es
· www.verdnatura.es · clientes@verdnatura.es disclaimer: "- AVIS - Ce message est privé et confidentiel et doit être utilisé
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,
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
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
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.
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
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é."
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
law: En cumplimiento de lo dispuesto en la Ley Orgánica 15/1999, de Protección de des données personnelles, nous vous informons que les données personnelles que
Datos de Carácter Personal, te comunicamos que los datos personales que facilites vous fournissez seront incluses dans des dossiers. VERDNATURA LEVANTE S.L., vous
se incluirán en ficheros automatizados de VERDNATURA LEVANTE S.L.,pudiendo en pouvez à tout moment, exercer les droits d'accès, de rectification, d'annulation
todo momento ejercitar los derechos de acceso, rectificación, cancelación y oposición, et d'opposition, en communiquant par écrit au siège social de la société. Le dossier
comunicándolo porescrito al domicilio social de la entidad. La finalidad del fichero a pour objet la gestion administrative, la comptabilité et la facturation.
es la gestión administrativa, contabilidad, y facturación.

View File

@ -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.

View File

@ -1,4 +1,3 @@
module.exports = { module.exports = {
name: 'email-header', name: 'email-header'
props: ['locale']
}; };

View File

@ -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.'

View File

@ -1,7 +1,5 @@
numPages: Página {{page}} de {{pages}} numPages: Página {{page}} de {{pages}}
law: 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 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 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 se incluirán en ficheros automatizados de VERDNATURA LEVANTE S.L., pudiendo en

View File

@ -1,7 +1,5 @@
numPages: Page {{page}} de {{pages}} numPages: Page {{page}} de {{pages}}
law: 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 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 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 vous fournissez seront incluses dans des dossiers. VERDNATURA LEVANTE S.L., vous

View File

@ -1,7 +1,5 @@
numPages: Página {{page}} de {{pages}} numPages: Página {{page}} de {{pages}}
law: 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 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 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 nos ficheiros automatizados de VERDNATURA LEVANTE S.L., podendo em todo momento

View File

@ -4,6 +4,6 @@
<section v-if="centerText" class="uppercase">{{centerText}}</section> <section v-if="centerText" class="uppercase">{{centerText}}</section>
<section class="number">{{$t('numPages')}}</section> <section class="number">{{$t('numPages')}}</section>
</section> </section>
<p class="phytosanitary" v-if="showPhytosanitary">{{$t('law.phytosanitary')}}</p> <p class="phytosanitary" v-if="showPhytosanitary">{{phytosanitary}}</p>
<p class="privacy" v-html="$t('law.privacy')"></p> <p class="privacy" v-html="$t('law.privacy')"></p>
</footer> </footer>

View File

@ -1,4 +1,18 @@
const db = require('../../database');
module.exports = { module.exports = {
name: 'report-footer', 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']
}; };

View File

@ -0,0 +1,2 @@
company:
contactData: www.verdnatura.es - clientes@verdnatura.es

View File

@ -1,5 +1,2 @@
company: company:
fiscalAddress: VERDNATURA LEVANTE S.L., B97367486 Avda. Espioca, 100, 46460 Silla contactData: www.verdnatura.es - clientes@verdnatura.es
- 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'

View File

@ -0,0 +1,2 @@
company:
contactData: www.verdnatura.es - clientes@verdnatura.es

View File

@ -1,5 +1,2 @@
company: company:
fiscalAddress: VERDNATURA LEVANTE S.L., B97367486 Avda. Espioca, 100, 46460 Silla contactData: · www.verdnatura.es · clientes@verdnatura.es
- 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'

View File

@ -1,5 +1,10 @@
<header> <header>
<img v-bind:src="getReportSrc('report-logo.svg')" alt="Verdnatura"/> <img v-bind:src="getReportSrc('report-logo.svg')" alt="Verdnatura"/>
<section>{{$t('company.fiscalAddress')}}</section> <section>
<section>{{$t('company.registry')}}</section> {{companyName}}. {{company.street}}.
{{company.postCode}} {{company.city}}.
&#9742; {{companyPhone}}
· {{$t('company.contactData')}}
</section>
<section>CIF: {{fiscalAddress.nif}} {{fiscalAddress.register}}</section>
</header> </header>

View File

@ -1,4 +1,46 @@
const db = require('../../database');
module.exports = { module.exports = {
name: 'report-header', 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']
}; };

View File

@ -15,15 +15,34 @@ module.exports = {
* @param {String} query - The raw SQL query * @param {String} query - The raw SQL query
* @param {Object} params - Parameterized values * @param {Object} params - Parameterized values
* *
* @return {Object} - Result * @return {Object} - Result promise
*/ */
rawSql(query, params) { rawSql(query, params) {
return this.pool.query(query, params).then(([rows]) => { return this.pool.query(query, params).then(([rows]) => {
return 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) { 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() { findFromDef() {

View File

@ -1,5 +1,7 @@
const Vue = require('vue'); const Vue = require('vue');
const db = require('../database'); const db = require('../database');
const config = require('../config');
const fallbackLocale = config.i18n.fallbackLocale;
const userLocale = { const userLocale = {
async serverPrefetch() { async serverPrefetch() {
if (this.clientId) if (this.clientId)
@ -13,7 +15,9 @@ const userLocale = {
return db.findOne(` return db.findOne(`
SELECT lang FROM account.user SELECT lang FROM account.user
WHERE id = ?`, [clientId]).then(rows => { WHERE id = ?`, [clientId]).then(rows => {
return rows.lang; if (rows)
return rows.lang;
else return fallbackLocale;
}); });
} }
}, },

View File

@ -17,10 +17,7 @@
<!-- Header block --> <!-- Header block -->
<div class="grid-row"> <div class="grid-row">
<div class="grid-block"> <div class="grid-block">
<email-header <email-header v-bind="$props"></email-header>
v-bind:is-preview="isPreview"
v-bind:locale="locale">
</email-header>
</div> </div>
</div> </div>
<!-- Block --> <!-- Block -->
@ -34,10 +31,7 @@
<!-- Footer block --> <!-- Footer block -->
<div class="grid-row"> <div class="grid-row">
<div class="grid-block"> <div class="grid-block">
<email-footer <email-footer v-bind="$props"></email-footer>
v-bind:is-preview="isPreview"
v-bind:locale="locale">
</email-footer>
</div> </div>
</div> </div>
<!-- Empty block --> <!-- Empty block -->

View File

@ -17,10 +17,7 @@
<!-- Header block --> <!-- Header block -->
<div class="grid-row"> <div class="grid-row">
<div class="grid-block"> <div class="grid-block">
<email-header <email-header v-bind="$props"></email-header>
v-bind:is-preview="isPreview"
v-bind:locale="locale">
</email-header>
</div> </div>
</div> </div>
<!-- Block --> <!-- Block -->
@ -80,10 +77,7 @@
<!-- Footer block --> <!-- Footer block -->
<div class="grid-row"> <div class="grid-row">
<div class="grid-block"> <div class="grid-block">
<email-footer <email-footer v-bind="$props"></email-footer>
v-bind:is-preview="isPreview"
v-bind:locale="locale">
</email-footer>
</div> </div>
</div> </div>
<!-- Empty block --> <!-- Empty block -->

View File

@ -22,10 +22,7 @@
<!-- Header block --> <!-- Header block -->
<div class="grid-row"> <div class="grid-row">
<div class="grid-block"> <div class="grid-block">
<email-header <email-header v-bind="$props"></email-header>
v-bind:is-preview="isPreview"
v-bind:locale="locale">
</email-header>
</div> </div>
</div> </div>
<!-- Block --> <!-- Block -->
@ -57,10 +54,7 @@
<!-- Footer block --> <!-- Footer block -->
<div class="grid-row"> <div class="grid-row">
<div class="grid-block"> <div class="grid-block">
<email-footer <email-footer v-bind="$props"></email-footer>
v-bind:is-preview="isPreview"
v-bind:locale="locale">
</email-footer>
</div> </div>
</div> </div>
<!-- Empty block --> <!-- Empty block -->

View File

@ -17,10 +17,7 @@
<!-- Header block --> <!-- Header block -->
<div class="grid-row"> <div class="grid-row">
<div class="grid-block"> <div class="grid-block">
<email-header <email-header v-bind="$props"></email-header>
v-bind:is-preview="isPreview"
v-bind:locale="locale">
</email-header>
</div> </div>
</div> </div>
<!-- Block --> <!-- Block -->
@ -37,10 +34,7 @@
<!-- Footer block --> <!-- Footer block -->
<div class="grid-row"> <div class="grid-row">
<div class="grid-block"> <div class="grid-block">
<email-footer <email-footer v-bind="$props"></email-footer>
v-bind:is-preview="isPreview"
v-bind:locale="locale">
</email-footer>
</div> </div>
</div> </div>
<!-- Empty block --> <!-- Empty block -->

View File

@ -17,10 +17,7 @@
<!-- Header block --> <!-- Header block -->
<div class="grid-row"> <div class="grid-row">
<div class="grid-block"> <div class="grid-block">
<email-header <email-header v-bind="$props"></email-header>
v-bind:is-preview="isPreview"
v-bind:locale="locale">
</email-header>
</div> </div>
</div> </div>
<!-- Block --> <!-- Block -->
@ -33,10 +30,7 @@
<!-- Footer block --> <!-- Footer block -->
<div class="grid-row"> <div class="grid-row">
<div class="grid-block"> <div class="grid-block">
<email-footer <email-footer v-bind="$props"></email-footer>
v-bind:is-preview="isPreview"
v-bind:locale="locale">
</email-footer>
</div> </div>
</div> </div>
<!-- Empty block --> <!-- Empty block -->

View File

@ -17,10 +17,7 @@
<!-- Header block --> <!-- Header block -->
<div class="grid-row"> <div class="grid-row">
<div class="grid-block"> <div class="grid-block">
<email-header <email-header v-bind="$props"></email-header>
v-bind:is-preview="isPreview"
v-bind:locale="locale">
</email-header>
</div> </div>
</div> </div>
<!-- Block --> <!-- Block -->
@ -69,7 +66,6 @@
<attachment v-for="attachment in attachments" <attachment v-for="attachment in attachments"
v-bind:key="attachment.filename" v-bind:key="attachment.filename"
v-bind:attachment="attachment" v-bind:attachment="attachment"
v-bind:is-preview="isPreview"
v-bind:args="$props"> v-bind:args="$props">
</attachment> </attachment>
</div> </div>
@ -77,10 +73,7 @@
<!-- Footer block --> <!-- Footer block -->
<div class="grid-row"> <div class="grid-row">
<div class="grid-block"> <div class="grid-block">
<email-footer <email-footer v-bind="$props"></email-footer>
v-bind:is-preview="isPreview"
v-bind:locale="locale">
</email-footer>
</div> </div>
</div> </div>
<!-- Empty block --> <!-- Empty block -->

View File

@ -17,10 +17,7 @@
<!-- Header block --> <!-- Header block -->
<div class="grid-row"> <div class="grid-row">
<div class="grid-block"> <div class="grid-block">
<email-header <email-header v-bind="$props"></email-header>
v-bind:is-preview="isPreview"
v-bind:locale="locale">
</email-header>
</div> </div>
</div> </div>
<!-- Block --> <!-- Block -->
@ -52,7 +49,6 @@
<attachment v-for="attachment in attachments" <attachment v-for="attachment in attachments"
v-bind:key="attachment.filename" v-bind:key="attachment.filename"
v-bind:attachment="attachment" v-bind:attachment="attachment"
v-bind:is-preview="isPreview"
v-bind:args="$props"> v-bind:args="$props">
</attachment> </attachment>
</div> </div>
@ -60,10 +56,7 @@
<!-- Footer block --> <!-- Footer block -->
<div class="grid-row"> <div class="grid-row">
<div class="grid-block"> <div class="grid-block">
<email-footer <email-footer v-bind="$props"></email-footer>
v-bind:is-preview="isPreview"
v-bind:locale="locale">
</email-footer>
</div> </div>
</div> </div>
<!-- Empty block --> <!-- Empty block -->

View File

@ -17,10 +17,7 @@
<!-- Header block --> <!-- Header block -->
<div class="grid-row"> <div class="grid-row">
<div class="grid-block"> <div class="grid-block">
<email-header <email-header v-bind="$props"></email-header>
v-bind:is-preview="isPreview"
v-bind:locale="locale">
</email-header>
</div> </div>
</div> </div>
<!-- Block --> <!-- Block -->
@ -54,10 +51,7 @@
<!-- Footer block --> <!-- Footer block -->
<div class="grid-row"> <div class="grid-row">
<div class="grid-block"> <div class="grid-block">
<email-footer <email-footer v-bind="$props"></email-footer>
v-bind:is-preview="isPreview"
v-bind:locale="locale">
</email-footer>
</div> </div>
</div> </div>
<!-- Empty block --> <!-- Empty block -->

View File

@ -17,10 +17,7 @@
<!-- Header block --> <!-- Header block -->
<div class="grid-row"> <div class="grid-row">
<div class="grid-block"> <div class="grid-block">
<email-header <email-header v-bind="$props"></email-header>
v-bind:is-preview="isPreview"
v-bind:locale="locale">
</email-header>
</div> </div>
</div> </div>
<!-- Block --> <!-- Block -->
@ -77,10 +74,7 @@
<!-- Footer block --> <!-- Footer block -->
<div class="grid-row"> <div class="grid-row">
<div class="grid-block"> <div class="grid-block">
<email-footer <email-footer v-bind="$props"></email-footer>
v-bind:is-preview="isPreview"
v-bind:locale="locale">
</email-footer>
</div> </div>
</div> </div>
<!-- Empty block --> <!-- Empty block -->

View File

@ -17,10 +17,7 @@
<!-- Header block --> <!-- Header block -->
<div class="grid-row"> <div class="grid-row">
<div class="grid-block"> <div class="grid-block">
<email-header <email-header v-bind="$props"></email-header>
v-bind:is-preview="isPreview"
v-bind:locale="locale">
</email-header>
</div> </div>
</div> </div>
<!-- Block --> <!-- Block -->
@ -45,10 +42,7 @@
<!-- Footer block --> <!-- Footer block -->
<div class="grid-row"> <div class="grid-row">
<div class="grid-block"> <div class="grid-block">
<email-footer <email-footer v-bind="$props"></email-footer>
v-bind:is-preview="isPreview"
v-bind:locale="locale">
</email-footer>
</div> </div>
</div> </div>
<!-- Empty block --> <!-- Empty block -->

View File

@ -8,10 +8,7 @@
<!-- Header block --> <!-- Header block -->
<div class="grid-row"> <div class="grid-row">
<div class="grid-block"> <div class="grid-block">
<report-header <report-header v-bind="$props"></report-header>
v-bind:is-preview="isPreview"
v-bind:locale="locale">
</report-header>
</div> </div>
</div> </div>
<!-- Block --> <!-- Block -->
@ -93,8 +90,7 @@
<report-footer id="pageFooter" <report-footer id="pageFooter"
v-bind:left-text="$t('claim', [claimId])" v-bind:left-text="$t('claim', [claimId])"
v-bind:center-text="client.name" v-bind:center-text="client.name"
v-bind:is-preview="isPreview" v-bind="$props">
v-bind:locale="locale">
</report-footer> </report-footer>
</div> </div>
</div> </div>

View File

@ -8,9 +8,8 @@
<!-- Header block --> <!-- Header block -->
<div class="grid-row"> <div class="grid-row">
<div class="grid-block"> <div class="grid-block">
<report-header <report-header v-bind="$props"
v-bind:is-preview="isPreview" v-bind:company-code="ticket.companyCode">
v-bind:locale="locale">
</report-header> </report-header>
</div> </div>
</div> </div>
@ -238,11 +237,11 @@
<div class="grid-row"> <div class="grid-row">
<div class="grid-block"> <div class="grid-block">
<report-footer id="pageFooter" <report-footer id="pageFooter"
v-bind:company-code="ticket.companyCode"
v-bind:show-phytosanitary="true" v-bind:show-phytosanitary="true"
v-bind:left-text="$t('ticket', [ticket.id])" v-bind:left-text="$t('ticket', [ticket.id])"
v-bind:center-text="client.socialName" v-bind:center-text="client.socialName"
v-bind:is-preview="isPreview" v-bind="$props">
v-bind:locale="locale">
</report-footer> </report-footer>
</div> </div>
</div> </div>

View File

@ -57,8 +57,9 @@ module.exports = {
`SELECT `SELECT
t.id, t.id,
t.shipped, t.shipped,
t.companyFk c.code companyCode
FROM ticket t FROM ticket t
JOIN company c ON c.id = t.companyFk
WHERE t.id = ?`, [ticketId]); WHERE t.id = ?`, [ticketId]);
}, },
fetchAddress(ticketId) { fetchAddress(ticketId) {

View File

@ -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}

View File

@ -1,10 +1,10 @@
title: Bon de livraison title: Albarán
ticketId: Bon de livraison ticketId: Albarán
clientId: Client clientId: Cliente
deliveryAddress: Addresse de livraison deliveryAddress: Dirección de entrega
fiscalData: Datos fiscales fiscalData: Datos fiscales
saleLines: Líneas de pedido saleLines: Líneas de pedido
date: Date date: Fecha
reference: Ref. reference: Ref.
quantity: Cant. quantity: Cant.
concept: Concepto concept: Concepto
@ -18,8 +18,8 @@ tax: Tasa
fee: Cuota fee: Cuota
total: Total total: Total
subtotal: Subtotal subtotal: Subtotal
taxBreakdown: Répartition de la taxe taxBreakdown: Desglose impositivo
packagings: Seaux et emballages packagings: Cubos y embalajes
services: Servicios services: Servicios
vatType: Tipo de IVA vatType: Tipo de IVA
digitalSignature: Firma digital digitalSignature: Firma digital

View File

@ -8,10 +8,7 @@
<!-- Header block --> <!-- Header block -->
<div class="grid-row"> <div class="grid-row">
<div class="grid-block"> <div class="grid-block">
<report-header <report-header v-bind="$props"></report-header>
v-bind:is-preview="isPreview"
v-bind:locale="locale">
</report-header>
</div> </div>
</div> </div>
<!-- Block --> <!-- Block -->
@ -159,10 +156,9 @@
<!-- Footer block --> <!-- Footer block -->
<div class="grid-row"> <div class="grid-row">
<div class="grid-block"> <div class="grid-block">
<report-footer id="pageFooter" <report-footer id="pageFooter"
v-bind:left-text="$t('routeId', [route.id])" v-bind:left-text="$t('routeId', [route.id])"
v-bind:is-preview="isPreview" v-bind="$props">
v-bind:locale="locale">
</report-footer> </report-footer>
</div> </div>
</div> </div>

View File

@ -8,10 +8,7 @@
<!-- Header block --> <!-- Header block -->
<div class="grid-row"> <div class="grid-row">
<div class="grid-block"> <div class="grid-block">
<report-header <report-header v-bind="$props"></report-header>
v-bind:is-preview="isPreview"
v-bind:locale="locale">
</report-header>
</div> </div>
</div> </div>
<!-- Block --> <!-- Block -->
@ -91,8 +88,7 @@
<report-footer id="pageFooter" <report-footer id="pageFooter"
v-bind:left-text="$t('client', [client.id])" v-bind:left-text="$t('client', [client.id])"
v-bind:center-text="client.socialName" v-bind:center-text="client.socialName"
v-bind:is-preview="isPreview" v-bind="$props">
v-bind:locale="locale">
</report-footer> </report-footer>
</div> </div>
</div> </div>

View File

@ -8,10 +8,7 @@
<!-- Header block --> <!-- Header block -->
<div class="grid-row"> <div class="grid-row">
<div class="grid-block"> <div class="grid-block">
<report-header <report-header v-bind="$props"></report-header>
v-bind:is-preview="isPreview"
v-bind:locale="locale">
</report-header>
</div> </div>
</div> </div>
<!-- Block --> <!-- Block -->
@ -44,8 +41,7 @@
<report-footer id="pageFooter" <report-footer id="pageFooter"
v-bind:left-text="$t('client', [client.id])" v-bind:left-text="$t('client', [client.id])"
v-bind:center-text="client.socialName" v-bind:center-text="client.socialName"
v-bind:is-preview="isPreview" v-bind="$props">
v-bind:locale="locale">
</report-footer> </report-footer>
</div> </div>
</div> </div>

View File

@ -8,10 +8,7 @@
<!-- Header block --> <!-- Header block -->
<div class="grid-row"> <div class="grid-row">
<div class="grid-block"> <div class="grid-block">
<report-header <report-header v-bind="$props"></report-header>
v-bind:is-preview="isPreview"
v-bind:locale="locale">
</report-header>
</div> </div>
</div> </div>
<!-- Block --> <!-- Block -->
@ -174,8 +171,7 @@
<report-footer id="pageFooter" <report-footer id="pageFooter"
v-bind:left-text="$t('order', [supplier.mandateCode])" v-bind:left-text="$t('order', [supplier.mandateCode])"
v-bind:center-text="client.socialName" v-bind:center-text="client.socialName"
v-bind:is-preview="isPreview" v-bind="$props">
v-bind:locale="locale">
</report-footer> </report-footer>
</div> </div>
</div> </div>