fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nazeer1100...@apache.org
Subject [1/2] fineract git commit: holiday bug fix
Date Mon, 24 Jul 2017 11:55:06 GMT
Repository: fineract
Updated Branches:
  refs/heads/develop 1b4147409 -> 0f98cbbed


holiday bug fix


Project: http://git-wip-us.apache.org/repos/asf/fineract/repo
Commit: http://git-wip-us.apache.org/repos/asf/fineract/commit/39d1f74c
Tree: http://git-wip-us.apache.org/repos/asf/fineract/tree/39d1f74c
Diff: http://git-wip-us.apache.org/repos/asf/fineract/diff/39d1f74c

Branch: refs/heads/develop
Commit: 39d1f74ccac39a02b46b111605290288fb65c7ca
Parents: b9017e2
Author: nazeer shaik <nazeer.shaik@confluxtechnologies.com>
Authored: Mon Jul 24 16:22:48 2017 +0530
Committer: nazeer shaik <nazeer.shaik@confluxtechnologies.com>
Committed: Mon Jul 24 16:22:48 2017 +0530

----------------------------------------------------------------------
 .../domain/AbstractLoanScheduleGenerator.java   | 27 +++++++++++++-------
 1 file changed, 18 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/fineract/blob/39d1f74c/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/AbstractLoanScheduleGenerator.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/AbstractLoanScheduleGenerator.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/AbstractLoanScheduleGenerator.java
index d8baaf3..19a203a 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/AbstractLoanScheduleGenerator.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/AbstractLoanScheduleGenerator.java
@@ -2176,16 +2176,25 @@ public abstract class AbstractLoanScheduleGenerator implements LoanScheduleGener
                     
 
                    // check for date changes
-                   
-                    while (loanApplicationTerms.getLoanTermVariations().hasDueDateVariation(lastInstallmentDate))
{
-                        LoanTermVariationsData variation = loanApplicationTerms.getLoanTermVariations().nextDueDateVariation();
-                        if (!variation.isSpecificToInstallment()) {
-                            actualRepaymentDate = variation.getDateValue();
-                            loanApplicationTerms.setSeedDate(actualRepaymentDate);
+                    
+                    do {
+                        actualRepaymentDate = this.scheduledDateGenerator.generateNextRepaymentDate(actualRepaymentDate,
+                                loanApplicationTerms, isFirstRepayment);
+                        isFirstRepayment = false;
+                        lastInstallmentDate = this.scheduledDateGenerator.adjustRepaymentDate(actualRepaymentDate,
loanApplicationTerms,
+                                holidayDetailDTO).getChangedScheduleDate();
+                        while (loanApplicationTerms.getLoanTermVariations().hasDueDateVariation(lastInstallmentDate))
{
+                            LoanTermVariationsData variation = loanApplicationTerms.getLoanTermVariations().nextDueDateVariation();
+                            if (!variation.isSpecificToInstallment()) {
+                                actualRepaymentDate = variation.getDateValue();
+                                lastInstallmentDate = actualRepaymentDate;
+                            }
+                            dueDateVariationsDataList.add(variation);
                         }
-                        lastInstallmentDate = variation.getDateValue();
-                        dueDateVariationsDataList.add(variation);
-                    }
+                        loanTermVariationParams = applyExceptionLoanTermVariations(loanApplicationTerms,
lastInstallmentDate,
+                                exceptionDataListIterator, instalmentNumber, totalCumulativePrincipal,
totalCumulativeInterest, mc);
+                    } while (loanTermVariationParams != null && loanTermVariationParams.isSkipPeriod());
+                   
                     periodNumber++;
 
                     for (LoanTermVariationsData dueDateVariation : dueDateVariationsDataList)
{


Mime
View raw message