231801_test_to_master #1519

Merged
alexm merged 490 commits from 231801_test_to_master into master 2023-05-12 06:29:59 +00:00
10 changed files with 22 additions and 60 deletions
Showing only changes of commit b5394d3925 - Show all commits

View File

@ -0,0 +1 @@
ALTER TABLE vn.company ADD web varchar(100) NULL;

View File

@ -1,10 +1,9 @@
numPages: Page <span class="pageNumber"></span> of <span class="totalPages"></span>
law:
vnPrivacy: In compliance with the provisions of Organic Law 15/1999, on the
vnprivacy: 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.
ornPrivacy: Texto de ejemplo.
ornprivacy:

View File

@ -1,9 +1,9 @@
numPages: Página <span class="pageNumber"></span> de <span class="totalPages"></span>
law:
vnPrivacy: En cumplimiento de lo dispuesto en la Ley Orgánica 15/1999, de Protección
vnprivacy: 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
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.
ornPrivacy: Texto de ejemplo.
ornprivacy:

View File

@ -1,9 +1,9 @@
numPages: Page <span class="pageNumber"></span> de <span class="totalPages"></span>
law:
vnPrivacy: Conformément aux dispositions de la loi organique 15/1999 sur la protection
vnprivacy: 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.
ornPrivacy: Texto de ejemplo.
ornprivacy:

View File

@ -1,9 +1,9 @@
numPages: Página <span class="pageNumber"></span> de <span class="totalPages"></span>
law:
vnPrivacy: Em cumprimento do disposto na lei Orgânica 15/1999, de Protecção de Dados
vnprivacy: 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.
ornPrivacy: Texto de ejemplo.
ornprivacy:

View File

@ -5,10 +5,11 @@
<div class="centerText" v-if="centerText" class="uppercase">{{centerText}}</div>
<div class="pageCount" v-html="$t('numPages')"></div>
</div>
<p
v-if="companyCode == '{{company.code}}'"
v-html="$t(`law.${company.footnotes}`)"
class="privacy"
/></p>
<p
v-if="company.footnotes"
class="privacy"
v-html="$t(`law.${company.footnotes}`)">
</p>
</div>
</div>

View File

@ -3,60 +3,20 @@ const db = require('../../database');
module.exports = {
name: 'report-footer',
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 this.company.name.toUpperCase();
return;
},
companyGroup() {
if (this.company.groupName)
return this.company.groupName.toLowerCase();
return;
},
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;
}
this.company = await this.getCompany(this.companyCode);
},
methods: {
getCompany(code) {
return db.findOne(`
SELECT
s.name,
s.street,
s.postCode,
s.city,
s.phone,
c.footnotes,
c.code,
cg.code AS groupName
c.code
FROM company c
JOIN companyGroup cg ON cg.id = c.companyGroupFk
JOIN supplier s ON s.id = c.id
WHERE c.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]);
}
},
props: ['leftText', 'companyCode', 'centerText']
};

View File

@ -8,7 +8,7 @@
{{companyName}}. {{company.street}}.
{{company.postCode}} {{company.city}}.
&#9742; {{companyPhone}}
· <span v-if="companyGroup == 'verdnatura'" >verdnatura.es -</span> {{company.email}}
· {{company.web}} - {{company.email}}
</section>
<section>CIF: {{fiscalAddress.nif}} {{fiscalAddress.register}}</section>
</header>

View File

@ -44,7 +44,8 @@ module.exports = {
s.city,
s.phone,
cg.code AS groupName,
c.email
c.email,
c.web
FROM company c
JOIN companyGroup cg ON cg.id = c.companyGroupFk
JOIN supplier s ON s.id = c.id

View File

@ -3,7 +3,7 @@
<template v-slot:header>
<report-header v-bind="$props" v-bind:company-code="invoice.companyCode"></report-header>
</template>
<div class="grid-row">
<div class="grid-row">
<div class="grid-block">
<div class="columns vn-mb-lg">
<div class="size50">