7167-testToMaster_2414 #2244
|
@ -183,11 +183,15 @@ BEGIN
|
||||||
vp.isPayment,
|
vp.isPayment,
|
||||||
vp.isReconciled,
|
vp.isReconciled,
|
||||||
vp.endingBalance,
|
vp.endingBalance,
|
||||||
cr.amount clientRiskAmount
|
cr.amount clientRiskAmount,
|
||||||
|
co.CEE
|
||||||
FROM tPendingDuedates vp
|
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
|
LEFT JOIN client c ON c.fi = s.nif
|
||||||
LEFT JOIN clientRisk cr ON cr.clientFk = c.id
|
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;
|
AND cr.companyFk = vp.companyFk;
|
||||||
|
|
||||||
DROP TEMPORARY TABLE tOpeningBalances;
|
DROP TEMPORARY TABLE tOpeningBalances;
|
||||||
|
|
Loading…
Reference in New Issue