Compare commits

..

No commits in common. "5f12e498d5e731248b7e2379c50bac784e0fe31c" and "30e1acedf3dd12c1763104fe77d90d7f70d4f462" have entirely different histories.

1 changed files with 52 additions and 55 deletions

View File

@ -169,7 +169,7 @@ BEGIN
AND vp.supplierFk = rd.supplierFk
AND vp.companyFk = rd.companyFk
AND vp.currencyFk = rd.currencyFk
WHERE NOT vp.isPayment;
WHERE vp.isPayment = FALSE;
SELECT vp.expirationId,
vp.dated,
@ -183,15 +183,12 @@ BEGIN
vp.isPayment,
vp.isReconciled,
vp.endingBalance,
cr.amount clientRiskAmount,
co.CEE
cr.amount clientRiskAmount
FROM tPendingDuedates vp
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
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;
LEFT JOIN clientRisk cr ON cr.clientFk = c.id
AND cr.companyFk = vp.companyFk;
DROP TEMPORARY TABLE tOpeningBalances;
DROP TEMPORARY TABLE tPendingDuedates;