Merge pull request 'feat: #7117 company_getSuppliersDebt devolver el pais del banco' (!2211) from 7117 into dev
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-test This commit looks good Details

Reviewed-on: #2211
This commit is contained in:
Javi Gallego 2024-03-28 08:02:30 +00:00
commit 585dd70a60
1 changed files with 139 additions and 135 deletions

View File

@ -169,7 +169,7 @@ BEGIN
AND vp.supplierFk = rd.supplierFk
AND vp.companyFk = rd.companyFk
AND vp.currencyFk = rd.currencyFk
WHERE vp.isPayment = FALSE;
WHERE NOT vp.isPayment;
SELECT vp.expirationId,
vp.dated,
@ -183,11 +183,15 @@ BEGIN
vp.isPayment,
vp.isReconciled,
vp.endingBalance,
cr.amount clientRiskAmount
cr.amount clientRiskAmount,
co.CEE
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
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;
DROP TEMPORARY TABLE tOpeningBalances;