feat: company_getSuppliersDebtHotFix #2314

Merged
robert merged 1 commits from company_getSuppliersDebtHotFix into master 2024-04-17 10:08:01 +00:00
1 changed files with 180 additions and 180 deletions
Showing only changes of commit 0a4cd4d4d0 - Show all commits

View File

@ -188,11 +188,11 @@ BEGIN
FROM tPendingDuedates vp
LEFT JOIN supplier s ON s.id = vp.supplierFk
LEFT JOIN client c ON c.fi = s.nif
LEFT JOIN clientRisk cr ON cr.clientFk = c.id
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
AND cr.companyFk = vp.companyFk;
LEFT JOIN country co ON co.id = be.countryFk;
DROP TEMPORARY TABLE tOpeningBalances;
DROP TEMPORARY TABLE tPendingDuedates;