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
2 changed files with 20 additions and 13 deletions
Showing only changes of commit 344b5d984a - Show all commits

View File

@ -27,7 +27,7 @@
<tr>
<td>{{$t('supplier.identifier')}}</td>
<th>
<div>{{$t('supplier.iban')}}</div>
<div>{{supplier.iban}}</div>
<div>{{supplier.nif}}</div>
</th>
</tr>

View File

@ -1,17 +1,24 @@
SELECT
m.code mandateCode,
s.name,
s.street,
sc.country,
s.postCode,
s.city,
sp.name province
FROM client c
LEFT JOIN mandate m ON m.clientFk = c.id
AND m.companyFk = ? AND m.finished IS NULL
m.code AS mandateCode,
carlossa marked this conversation as resolved Outdated

sin AS

sin AS
s.name,
s.street,
sc.country,
s.postCode,
s.city,
sp.name AS province,
s.nif,
sa.iban,
be.name AS bankName
FROM
client c
LEFT JOIN mandate m ON m.clientFk = c.id AND m.companyFk = ? AND m.finished IS NULL
LEFT JOIN supplier s ON s.id = m.companyFk
LEFT JOIN country sc ON sc.id = s.countryFk
LEFT JOIN province sp ON sp.id = s.provinceFk
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
LEFT JOIN bankEntity be ON sa.supplierFk = s.id
LEFT JOIN supplierAccount sa ON sa.bankEntityFk = be.id
WHERE (m.companyFk = ? OR m.companyFk IS NULL) AND c.id = ? OR (c.id IS NULL AND c.countryFk = sa.countryFk)
ORDER BY
m.created DESC
LIMIT 1;