Merge pull request 'refs: #084200 mod del footer y readapatacion heade' (!1382) from 084200-footerAlbaranReport into dev
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #1382
Reviewed-by: Joan Sanchez <joan@verdnatura.es>
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
This commit is contained in:
Carlos Satorres 2023-04-26 08:54:11 +00:00
commit be6d416f67
17 changed files with 56 additions and 41 deletions

View File

@ -0,0 +1,5 @@
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.'),
(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.'),
(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.'),
(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.');

View File

@ -0,0 +1,9 @@
-- vn.companyI18n definition
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,
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;

View File

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

View File

@ -546,7 +546,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

View File

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

View File

@ -4,6 +4,7 @@
margin-right: 2cm;
font-size: 10px;
color: #555;
width: 100%;
zoom: 0.65
}

View File

@ -1,8 +1 @@
numPages: Page <span class="pageNumber"></span> of <span class="totalPages"></span>
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,8 +1 @@
numPages: Página <span class="pageNumber"></span> de <span class="totalPages"></span>
law:
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,
comunicándolo por escrito al domicilio social de la entidad. La finalidad del
fichero es la gestión administrativa, contabilidad, y facturación.

View File

@ -1,8 +1 @@
numPages: Page <span class="pageNumber"></span> de <span class="totalPages"></span>
law:
privacy: Conformément aux dispositions de la loi organique 15/1999 sur la protection
des données personnelles, nous vous informons que les données personnelles que
vous fournissez seront incluses dans des dossiers. VERDNATURA LEVANTE S.L., vous
pouvez à tout moment, exercer les droits d'accès, de rectification, d'annulation
et d'opposition, en communiquant par écrit au siège social de la société. Le dossier
a pour objet la gestion administrative, la comptabilité et la facturation.

View File

@ -1,8 +1 @@
numPages: Página <span class="pageNumber"></span> de <span class="totalPages"></span>
law:
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

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

View File

@ -1,4 +1,17 @@
/* eslint-disable no-tabs */
const db = require('../../database');
module.exports = {
name: 'report-footer',
props: ['leftText', 'centerText']
async serverPrefetch() {
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', 'recipientId', 'centerText']
};

View File

@ -8,7 +8,7 @@
{{companyName}}. {{company.street}}.
{{company.postCode}} {{company.city}}.
&#9742; {{companyPhone}}
· {{$t('company.contactData')}}
· {{company.web}} - {{company.email}}
</section>
<section>CIF: {{fiscalAddress.nif}} {{fiscalAddress.register}}</section>
</header>

View File

@ -43,7 +43,9 @@ module.exports = {
s.postCode,
s.city,
s.phone,
cg.code AS groupName
cg.code AS groupName,
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

@ -242,7 +242,7 @@
</tfoot>
</table>
</div>
<div class="columns vn-mt-xl" v-if="invoice.payMethodCode == 'wireTransfer' || ticketObservations">
<div class="columns vn-mt-xl" v-if="invoice.payMethodCode == 'wireTransfer' && invoice.iban">
<div class="size50 pull-left no-page-break">
<div class="panel">
<div class="header">{{$t('observations')}}</div>
@ -266,7 +266,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"
>
</report-footer>
</template>

View File

@ -11,8 +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]);

View File

@ -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 = ?