From 1f819ab16aef2a573a1c5f87b88416fceef981eb Mon Sep 17 00:00:00 2001 From: robert Date: Wed, 27 Mar 2024 19:02:05 +0100 Subject: [PATCH] fix: riesgos --- db/routines/vn/procedures/company_getSuppliersDebt.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/routines/vn/procedures/company_getSuppliersDebt.sql b/db/routines/vn/procedures/company_getSuppliersDebt.sql index f6bfc229d..6b0494db7 100644 --- a/db/routines/vn/procedures/company_getSuppliersDebt.sql +++ b/db/routines/vn/procedures/company_getSuppliersDebt.sql @@ -187,7 +187,7 @@ 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; DROP TEMPORARY TABLE tOpeningBalances;