From b1c8f51e353d9f3da26a6c0c74934f165287ef63 Mon Sep 17 00:00:00 2001 From: carlossa Date: Thu, 9 Mar 2023 13:41:05 +0100 Subject: [PATCH 01/17] refs: #084200 mod del footer y readapatacion heade --- db/dump/fixtures.sql | 3 +- .../report-footer/assets/css/style.css | 1 + .../report-footer/report-footer.html | 6 +- .../components/report-footer/report-footer.js | 58 ++++++++++++++++++- .../report-header/report-header.html | 2 +- .../components/report-header/report-header.js | 3 +- print/templates/reports/invoice/invoice.html | 2 +- print/templates/reports/invoice/invoice.js | 7 ++- .../templates/reports/invoice/sql/invoice.sql | 2 +- 9 files changed, 76 insertions(+), 8 deletions(-) diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index 80983a318..2f1c7a806 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -543,7 +543,8 @@ INSERT INTO `vn`.`supplier`(`id`, `name`, `nickname`,`account`,`countryFk`,`nif` VALUES (1, 'Plants SL', 'Plants nick', 4100000001, 1, '06089160W', 0, util.VN_CURDATE(), 1, 'supplier address 1', 'PONTEVEDRA', 1, 15214, 1, 1, 15, 4, 1, 1, 18, 'flowerPlants', 1, '400664487V'), (2, 'Farmer King', 'The farmer', 4000020002, 1, '87945234L', 0, util.VN_CURDATE(), 1, 'supplier address 2', 'GOTHAM', 2, 43022, 1, 2, 10, 93, 2, 8, 18, 'animals', 1, '400664487V'), - (442, 'Verdnatura Levante SL', 'Verdnatura', 5115000442, 1, '06815934E', 0, util.VN_CURDATE(), 1, 'supplier address 3', 'GOTHAM', 1, 43022, 1, 2, 15, 6, 9, 3, 18, 'complements', 1, '400664487V'); + (442, 'Verdnatura Levante SL', 'Verdnatura', 5115000442, 1, '06815934E', 0, util.VN_CURDATE(), 1, 'supplier address 3', 'GOTHAM', 1, 43022, 1, 2, 15, 6, 9, 3, 18, 'complements', 1, '400664487V'), + (1381, 'Ornamentales', 'Ornamentales', 7185000440, 1, '03815934E', 0, util.VN_CURDATE(), 1, 'supplier address 4', 'GOTHAM', 1, 43022, 1, 2, 15, 6, 9, 3, 18, 'complements', 1, '400664487V'); INSERT INTO `vn`.`supplierContact`(`id`, `supplierFk`, `phone`, `mobile`, `email`, `observation`, `name`) VALUES diff --git a/print/core/components/report-footer/assets/css/style.css b/print/core/components/report-footer/assets/css/style.css index 9727e6f8f..b260c1b9f 100644 --- a/print/core/components/report-footer/assets/css/style.css +++ b/print/core/components/report-footer/assets/css/style.css @@ -4,6 +4,7 @@ margin-right: 2cm; font-size: 10px; color: #555; + width: 100%; zoom: 0.65 } diff --git a/print/core/components/report-footer/report-footer.html b/print/core/components/report-footer/report-footer.html index 1af8df4d4..d71f04ed2 100644 --- a/print/core/components/report-footer/report-footer.html +++ b/print/core/components/report-footer/report-footer.html @@ -5,6 +5,10 @@
{{centerText}}
-

+

diff --git a/print/core/components/report-footer/report-footer.js b/print/core/components/report-footer/report-footer.js index 1ba36b1d7..da1272673 100755 --- a/print/core/components/report-footer/report-footer.js +++ b/print/core/components/report-footer/report-footer.js @@ -1,4 +1,60 @@ +const db = require('../../database'); + module.exports = { name: 'report-footer', - props: ['leftText', 'centerText'] + 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; + } + }, + methods: { + getCompany(code) { + return db.findOne(` + SELECT + s.name, + s.street, + s.postCode, + s.city, + s.phone, + cg.code AS groupName + 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 0479e5caf..8a3857521 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}} - · {{$t('company.contactData')}} + · verdnatura.es - {{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 50c3a1337..376495968 100755 --- a/print/core/components/report-header/report-header.js +++ b/print/core/components/report-header/report-header.js @@ -43,7 +43,8 @@ module.exports = { s.postCode, s.city, s.phone, - cg.code AS groupName + cg.code AS groupName, + c.email 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 2d180878a..4056e9ad4 100644 --- a/print/templates/reports/invoice/invoice.html +++ b/print/templates/reports/invoice/invoice.html @@ -240,7 +240,7 @@ -
+
{{$t('observations')}}
diff --git a/print/templates/reports/invoice/invoice.js b/print/templates/reports/invoice/invoice.js index eaf17527d..a4d96edde 100755 --- a/print/templates/reports/invoice/invoice.js +++ b/print/templates/reports/invoice/invoice.js @@ -11,7 +11,12 @@ module.exports = { this.client = await this.findOneFromDef('client', [this.reference]); this.taxes = await this.rawSqlFromDef(`taxes`, [this.reference]); this.hasIntrastat = await this.findValueFromDef(`hasIntrastat`, [this.reference]); - this.intrastat = await this.rawSqlFromDef(`intrastat`, [this.reference, this.reference, this.reference, this.reference]); + this.intrastat = await this.rawSqlFromDef(`intrastat`, [ + this.reference, + this.reference, + this.reference, + this.reference + ]); this.rectified = await this.rawSqlFromDef(`rectified`, [this.reference]); this.hasIncoterms = await this.findValueFromDef(`hasIncoterms`, [this.reference]); diff --git a/print/templates/reports/invoice/sql/invoice.sql b/print/templates/reports/invoice/sql/invoice.sql index 0f12e4f53..303fa937f 100644 --- a/print/templates/reports/invoice/sql/invoice.sql +++ b/print/templates/reports/invoice/sql/invoice.sql @@ -11,7 +11,7 @@ FROM invoiceOut io JOIN client c ON c.id = io.clientFk JOIN payMethod pm ON pm.id = c.payMethodFk JOIN company cny ON cny.id = io.companyFk - JOIN supplierAccount sa ON sa.id = cny.supplierAccountFk + LEFT JOIN supplierAccount sa ON sa.id = cny.supplierAccountFk LEFT JOIN invoiceOutSerial ios ON ios.code = io.serial LEFT JOIN ticket t ON t.refFk = io.ref WHERE t.refFk = ? \ No newline at end of file From 9e8150dde369af9d4d53780f8c7e9e9072a1d099 Mon Sep 17 00:00:00 2001 From: carlossa Date: Thu, 9 Mar 2023 15:59:46 +0100 Subject: [PATCH 02/17] refs #084200 footnotes dinamico --- print/core/components/report-footer/locale/en.yml | 2 +- print/core/components/report-footer/locale/es.yml | 2 +- print/core/components/report-footer/locale/fr.yml | 2 +- print/core/components/report-footer/locale/pt.yml | 2 +- print/core/components/report-footer/report-footer.html | 4 ++-- print/core/components/report-footer/report-footer.js | 2 ++ 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/print/core/components/report-footer/locale/en.yml b/print/core/components/report-footer/locale/en.yml index 3899f8b98..9a383fb06 100644 --- a/print/core/components/report-footer/locale/en.yml +++ b/print/core/components/report-footer/locale/en.yml @@ -1,6 +1,6 @@ numPages: Page of law: - privacy: 'In compliance with the provisions of Organic Law 15/1999, on the + vn-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, diff --git a/print/core/components/report-footer/locale/es.yml b/print/core/components/report-footer/locale/es.yml index 985c1e17a..c4b538fe4 100644 --- a/print/core/components/report-footer/locale/es.yml +++ b/print/core/components/report-footer/locale/es.yml @@ -1,6 +1,6 @@ numPages: Página de law: - privacy: En cumplimiento de lo dispuesto en la Ley Orgánica 15/1999, de Protección + vn-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 todo momento ejercitar los derechos de acceso, rectificación, cancelación y oposición, diff --git a/print/core/components/report-footer/locale/fr.yml b/print/core/components/report-footer/locale/fr.yml index 861ee5684..da6735340 100644 --- a/print/core/components/report-footer/locale/fr.yml +++ b/print/core/components/report-footer/locale/fr.yml @@ -1,6 +1,6 @@ numPages: Page de law: - privacy: Conformément aux dispositions de la loi organique 15/1999 sur la protection + vn-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 diff --git a/print/core/components/report-footer/locale/pt.yml b/print/core/components/report-footer/locale/pt.yml index 1c343bb4c..b5353a9bc 100644 --- a/print/core/components/report-footer/locale/pt.yml +++ b/print/core/components/report-footer/locale/pt.yml @@ -1,6 +1,6 @@ numPages: Página de law: - privacy: Em cumprimento do disposto na lei Orgânica 15/1999, de Protecção de Dados + vn-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 diff --git a/print/core/components/report-footer/report-footer.html b/print/core/components/report-footer/report-footer.html index d71f04ed2..e158485f7 100644 --- a/print/core/components/report-footer/report-footer.html +++ b/print/core/components/report-footer/report-footer.html @@ -6,8 +6,8 @@

diff --git a/print/core/components/report-footer/report-footer.js b/print/core/components/report-footer/report-footer.js index da1272673..c4ae68d7e 100755 --- a/print/core/components/report-footer/report-footer.js +++ b/print/core/components/report-footer/report-footer.js @@ -43,6 +43,8 @@ module.exports = { s.postCode, s.city, s.phone, + c.footnotes, + c.code, cg.code AS groupName FROM company c JOIN companyGroup cg ON cg.id = c.companyGroupFk From 08bda1b05b8229283b487c181598396b0736de61 Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 13 Mar 2023 08:09:28 +0100 Subject: [PATCH 03/17] refs #084200 ultimos cambios footnotes --- print/core/components/report-footer/locale/en.yml | 6 ++++-- print/core/components/report-footer/locale/es.yml | 5 +++-- print/core/components/report-footer/locale/fr.yml | 5 +++-- print/core/components/report-footer/locale/pt.yml | 5 +++-- print/core/components/report-footer/report-footer.html | 2 +- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/print/core/components/report-footer/locale/en.yml b/print/core/components/report-footer/locale/en.yml index 9a383fb06..66f361234 100644 --- a/print/core/components/report-footer/locale/en.yml +++ b/print/core/components/report-footer/locale/en.yml @@ -1,8 +1,10 @@ numPages: Page of law: - vn-privacy: '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.' + The purpose of the file is administrative management, accounting, and billing. + ornPrivacy: Texto de ejemplo. + diff --git a/print/core/components/report-footer/locale/es.yml b/print/core/components/report-footer/locale/es.yml index c4b538fe4..4fce40b0a 100644 --- a/print/core/components/report-footer/locale/es.yml +++ b/print/core/components/report-footer/locale/es.yml @@ -1,8 +1,9 @@ numPages: Página de law: - vn-privacy: 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. + fichero es la gestión administrativa, contabilidad, y facturación. + ornPrivacy: Texto de ejemplo. \ 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 da6735340..d7347a813 100644 --- a/print/core/components/report-footer/locale/fr.yml +++ b/print/core/components/report-footer/locale/fr.yml @@ -1,8 +1,9 @@ numPages: Page de law: - vn-privacy: 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. + a pour objet la gestion administrative, la comptabilité et la facturation. + ornPrivacy: Texto de ejemplo. \ 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 b5353a9bc..f0d5ec48a 100644 --- a/print/core/components/report-footer/locale/pt.yml +++ b/print/core/components/report-footer/locale/pt.yml @@ -1,8 +1,9 @@ numPages: Página de law: - vn-privacy: 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. + administrativa, contabilidade e facturação. + ornPrivacy: Texto de ejemplo. \ 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 e158485f7..6461529a9 100644 --- a/print/core/components/report-footer/report-footer.html +++ b/print/core/components/report-footer/report-footer.html @@ -7,7 +7,7 @@

From b5394d3925251a50e6a20346a8aa1818a1ccf952 Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 13 Mar 2023 12:52:41 +0100 Subject: [PATCH 04/17] 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 @@ -
+
From d05ddef5fae0d3826a2807c151b04b9f6ba88d4f Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 22 Mar 2023 14:54:59 +0100 Subject: [PATCH 05/17] refs #084200 primer commit companyI18n --- db/changes/231001/00-newCompanyI18n.sql | 9 +++++++++ .../components/report-footer/report-footer.html | 2 +- .../core/components/report-footer/report-footer.js | 14 +++++++------- 3 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 db/changes/231001/00-newCompanyI18n.sql diff --git a/db/changes/231001/00-newCompanyI18n.sql b/db/changes/231001/00-newCompanyI18n.sql new file mode 100644 index 000000000..0aad8527b --- /dev/null +++ b/db/changes/231001/00-newCompanyI18n.sql @@ -0,0 +1,9 @@ +-- vn.companyI18n definition + +CREATE TABLE `companyI18n` ( + `companyFk` smallint(5) unsigned NOT NULL, + `lang` char(2) CHARACTER SET utf8mb3 NOT NULL, + `footnotes` longtext COLLATE utf8mb3_unicode_ci DEFAULT NULL, + PRIMARY KEY (`companyFk`,`lang`), + CONSTRAINT `companyI18n_FK` FOREIGN KEY (`companyFk`) REFERENCES `company` (`id`) ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; \ 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 447091f9b..62d0d9ae6 100644 --- a/print/core/components/report-footer/report-footer.html +++ b/print/core/components/report-footer/report-footer.html @@ -8,7 +8,7 @@

+ v-html="$18n.locale(`${company.footnotes}`)">

diff --git a/print/core/components/report-footer/report-footer.js b/print/core/components/report-footer/report-footer.js index 4debfce12..5027bcf7a 100755 --- a/print/core/components/report-footer/report-footer.js +++ b/print/core/components/report-footer/report-footer.js @@ -8,13 +8,13 @@ module.exports = { methods: { getCompany(code) { return db.findOne(` - SELECT - c.footnotes, - 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]); + SELECT + (SELECT ci.footnotes FROM companyI18n ci WHERE ci.companyFk = c.id) AS footnotes, + c.code + FROM company c + JOIN companyGroup cg ON cg.id = c.companyGroupFk + JOIN supplier s ON s.id = c.id + WHERE c.code = ?`); } }, props: ['leftText', 'companyCode', 'centerText'] From aad8fb0a66c4d90f9a045d449cb80198cc3b26e2 Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 27 Mar 2023 13:11:38 +0200 Subject: [PATCH 06/17] refs #084200 i18n --- db/changes/231001/00-newCompanyI18n.sql | 4 +++- print/core/components/report-footer/report-footer.html | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/db/changes/231001/00-newCompanyI18n.sql b/db/changes/231001/00-newCompanyI18n.sql index 0aad8527b..b420fafb3 100644 --- a/db/changes/231001/00-newCompanyI18n.sql +++ b/db/changes/231001/00-newCompanyI18n.sql @@ -1,4 +1,5 @@ -- vn.companyI18n definition +USE vn; CREATE TABLE `companyI18n` ( `companyFk` smallint(5) unsigned NOT NULL, @@ -6,4 +7,5 @@ CREATE TABLE `companyI18n` ( `footnotes` longtext COLLATE utf8mb3_unicode_ci DEFAULT NULL, PRIMARY KEY (`companyFk`,`lang`), CONSTRAINT `companyI18n_FK` FOREIGN KEY (`companyFk`) REFERENCES `company` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; \ No newline at end of file +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; + diff --git a/print/core/components/report-footer/report-footer.html b/print/core/components/report-footer/report-footer.html index 62d0d9ae6..957fe106a 100644 --- a/print/core/components/report-footer/report-footer.html +++ b/print/core/components/report-footer/report-footer.html @@ -8,7 +8,7 @@

+ v-html="$i18n.locale(`${company.footnotes}`)">

From 14f8f98fe987e9d5a3a90b81b5dde2d95dd4e48d Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 27 Mar 2023 15:15:15 +0200 Subject: [PATCH 07/17] refs #084200 findOne --- .../components/report-footer/report-footer.js | 24 ++++++++----------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/print/core/components/report-footer/report-footer.js b/print/core/components/report-footer/report-footer.js index 5027bcf7a..d8bc9ea3d 100755 --- a/print/core/components/report-footer/report-footer.js +++ b/print/core/components/report-footer/report-footer.js @@ -3,20 +3,16 @@ const db = require('../../database'); module.exports = { name: 'report-footer', async serverPrefetch() { - this.company = await this.getCompany(this.companyCode); - }, - methods: { - getCompany(code) { - return db.findOne(` - SELECT - (SELECT ci.footnotes FROM companyI18n ci WHERE ci.companyFk = c.id) AS footnotes, - c.code - FROM company c - JOIN companyGroup cg ON cg.id = c.companyGroupFk - JOIN supplier s ON s.id = c.id - WHERE c.code = ?`); - } + const company = await db.findOne(` + SELECT + (SELECT ci.footnotes FROM companyI18n ci WHERE ci.companyFk = c.id) AS footnotes, + c.code + FROM company c + JOIN companyGroup cg ON cg.id = c.companyGroupFk + JOIN supplier s ON s.id = c.id + WHERE c.code = ?`, [this.companyCode]); + + this.company = company; }, props: ['leftText', 'companyCode', 'centerText'] - }; From 71220c58f7b27dcb76490141bce945443284caa1 Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 29 Mar 2023 12:00:01 +0200 Subject: [PATCH 08/17] refs #084200 inserts --- db/changes/231001/00-insertI18n.sql | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 db/changes/231001/00-insertI18n.sql diff --git a/db/changes/231001/00-insertI18n.sql b/db/changes/231001/00-insertI18n.sql new file mode 100644 index 000000000..2baa6c9ab --- /dev/null +++ b/db/changes/231001/00-insertI18n.sql @@ -0,0 +1,9 @@ +-- Auto-generated SQL script #202303291013 +INSERT INTO vn.companyI18n (companyFk,lang,footnotes) + VALUES (442,'en','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.'); +INSERT INTO vn.companyI18n (companyFk,lang,footnotes) + VALUES (442,'es','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.'); +INSERT INTO vn.companyI18n (companyFk,lang,footnotes) + VALUES (442,'fr','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.'); +INSERT INTO vn.companyI18n (companyFk,lang,footnotes) + VALUES (442,'pt','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.'); From 9be06c6f4b615277af3cb18154b644a599bee2fe Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 29 Mar 2023 12:07:45 +0200 Subject: [PATCH 09/17] refs #084200 arreglo lang --- print/core/components/report-footer/report-footer.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/print/core/components/report-footer/report-footer.js b/print/core/components/report-footer/report-footer.js index d8bc9ea3d..be40d376e 100755 --- a/print/core/components/report-footer/report-footer.js +++ b/print/core/components/report-footer/report-footer.js @@ -5,11 +5,12 @@ module.exports = { async serverPrefetch() { const company = await db.findOne(` SELECT - (SELECT ci.footnotes FROM companyI18n ci WHERE ci.companyFk = c.id) AS footnotes, + ci.footnotes, c.code FROM company c - JOIN companyGroup cg ON cg.id = c.companyGroupFk - JOIN supplier s ON s.id = c.id + JOIN companyI18n ci ON ci.companyFk = c.id AND ci.lang = ? + JOIN companyGroup cg ON cg.id = c.companyGroupFk + JOIN supplier s ON s.id = c.id WHERE c.code = ?`, [this.companyCode]); this.company = company; From 1e71f7487a01620423f4ceda243aa280ccad2980 Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 5 Apr 2023 11:16:07 +0200 Subject: [PATCH 10/17] refs #084200 I18n footer --- print/core/components/report-footer/locale/en.yml | 10 +--------- print/core/components/report-footer/locale/es.yml | 10 +--------- print/core/components/report-footer/locale/fr.yml | 8 -------- print/core/components/report-footer/locale/pt.yml | 8 -------- print/core/components/report-footer/report-footer.html | 8 +++++--- print/core/components/report-footer/report-footer.js | 2 +- 6 files changed, 8 insertions(+), 38 deletions(-) diff --git a/print/core/components/report-footer/locale/en.yml b/print/core/components/report-footer/locale/en.yml index df871913e..8ca14b4d7 100644 --- a/print/core/components/report-footer/locale/en.yml +++ b/print/core/components/report-footer/locale/en.yml @@ -1,9 +1 @@ -numPages: Page of -law: - 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: +numPages: Page of \ No newline at end of file diff --git a/print/core/components/report-footer/locale/es.yml b/print/core/components/report-footer/locale/es.yml index 5b72fe78b..5ac6544ad 100644 --- a/print/core/components/report-footer/locale/es.yml +++ b/print/core/components/report-footer/locale/es.yml @@ -1,9 +1 @@ -numPages: Página de -law: - 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: \ No newline at end of file +numPages: Página de \ 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 a4174105f..6fb644b2c 100644 --- a/print/core/components/report-footer/locale/fr.yml +++ b/print/core/components/report-footer/locale/fr.yml @@ -1,9 +1 @@ numPages: Page de -law: - 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: \ 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 e9f6e516f..9354ba3e9 100644 --- a/print/core/components/report-footer/locale/pt.yml +++ b/print/core/components/report-footer/locale/pt.yml @@ -1,9 +1 @@ numPages: Página de -law: - 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: \ 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 957fe106a..ffef3e435 100644 --- a/print/core/components/report-footer/report-footer.html +++ b/print/core/components/report-footer/report-footer.html @@ -1,3 +1,5 @@ + +
+ diff --git a/print/core/components/report-footer/report-footer.js b/print/core/components/report-footer/report-footer.js index be40d376e..bb1ef2213 100755 --- a/print/core/components/report-footer/report-footer.js +++ b/print/core/components/report-footer/report-footer.js @@ -8,7 +8,7 @@ module.exports = { ci.footnotes, c.code FROM company c - JOIN companyI18n ci ON ci.companyFk = c.id AND ci.lang = ? + JOIN companyI18n ci ON ci.companyFk = c.id AND ci.lang = (SELECT lang FROM account.user LIMIT 1) JOIN companyGroup cg ON cg.id = c.companyGroupFk JOIN supplier s ON s.id = c.id WHERE c.code = ?`, [this.companyCode]); From 014998952e67a97e2eb99a1d2d53057cd0acf00f Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 5 Apr 2023 14:39:51 +0200 Subject: [PATCH 11/17] refs #084200 recipientId --- .../report-footer/report-footer.html | 8 +++---- .../components/report-footer/report-footer.js | 22 +++++++++---------- print/templates/reports/invoice/invoice.html | 2 ++ 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/print/core/components/report-footer/report-footer.html b/print/core/components/report-footer/report-footer.html index ffef3e435..67b5f3cd0 100644 --- a/print/core/components/report-footer/report-footer.html +++ b/print/core/components/report-footer/report-footer.html @@ -1,5 +1,3 @@ - -
- + diff --git a/print/core/components/report-footer/report-footer.js b/print/core/components/report-footer/report-footer.js index bb1ef2213..0eaab8ce4 100755 --- a/print/core/components/report-footer/report-footer.js +++ b/print/core/components/report-footer/report-footer.js @@ -1,19 +1,17 @@ +/* eslint-disable no-tabs */ const db = require('../../database'); module.exports = { name: 'report-footer', async serverPrefetch() { - const company = await db.findOne(` - SELECT - ci.footnotes, - c.code - FROM company c - JOIN companyI18n ci ON ci.companyFk = c.id AND ci.lang = (SELECT lang FROM account.user LIMIT 1) - JOIN companyGroup cg ON cg.id = c.companyGroupFk - JOIN supplier s ON s.id = c.id - WHERE c.code = ?`, [this.companyCode]); - - this.company = company; + this.company = await db.findOne( + `SELECT + ci.footnotes + FROM companyI18n ci + JOIN company c ON c.id = ci.companyFk + WHERE c.code = ? AND ci.lang = (SELECT lang FROM account.user WHERE id = ?)`, + [this.companyCode, this.recipientId]); }, - props: ['leftText', 'companyCode', 'centerText'] + + props: ['leftText', 'companyCode', 'recipientId', 'centerText'] }; diff --git a/print/templates/reports/invoice/invoice.html b/print/templates/reports/invoice/invoice.html index 4a8257c1d..771229c01 100644 --- a/print/templates/reports/invoice/invoice.html +++ b/print/templates/reports/invoice/invoice.html @@ -259,7 +259,9 @@ v-bind:company-code="invoice.companyCode" v-bind:left-text="$t('invoiceRef', [invoice.ref])" v-bind:center-text="client.socialName" + v-bind:recipient-id="client.id" v-bind="$props" + > From 0dcbc9fc8b0b3fa0866ad58705875e7757bfa497 Mon Sep 17 00:00:00 2001 From: alexandre Date: Mon, 17 Apr 2023 10:46:26 +0200 Subject: [PATCH 12/17] refs #5293 redirected claim.photos to lilium --- db/dump/fixtures.sql | 2 +- modules/claim/front/photos/index.html | 49 +----------- modules/claim/front/photos/index.js | 96 +----------------------- modules/claim/front/photos/index.spec.js | 70 ----------------- modules/claim/front/photos/locale/es.yml | 5 -- modules/claim/front/photos/style.scss | 47 ------------ 6 files changed, 6 insertions(+), 263 deletions(-) delete mode 100644 modules/claim/front/photos/index.spec.js delete mode 100644 modules/claim/front/photos/locale/es.yml delete mode 100644 modules/claim/front/photos/style.scss diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index 59d0a5eaa..19bf3fc83 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -2788,7 +2788,7 @@ INSERT INTO `vn`.`profileType` (`id`, `name`) INSERT INTO `salix`.`url` (`appName`, `environment`, `url`) VALUES - ('lilium', 'dev', 'http://localhost:8080/#/'), + ('lilium', 'dev', 'http://localhost:9000/#/'), ('salix', 'dev', 'http://localhost:5000/#!/'); INSERT INTO `vn`.`report` (`id`, `name`, `paperSizeFk`, `method`) diff --git a/modules/claim/front/photos/index.html b/modules/claim/front/photos/index.html index 9e00ee02f..8b1378917 100644 --- a/modules/claim/front/photos/index.html +++ b/modules/claim/front/photos/index.html @@ -1,48 +1 @@ - - - -
-
-
Drag & Drop photos here...
-
-
-
-
- -
- - -
-
-
- - - - + diff --git a/modules/claim/front/photos/index.js b/modules/claim/front/photos/index.js index 62e439a91..573abdf0e 100644 --- a/modules/claim/front/photos/index.js +++ b/modules/claim/front/photos/index.js @@ -1,105 +1,17 @@ import ngModule from '../module'; import Section from 'salix/components/section'; -import './style.scss'; class Controller extends Section { - constructor($element, $, vnFile) { + constructor($element, $) { super($element, $); - this.vnFile = vnFile; - this.filter = { - include: [ - { - relation: 'dms' - } - ] - }; } - deleteDms(index) { - const dmsFk = this.photos[index].dmsFk; - return this.$http.post(`ClaimDms/${dmsFk}/removeFile`) - .then(() => { - this.$.model.remove(index); - this.vnApp.showSuccess(this.$t('File deleted')); - }); - } - - onDrop($event) { - const files = $event.dataTransfer.files; - this.setDefaultParams().then(() => { - this.dms.files = files; - this.create(); - }); - } - - setDefaultParams() { - const filter = { - where: {code: 'claim'} - }; - return this.$http.get('DmsTypes/findOne', {filter}).then(res => { - const dmsTypeId = res.data && res.data.id; - const companyId = this.vnConfig.companyFk; - const warehouseId = this.vnConfig.warehouseFk; - this.dms = { - hasFile: false, - hasFileAttached: false, - reference: this.claim.id, - warehouseId: warehouseId, - companyId: companyId, - dmsTypeId: dmsTypeId, - description: this.$t('FileDescription', { - claimId: this.claim.id, - clientId: this.claim.client.id, - clientName: this.claim.client.name - }).toUpperCase() - }; - }); - } - - openUploadDialog() { - const element = document.createElement('input'); - element.setAttribute('type', 'file'); - element.setAttribute('multiple', true); - element.click(); - - element.addEventListener('change', () => - this.setDefaultParams().then(() => { - this.dms.files = element.files; - this.create(); - }) - ); - } - - create() { - const query = `claims/${this.claim.id}/uploadFile`; - const options = { - method: 'POST', - url: query, - params: this.dms, - headers: {'Content-Type': undefined}, - transformRequest: files => { - const formData = new FormData(); - - for (let i = 0; i < files.length; i++) - formData.append(files[i].name, files[i]); - - return formData; - }, - data: this.dms.files - }; - this.$http(options).then(() => { - this.vnApp.showSuccess(this.$t('File uploaded!')); - this.$.model.refresh(); - }); - } - - getImagePath(dmsId) { - return this.vnFile.getPath(`/api/Claims/${dmsId}/downloadFile`); + async $onInit() { + const url = await this.vnApp.getUrl(`claim/${this.$params.id}/photos`); + window.open(url).focus(); } } -Controller.$inject = ['$element', '$scope', 'vnFile']; - ngModule.vnComponent('vnClaimPhotos', { template: require('./index.html'), controller: Controller, diff --git a/modules/claim/front/photos/index.spec.js b/modules/claim/front/photos/index.spec.js deleted file mode 100644 index 84df48b44..000000000 --- a/modules/claim/front/photos/index.spec.js +++ /dev/null @@ -1,70 +0,0 @@ -import './index'; -import crudModel from 'core/mocks/crud-model'; - -describe('Claim', () => { - describe('Component vnClaimPhotos', () => { - let $scope; - let $httpBackend; - let controller; - - beforeEach(ngModule('claim')); - - beforeEach(inject(($componentController, $rootScope, _$httpBackend_) => { - $httpBackend = _$httpBackend_; - $scope = $rootScope.$new(); - controller = $componentController('vnClaimPhotos', {$element: null, $scope}); - controller.$.model = crudModel; - controller.claim = { - id: 1, - client: {id: 1101, name: 'Bruce Wayne'} - }; - })); - - describe('deleteDms()', () => { - it('should make an HTTP Post query', () => { - jest.spyOn(controller.vnApp, 'showSuccess'); - jest.spyOn(controller.$.model, 'remove'); - - const dmsId = 1; - const dmsIndex = 0; - controller.photos = [{dmsFk: 1}]; - - $httpBackend.expectPOST(`ClaimDms/${dmsId}/removeFile`).respond(); - controller.deleteDms(dmsIndex); - $httpBackend.flush(); - - expect(controller.$.model.remove).toHaveBeenCalledWith(dmsIndex); - expect(controller.vnApp.showSuccess).toHaveBeenCalled(); - }); - }); - - describe('setDefaultParams()', () => { - it('should make an HTTP GET query, then set all dms properties', () => { - $httpBackend.expectRoute('GET', `DmsTypes/findOne`).respond({}); - controller.setDefaultParams(); - $httpBackend.flush(); - - expect(controller.dms).toBeDefined(); - }); - }); - - describe('create()', () => { - it('should make an HTTP Post query, then refresh the model data', () => { - const claimId = 1; - const dmsIndex = 0; - jest.spyOn(controller.vnApp, 'showSuccess'); - jest.spyOn(controller.$.model, 'refresh'); - controller.photos = [{dmsFk: 1}]; - controller.dmsIndex = dmsIndex; - controller.dms = {files: []}; - - $httpBackend.expectPOST(`claims/${claimId}/uploadFile`).respond({}); - controller.create(); - $httpBackend.flush(); - - expect(controller.$.model.refresh).toHaveBeenCalled(); - expect(controller.vnApp.showSuccess).toHaveBeenCalled(); - }); - }); - }); -}); diff --git a/modules/claim/front/photos/locale/es.yml b/modules/claim/front/photos/locale/es.yml deleted file mode 100644 index d2ee9ffbd..000000000 --- a/modules/claim/front/photos/locale/es.yml +++ /dev/null @@ -1,5 +0,0 @@ -Are you sure you want to continue?: ¿Seguro que quieres continuar? -Drag & Drop photos here...: Arrastra y suelta fotos aquí... -File deleted: Archivo eliminado -File uploaded!: Archivo subido! -Select file: Seleccionar fichero \ No newline at end of file diff --git a/modules/claim/front/photos/style.scss b/modules/claim/front/photos/style.scss deleted file mode 100644 index 101cb0da2..000000000 --- a/modules/claim/front/photos/style.scss +++ /dev/null @@ -1,47 +0,0 @@ -@import "./variables"; - -vn-claim-photos { - height: 100%; - - .drop-zone { - color: $color-font-secondary; - box-sizing: border-box; - border-radius: 8px; - text-align: center; - min-height: 100%; - - .empty-rows { - padding: 80px $spacing-md; - font-size: 1.375rem - } - - vn-icon { - font-size: 3rem - } - } - - .photo-list { - padding: $spacing-md; - min-height: 100%; - - .photo { - width: 512px; - height: 288px; - } - } - - .video { - width: 100%; - height: 100%; - object-fit: cover; - cursor: pointer; - box-shadow: 0 2px 2px 0 rgba(0,0,0,.14), - 0 3px 1px -2px rgba(0,0,0,.2), - 0 1px 5px 0 rgba(0,0,0,.12); - border: 2px solid transparent; - - } - .video:hover { - border: 2px solid $color-primary - } -} From 8b60e9f5fd9508d8b2a6c1ac7bd4878df12d74d4 Mon Sep 17 00:00:00 2001 From: carlossa Date: Tue, 18 Apr 2023 08:07:35 +0200 Subject: [PATCH 13/17] sql arreglado --- db/changes/231601/00-newCompanyI18n.sql | 4 +--- db/changes/231601/00-newTableWeb.sql | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/db/changes/231601/00-newCompanyI18n.sql b/db/changes/231601/00-newCompanyI18n.sql index b420fafb3..948b9cb08 100644 --- a/db/changes/231601/00-newCompanyI18n.sql +++ b/db/changes/231601/00-newCompanyI18n.sql @@ -1,7 +1,5 @@ -- vn.companyI18n definition -USE vn; - -CREATE TABLE `companyI18n` ( +CREATE TABLE `vn`.`companyI18n` ( `companyFk` smallint(5) unsigned NOT NULL, `lang` char(2) CHARACTER SET utf8mb3 NOT NULL, `footnotes` longtext COLLATE utf8mb3_unicode_ci DEFAULT NULL, diff --git a/db/changes/231601/00-newTableWeb.sql b/db/changes/231601/00-newTableWeb.sql index 305ebec8b..1a2402956 100644 --- a/db/changes/231601/00-newTableWeb.sql +++ b/db/changes/231601/00-newTableWeb.sql @@ -1 +1 @@ -ALTER TABLE vn.company ADD web varchar(100) NULL; \ No newline at end of file +ALTER TABLE `vn`.`company` ADD `web` varchar(100) NULL; \ No newline at end of file From 3c639b9a2bab82a638e4386e6c2a12b0c81b2f3a Mon Sep 17 00:00:00 2001 From: carlossa Date: Tue, 18 Apr 2023 10:48:41 +0200 Subject: [PATCH 14/17] refs # cambios entrantes --- print/templates/reports/invoice/invoice.html | 4 ---- print/templates/reports/invoice/invoice.js | 5 ----- 2 files changed, 9 deletions(-) diff --git a/print/templates/reports/invoice/invoice.html b/print/templates/reports/invoice/invoice.html index 9fb1b0a37..c0b005968 100644 --- a/print/templates/reports/invoice/invoice.html +++ b/print/templates/reports/invoice/invoice.html @@ -240,11 +240,7 @@
-<<<<<<< HEAD
-======= -
->>>>>>> 2a8383f9ccaaa9c2dde10af42936f64de9436deb
{{$t('observations')}}
diff --git a/print/templates/reports/invoice/invoice.js b/print/templates/reports/invoice/invoice.js index bfdf65564..1c9965d3b 100755 --- a/print/templates/reports/invoice/invoice.js +++ b/print/templates/reports/invoice/invoice.js @@ -11,17 +11,12 @@ module.exports = { this.client = await this.findOneFromDef('client', [this.reference]); this.taxes = await this.rawSqlFromDef(`taxes`, [this.reference]); this.hasIntrastat = await this.findValueFromDef(`hasIntrastat`, [this.reference]); -<<<<<<< HEAD this.intrastat = await this.rawSqlFromDef(`intrastat`, [ this.reference, this.reference, this.reference, this.reference ]); -======= - this.intrastat = await this.rawSqlFromDef(`intrastat`, - [this.reference, this.reference, this.reference, this.reference]); ->>>>>>> 2a8383f9ccaaa9c2dde10af42936f64de9436deb this.rectified = await this.rawSqlFromDef(`rectified`, [this.reference]); this.hasIncoterms = await this.findValueFromDef(`hasIncoterms`, [this.reference]); From 84c251284752d6a742e5b57099219279003ac1ba Mon Sep 17 00:00:00 2001 From: alexandre Date: Thu, 20 Apr 2023 07:51:25 +0200 Subject: [PATCH 15/17] refs #5293 open lilium in the same page --- modules/claim/front/photos/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/claim/front/photos/index.js b/modules/claim/front/photos/index.js index 573abdf0e..c9fada9a4 100644 --- a/modules/claim/front/photos/index.js +++ b/modules/claim/front/photos/index.js @@ -8,7 +8,7 @@ class Controller extends Section { async $onInit() { const url = await this.vnApp.getUrl(`claim/${this.$params.id}/photos`); - window.open(url).focus(); + window.location.href = url; } } From 60146b8b9c0911921a0b3bccca0e7a5da251282f Mon Sep 17 00:00:00 2001 From: alexandre Date: Wed, 26 Apr 2023 07:28:30 +0200 Subject: [PATCH 16/17] added #5518 changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e89f394b0..1be03b733 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [2316.01] - 2023-05-04 ### Added -- +- (Usuarios -> Histórico) Nueva sección +- (Roles -> Histórico) Nueva sección ### Changed - (Artículo -> Precio fijado) Modificado el buscador superior por uno lateral From 899ef235413b4fdd2a637952296e6dff5ec5186e Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 26 Apr 2023 10:03:01 +0200 Subject: [PATCH 17/17] refs #084200 test back solve --- modules/supplier/back/methods/supplier/specs/filter.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/supplier/back/methods/supplier/specs/filter.spec.js b/modules/supplier/back/methods/supplier/specs/filter.spec.js index 2620bb687..8f8ff1346 100644 --- a/modules/supplier/back/methods/supplier/specs/filter.spec.js +++ b/modules/supplier/back/methods/supplier/specs/filter.spec.js @@ -23,6 +23,6 @@ describe('Supplier filter()', () => { let result = await app.models.Supplier.filter(ctx); - expect(result.length).toEqual(2); + expect(result.length).toEqual(3); }); });