Merge branch 'master' into 7648_myEntries
gitea/salix/pipeline/pr-master This commit looks good
Details
gitea/salix/pipeline/pr-master This commit looks good
Details
This commit is contained in:
commit
2a044dd90b
|
@ -0,0 +1,16 @@
|
||||||
|
subject: Bank Direct Debit Request
|
||||||
|
title: SEPA CORE Direct Debit
|
||||||
|
description:
|
||||||
|
dear: Dear Customer
|
||||||
|
instructions: <p>Given the excellent relationship between our two companies
|
||||||
|
and to facilitate the payment processes of our invoices, we suggest the use
|
||||||
|
of the SEPA CORE direct debit system.</p>
|
||||||
|
<p>This service involves issuing our receipts to your company in an automated
|
||||||
|
and electronic manner, which represents a substantial reduction in costs for you
|
||||||
|
in terms of fees and bank charges.</p>
|
||||||
|
<p>If you accept our proposal, on the due date of each payment, it will be automatically
|
||||||
|
debited from your account through your bank.</p>
|
||||||
|
<p>This system is based on the electronic transmission of data; the handling of
|
||||||
|
physical documents has been eliminated.</p>
|
||||||
|
<p>We appreciate your cooperation,</p>
|
||||||
|
conclusion: Thank you for your attention!
|
|
@ -9,9 +9,7 @@ description:
|
||||||
forma automatizada y electrónicamente, lo que supone para usted una reducción
|
forma automatizada y electrónicamente, lo que supone para usted una reducción
|
||||||
sustancial de costos en términos de honorarios y gastos bancarios.</p>
|
sustancial de costos en términos de honorarios y gastos bancarios.</p>
|
||||||
<p>En caso de que acepte nuestra propuesta, a la fecha de vencimiento de cada efecto,
|
<p>En caso de que acepte nuestra propuesta, a la fecha de vencimiento de cada efecto,
|
||||||
se debitará a su cuenta automáticamente a través de su entidad bancaria.
|
se debitará a su cuenta automáticamente a través de su entidad bancaria.</p>
|
||||||
Por tanto, le pedimos que firme y envíe a su banco la autorización original adjunta,
|
|
||||||
debidamente cumplimentada, y nos devuelva una fotocopia de dicha autorización.</p>
|
|
||||||
<p>Este sistema se basa en la transmisión electrónica de datos;
|
<p>Este sistema se basa en la transmisión electrónica de datos;
|
||||||
el manejo de documentos físicos ha sido eliminado.</p>
|
el manejo de documentos físicos ha sido eliminado.</p>
|
||||||
<p>Le agradecemos su cooperación,</p>
|
<p>Le agradecemos su cooperación,</p>
|
||||||
|
|
|
@ -14,11 +14,7 @@ description:
|
||||||
et commissions bancaires.</p>
|
et commissions bancaires.</p>
|
||||||
<p>Dans le cas où vous accepteriez notre proposition, à
|
<p>Dans le cas où vous accepteriez notre proposition, à
|
||||||
l’échéance de chaque effet, votre compte sera débité
|
l’échéance de chaque effet, votre compte sera débité
|
||||||
automatiquement par votre Banque.
|
automatiquement par votre Banque.</p>
|
||||||
Ainsi, nous vous demandons de signer et envoyer à votre
|
|
||||||
Banque l'original de l'autorisation pour débit en annexe,
|
|
||||||
dûment remplie, et de nous retourner une photocopie de la
|
|
||||||
dite autorisation.</p>
|
|
||||||
<p>Ce système étant basé sur la transmission de données de
|
<p>Ce système étant basé sur la transmission de données de
|
||||||
manière électronique, le maniement de documents
|
manière électronique, le maniement de documents
|
||||||
physiques á été éliminé</p>
|
physiques á été éliminé</p>
|
||||||
|
|
|
@ -0,0 +1,46 @@
|
||||||
|
reportName: direct-debit-order
|
||||||
|
title: SEPA CORE Direct Debit Order
|
||||||
|
description: By signing this direct debit order, the debtor authorizes (A) the creditor
|
||||||
|
to send instructions to the debtor's bank to debit their account and (B) the bank to debit
|
||||||
|
their account according to the creditor's instructions. As part of their rights,
|
||||||
|
the debtor is entitled to a refund by their bank under the terms and conditions
|
||||||
|
of the contract signed with the bank. The refund request must be made within
|
||||||
|
eight weeks of the debit. You can obtain additional information about your rights
|
||||||
|
from your financial institution.
|
||||||
|
documentCopy: You must take a signed copy of this document to your Bank for registration to avoid returns.
|
||||||
|
mandatoryFields: ALL FIELDS MUST BE COMPLETED.
|
||||||
|
sendOrder: ONCE THIS DIRECT DEBIT ORDER IS SIGNED, IT MUST BE SENT TO THE CREDITOR
|
||||||
|
FOR SAFEGUARDING AND IT IS RECOMMENDED TO PROVIDE A COPY TO YOUR BANK.
|
||||||
|
supplier:
|
||||||
|
toCompleteBySupplier: To be completed by the creditor
|
||||||
|
orderReference: Direct debit order reference
|
||||||
|
identifier: Creditor identifier
|
||||||
|
name: Creditor's name
|
||||||
|
street: Address
|
||||||
|
location: Postal Code - City - Province
|
||||||
|
country: Country
|
||||||
|
client:
|
||||||
|
toCompleteByClient: To be completed by the debtor
|
||||||
|
name: Debtor's name(s)
|
||||||
|
fiscalId: NIF
|
||||||
|
street: Debtor's address
|
||||||
|
location: Postal Code - City - Province
|
||||||
|
country: Debtor's country
|
||||||
|
swift: Swift BIC
|
||||||
|
accountNumber: IBAN
|
||||||
|
accountHolder: "(Account holder(s))"
|
||||||
|
accountNumberFormat: In {0}, the IBAN consists of {1} characters always starting with {2}
|
||||||
|
paymentType: Payment type
|
||||||
|
recurrent: Recurrent
|
||||||
|
unique: Unique
|
||||||
|
signLocation: Date - City
|
||||||
|
sign: Debtor's signature and stamp
|
||||||
|
order: Direct Debit Order {0}
|
||||||
|
Francia: France
|
||||||
|
España: Spain
|
||||||
|
Portugal: Portugal
|
||||||
|
instructions:
|
||||||
|
title: Instructions
|
||||||
|
accountFields: Fill in the fields related to the bank account
|
||||||
|
signDocument: Sign and stamp the document. For it to be valid, the stamp must show the CIF/NIF. If not, the request must be accompanied by an account ownership certificate.
|
||||||
|
thanks: Thank you for your cooperation!
|
|
@ -1,13 +1,12 @@
|
||||||
const vnReport = require('../../../core/mixins/vn-report.js');
|
const vnReport = require('../../../core/mixins/vn-report.js');
|
||||||
const db = require('../../../core/database');
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'sepa-core',
|
name: 'sepa-core',
|
||||||
mixins: [vnReport],
|
mixins: [vnReport],
|
||||||
async serverPrefetch() {
|
async serverPrefetch() {
|
||||||
this.client = await this.findOneFromDef('client', [this.companyId, this.companyId, this.id]);
|
this.client = await this.findOneFromDef('client', [this.id]);
|
||||||
this.checkMainEntity(this.client);
|
this.checkMainEntity(this.client);
|
||||||
const suppliers = await this.rawSqlFromDef('supplier', [this.companyId, this.companyId, this.id]);
|
const suppliers = await this.rawSqlFromDef('supplier', [this.companyId, this.id]);
|
||||||
this.supplier = {
|
this.supplier = {
|
||||||
...suppliers[0],
|
...suppliers[0],
|
||||||
accountDetailValue: suppliers.map(val => val?.accountDetailValue)
|
accountDetailValue: suppliers.map(val => val?.accountDetailValue)
|
||||||
|
@ -23,16 +22,5 @@ module.exports = {
|
||||||
type: Number,
|
type: Number,
|
||||||
required: true
|
required: true
|
||||||
}
|
}
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getSupplierCif() {
|
|
||||||
return db.findOne(`
|
|
||||||
SELECT DISTINCT ad.value
|
|
||||||
FROM supplierAccount sa
|
|
||||||
JOIN accountDetail ad ON ad.supplierAccountFk = sa.id
|
|
||||||
JOIN accountDetailType adt ON adt.id = ad.accountDetailTypeFk AND adt.id = 3
|
|
||||||
WHERE sa.supplierFk = ?`) [this.companyId];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,19 +1,14 @@
|
||||||
SELECT
|
SELECT c.id,
|
||||||
c.id,
|
|
||||||
m.code mandateCode,
|
|
||||||
c.socialName,
|
c.socialName,
|
||||||
c.street,
|
c.street,
|
||||||
c.postcode,
|
c.postcode,
|
||||||
c.city,
|
c.city,
|
||||||
c.fi,
|
c.fi,
|
||||||
p.name AS province,
|
p.name province,
|
||||||
ct.name country,
|
ct.name country,
|
||||||
ct.code AS countryCode,
|
ct.code countryCode,
|
||||||
ct.ibanLength AS ibanLength
|
ct.ibanLength ibanLength
|
||||||
FROM client c
|
FROM client c
|
||||||
JOIN country ct ON ct.id = c.countryFk
|
JOIN country ct ON ct.id = c.countryFk
|
||||||
LEFT JOIN mandate m ON m.clientFk = c.id
|
JOIN province p ON p.id = c.provinceFk
|
||||||
AND m.companyFk = ? AND m.finished IS NULL
|
WHERE c.id = ?
|
||||||
LEFT JOIN province p ON p.id = c.provinceFk
|
|
||||||
WHERE (m.companyFk = ? OR m.companyFk IS NULL) AND c.id = ?
|
|
||||||
ORDER BY m.created DESC LIMIT 1
|
|
|
@ -1,29 +1,24 @@
|
||||||
SELECT
|
SELECT m.code mandateCode,
|
||||||
m.code mandateCode,
|
s.name,
|
||||||
s.name,
|
s.street,
|
||||||
s.street,
|
sc.name country,
|
||||||
sc.name country,
|
s.postCode,
|
||||||
s.postCode,
|
s.city,
|
||||||
s.city,
|
sp.name province,
|
||||||
sp.name province,
|
ad.value accountDetailValue
|
||||||
s.nif,
|
FROM client c
|
||||||
sa.supplierFk,
|
JOIN mandate m ON m.clientFk = c.id
|
||||||
be.name bankName,
|
JOIN mandateType mt ON mt.id = m.mandateTypeFk
|
||||||
ad.value accountDetailValue
|
JOIN supplier s ON s.id = m.companyFk
|
||||||
FROM
|
LEFT JOIN country sc ON sc.id = s.countryFk
|
||||||
client c
|
LEFT JOIN province sp ON sp.id = s.provinceFk
|
||||||
LEFT JOIN mandate m ON m.clientFk = c.id AND m.companyFk = ? AND m.finished IS NULL
|
JOIN supplierAccount sa ON sa.supplierFk = s.id
|
||||||
LEFT JOIN supplier s ON s.id = m.companyFk
|
JOIN accountDetail ad ON ad.supplierAccountFk = sa.id
|
||||||
LEFT JOIN country sc ON sc.id = s.countryFk
|
JOIN accountDetailType adt ON adt.id = ad.accountDetailTypeFk
|
||||||
LEFT JOIN province sp ON sp.id = s.provinceFk
|
WHERE m.companyFk = ?
|
||||||
LEFT JOIN province p ON p.id = c.provinceFk
|
AND m.finished IS NULL
|
||||||
LEFT JOIN supplierAccount sa ON sa.supplierFk = s.id
|
AND c.id = ?
|
||||||
LEFT JOIN bankEntity be ON sa.bankEntityFk = be.id
|
AND mt.name = 'CORE'
|
||||||
LEFT JOIN accountDetail ad ON ad.supplierAccountFk = sa.id
|
AND adt.description = 'Referencia Remesas'
|
||||||
JOIN accountDetailType adt ON adt.id = ad.accountDetailTypeFk AND adt.id = 3
|
GROUP BY m.id, ad.value
|
||||||
WHERE
|
ORDER BY m.created DESC
|
||||||
(m.companyFk = ? OR m.companyFk IS NULL)
|
|
||||||
AND (c.id = ? OR (c.id IS NULL AND c.countryFk = sa.countryFk))
|
|
||||||
GROUP BY ad.value
|
|
||||||
ORDER BY
|
|
||||||
m.created DESC;
|
|
Loading…
Reference in New Issue