fix: riesgos #2225

Merged
robert merged 4 commits from hotFixCompany_getSuppliersDebt into master 2024-03-28 14:10:45 +00:00
1 changed files with 5 additions and 3 deletions
Showing only changes of commit 063745167e - Show all commits

View File

@ -185,10 +185,12 @@ BEGIN
vp.endingBalance,
cr.amount clientRiskAmount
FROM tPendingDuedates vp
LEFT JOIN supplier s ON s.id = vp.supplierFk
LEFT JOIN supplier s ON s.id = vp.supplierFk
LEFT JOIN client c ON c.fi = s.nif
JOIN clientRisk cr ON cr.clientFk = c.id
AND cr.companyFk = vp.companyFk;
JOIN clientRisk cr ON cr.clientFk = c.id AND cr.companyFk = vp.companyFk
LEFT JOIN supplierAccount sa ON sa.supplierFk = s.id
LEFT JOIN bankEntity be ON be.id = sa.bankEntityFk
LEFT JOIN country co ON co.id = be.countryFk;
DROP TEMPORARY TABLE tOpeningBalances;
DROP TEMPORARY TABLE tPendingDuedates;