You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by GitBox <gi...@apache.org> on 2022/09/21 06:41:06 UTC

[GitHub] [fineract] adamsaghy commented on a diff in pull request #2519: FINERACT-1722: Fix loan repayment schedule with multitranche

adamsaghy commented on code in PR #2519:
URL: https://github.com/apache/fineract/pull/2519#discussion_r976091880


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanApplicationTerms.java:
##########
@@ -1702,6 +1588,18 @@ public Money getTotalDisbursedAmount() {
         return disbursedAmount;
     }
 
+    public Money getTotalMultiDisbursedAmount() {
+        Money disbursedAmount = Money.zero(getCurrency());
+        if (isMultiDisburseLoan()) {
+            for (DisbursementData disbursement : getDisbursementDatas()) {
+                disbursedAmount = disbursedAmount.plus(disbursement.getPrincipal());

Review Comment:
   @josehernandezfintecheandomx Do we need to consider here the "not yet" disbursement details as well?
   Many other places the disbursement details are filtered by whether they got already disbursed or it is just expected yet (actualDisbursementDate = null). What do you think?



-- 
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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org