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> <tr>
<td>{{$t('supplier.identifier')}}</td> <td>{{$t('supplier.identifier')}}</td>
<th> <th>
<div>{{$t('supplier.iban')}}</div> <div>{{supplier.iban}}</div>
<div>{{supplier.nif}}</div> <div>{{supplier.nif}}</div>
</th> </th>
</tr> </tr>

View File

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