DeathGun44 commented on code in PR #6084:
URL: https://github.com/apache/fineract/pull/6084#discussion_r3525732702


##########
integration-tests/src/test/java/org/apache/fineract/integrationtests/ClientLoanMultipleDisbursementsIntegrationTest.java:
##########
@@ -195,46 +167,38 @@ public void 
checkThatAllMultiDisbursalsAppearOnLoanScheduleAndOutStandingBalance
         BigDecimal totalPrincipalDisbursed = BigDecimal.ZERO;
         // First 8 lines should be disbursals
         for (int i = 0; i < loanScheduleLineCount - 1; i++) {
-            final Integer period = (Integer) loanSchedule.get(i).get("period");
-            final BigDecimal principalDisbursed = BigDecimal
-                    
.valueOf(Double.parseDouble(loanSchedule.get(i).get("principalDisbursed").toString()));
+            final Integer period = loanSchedule.get(i).getPeriod();
+            final BigDecimal principalDisbursed = 
loanSchedule.get(i).getPrincipalLoanBalanceOutstanding();

Review Comment:
    Good catch. but getSummary().getPrincipalDisbursed() idea didn't hold up 
when I ran it live (doesn't return 255 for the 8-tranche case), and the Feign 
model doesn't expose the per-row principalDisbursed. So I now read it from the 
raw JSON and sum across disbursement rows, matching the original.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to