6745-2404_testToMaster #1950

Merged
alexm merged 191 commits from 6745-2404_testToMaster into master 2024-01-25 07:39:13 +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,
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;