From b5394d3925251a50e6a20346a8aa1818a1ccf952 Mon Sep 17 00:00:00 2001
From: carlossa
Date: Mon, 13 Mar 2023 12:52:41 +0100
Subject: [PATCH] refs #084200 footer finalizado, web personalizado
---
db/changes/231001/00-newTableWeb.sql | 1 +
.../components/report-footer/locale/en.yml | 5 +-
.../components/report-footer/locale/es.yml | 4 +-
.../components/report-footer/locale/fr.yml | 4 +-
.../components/report-footer/locale/pt.yml | 4 +-
.../report-footer/report-footer.html | 11 +++--
.../components/report-footer/report-footer.js | 46 ++-----------------
.../report-header/report-header.html | 2 +-
.../components/report-header/report-header.js | 3 +-
print/templates/reports/invoice/invoice.html | 2 +-
10 files changed, 22 insertions(+), 60 deletions(-)
create mode 100644 db/changes/231001/00-newTableWeb.sql
diff --git a/db/changes/231001/00-newTableWeb.sql b/db/changes/231001/00-newTableWeb.sql
new file mode 100644
index 000000000..305ebec8b
--- /dev/null
+++ b/db/changes/231001/00-newTableWeb.sql
@@ -0,0 +1 @@
+ALTER TABLE vn.company ADD web varchar(100) NULL;
\ No newline at end of file
diff --git a/print/core/components/report-footer/locale/en.yml b/print/core/components/report-footer/locale/en.yml
index 66f361234..df871913e 100644
--- a/print/core/components/report-footer/locale/en.yml
+++ b/print/core/components/report-footer/locale/en.yml
@@ -1,10 +1,9 @@
numPages: Page of
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:
diff --git a/print/core/components/report-footer/locale/es.yml b/print/core/components/report-footer/locale/es.yml
index 4fce40b0a..5b72fe78b 100644
--- a/print/core/components/report-footer/locale/es.yml
+++ b/print/core/components/report-footer/locale/es.yml
@@ -1,9 +1,9 @@
numPages: Página de
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.
\ No newline at end of file
+ ornprivacy:
\ No newline at end of file
diff --git a/print/core/components/report-footer/locale/fr.yml b/print/core/components/report-footer/locale/fr.yml
index d7347a813..a4174105f 100644
--- a/print/core/components/report-footer/locale/fr.yml
+++ b/print/core/components/report-footer/locale/fr.yml
@@ -1,9 +1,9 @@
numPages: Page de
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.
\ No newline at end of file
+ ornprivacy:
\ No newline at end of file
diff --git a/print/core/components/report-footer/locale/pt.yml b/print/core/components/report-footer/locale/pt.yml
index f0d5ec48a..e9f6e516f 100644
--- a/print/core/components/report-footer/locale/pt.yml
+++ b/print/core/components/report-footer/locale/pt.yml
@@ -1,9 +1,9 @@
numPages: Página de
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.
\ No newline at end of file
+ ornprivacy:
\ No newline at end of file
diff --git a/print/core/components/report-footer/report-footer.html b/print/core/components/report-footer/report-footer.html
index 6461529a9..447091f9b 100644
--- a/print/core/components/report-footer/report-footer.html
+++ b/print/core/components/report-footer/report-footer.html
@@ -5,10 +5,11 @@
{{centerText}}
-
+
+
+
diff --git a/print/core/components/report-footer/report-footer.js b/print/core/components/report-footer/report-footer.js
index c4ae68d7e..4debfce12 100755
--- a/print/core/components/report-footer/report-footer.js
+++ b/print/core/components/report-footer/report-footer.js
@@ -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']
+
};
diff --git a/print/core/components/report-header/report-header.html b/print/core/components/report-header/report-header.html
index 8a3857521..22f2068e2 100644
--- a/print/core/components/report-header/report-header.html
+++ b/print/core/components/report-header/report-header.html
@@ -8,7 +8,7 @@
{{companyName}}. {{company.street}}.
{{company.postCode}} {{company.city}}.
☎ {{companyPhone}}
- · verdnatura.es - {{company.email}}
+ · {{company.web}} - {{company.email}}
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 376495968..d85e2c836 100755
--- a/print/core/components/report-header/report-header.js
+++ b/print/core/components/report-header/report-header.js
@@ -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
diff --git a/print/templates/reports/invoice/invoice.html b/print/templates/reports/invoice/invoice.html
index 4056e9ad4..4a8257c1d 100644
--- a/print/templates/reports/invoice/invoice.html
+++ b/print/templates/reports/invoice/invoice.html
@@ -3,7 +3,7 @@
-