refs #5525 mod yml y sql #1491

Merged
carlossa merged 41 commits from 5525-ibanSEPA-CORE into dev 2024-01-16 13:14:39 +00:00
7 changed files with 48 additions and 52 deletions
Showing only changes of commit 18e87a05c4 - Show all commits

View File

@ -6,4 +6,7 @@ ADD COLUMN `countryFk` mediumint(8) unsigned DEFAULT NULL,
ADD CONSTRAINT `fk_supplierAccount_country`
FOREIGN KEY (`countryFk`) REFERENCES `country` (`id`) ON UPDATE CASCADE;
ALTER TABLE `vn`.`supplierAccount`
ADD UNIQUE KEY `uk_supplier_country` (`supplierFk`, `countryFk`);

View File

@ -7,27 +7,26 @@ module.exports = {
name: 'letter-debtor-nd',
async serverPrefetch() {
this.debtor = await db.findOne(`
SELECT sa.iban,
SELECT sa.id,
sa.iban,
be.name bankName,
sa.countryFk,
c.countryFk
FROM supplierAccount sa
JOIN bankEntity be ON sa.bankEntityFk = be.id
LEFT JOIN company co ON co.supplierAccountFk = sa.id
LEFT JOIN client c ON c.countryFk = sa.countryFk
WHERE c.id = ?
ORDER BY co.id DESC
LIMIT 1;
JOIN client c ON c.countryFk = sa.countryFk
WHERE c.id = ?;
`, [this.id]);
if (!this.debtor.length) {
if (!this.debtor) {
this.debtor = await db.findOne(`
SELECT sa.iban,
be.name bankName
FROM supplierAccount sa
JOIN bankEntity be ON sa.bankEntityFk = be.id
JOIN company co ON co.supplierAccountFk = sa.id
WHERE co.code = ?;
`, [this.companyCode]);
WHERE co.id = ?;
`, [this.companyId]);
}
},
data() {

View File

@ -6,12 +6,12 @@ sections:
description: We are writing to you once again to inform you that your debt with our company remains unpaid, as you can verify in the attached statement.
terms: Since the agreed payment deadlines have significantly passed, there should be no further delay in settling the outstanding amount.
payMethod:
description: To do so, you have the following payment options:
description: To do so, you have the following payment options
options:
- Online payment through our website.
- Deposit or transfer to the account number provided at the bottom of this letter, indicating your customer number.
legalAction:
description: If this payment reminder is not heeded, we will be compelled to initiate the necessary legal actions, which may include:
description: If this payment reminder is not heeded, we will be compelled to initiate the necessary legal actions, which may include
options:
- Inclusion in negative credit and financial solvency records.
- Legal proceedings.

View File

@ -1,10 +1,9 @@
SELECT
c.dueDay,
c.iban,
SELECT c.dueDay,
sa.iban,
be.name AS bankName
be.name bankName
FROM client c
JOIN company AS cny
JOIN supplierAccount AS sa ON sa.id = cny.supplierAccountFk
JOIN supplierAccount sa ON sa.id = cny.supplierAccountFk
JOIN bankEntity be ON be.id = sa.bankEntityFk
WHERE c.id = ? AND cny.id = ?
JOIN company cny
WHERE c.id = ?
AND cny.id = ?

View File

@ -7,27 +7,26 @@ module.exports = {
name: 'letter-debtor-st',
async serverPrefetch() {
this.debtor = await db.findOne(`
SELECT sa.iban,
SELECT sa.id,
sa.iban,
be.name bankName,
sa.countryFk,
c.countryFk
FROM supplierAccount sa
JOIN bankEntity be ON sa.bankEntityFk = be.id
LEFT JOIN company co ON co.supplierAccountFk = sa.id
LEFT JOIN client c ON c.countryFk = sa.countryFk
WHERE c.id = ?
ORDER BY co.id DESC
LIMIT 1;
JOIN client c ON c.countryFk = sa.countryFk
WHERE c.id = ?;
`, [this.id]);
if (!this.debtor.length) {
if (!this.debtor) {
this.debtor = await db.findOne(`
SELECT sa.iban,
be.name bankName
FROM supplierAccount sa
JOIN bankEntity be ON sa.bankEntityFk = be.id
JOIN company co ON co.supplierAccountFk = sa.id
WHERE co.code = ?;
`, [this.companyCode]);
WHERE co.id = ?;
`, [this.companyId]);
}
},
data() {

View File

@ -17,8 +17,6 @@ supplier:
toCompleteBySupplier: A cumplimentar por el acreedor
orderReference: Referencia de la orden de domiciliación
identifier: Identificador del acreedor
iban: ES89000B97367486
cif: B97367486-000
name: Nombre del acreedor
street: Dirección
location: CP - Población - Provincia

View File

@ -13,8 +13,6 @@ sendOrder: APRÈS SIGNATURA, RENVOYER AU CRÉANCIER ET AU VOTRE ÉTABLISSEMENT F
supplier:
toCompleteBySupplier: Á compléter pour le créancier
orderReference: Numéro de référence du mandat
iban: FR7630003012690002801121597
cif: B97367486-000
identifier: Identifiant créancier
name: Nom du céancier
street: Adresse