Repository: incubator-fineract
Updated Branches:
  refs/heads/develop 19329c4a1 -> df690ec89


Moving actualDisbursementDate outside in 
LoanWritePlatformServiceJpaRepositoryImpl


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

Branch: refs/heads/develop
Commit: df690ec894eb7f3c2cafe0dd8cfb976481c1c5d8
Parents: 19329c4
Author: Nazeer Hussain Shaik <nazeer.sh...@confluxtechnologies.com>
Authored: Tue Apr 26 12:06:24 2016 +0530
Committer: Nazeer Hussain Shaik <nazeer.sh...@confluxtechnologies.com>
Committed: Tue Apr 26 12:06:24 2016 +0530

----------------------------------------------------------------------
 .../service/LoanWritePlatformServiceJpaRepositoryImpl.java      | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/df690ec8/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java
----------------------------------------------------------------------
diff --git 
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java
 
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java
index 6130338..b6c7ba1 100755
--- 
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java
+++ 
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java
@@ -312,6 +312,7 @@ public class LoanWritePlatformServiceJpaRepositoryImpl 
implements LoanWritePlatf
         checkForProductMixRestrictions(loan);
         
         LocalDate recalculateFrom = null;
+        final LocalDate actualDisbursementDate = 
command.localDateValueOfParameterNamed("actualDisbursementDate");
         if (loan.repaymentScheduleDetail().isInterestRecalculationEnabled()) {
             recalculateFrom = actualDisbursementDate;
         }
@@ -321,7 +322,7 @@ public class LoanWritePlatformServiceJpaRepositoryImpl 
implements LoanWritePlatf
         final CalendarInstance calendarInstance = 
this.calendarInstanceRepository.findCalendarInstaneByEntityId(loan.getId(),
                 CalendarEntityType.LOANS.getValue());
         if (loan.isSyncDisbursementWithMeeting()) {
-            final LocalDate actualDisbursementDate = 
command.localDateValueOfParameterNamed("actualDisbursementDate");
+            
             
this.loanEventApiJsonValidator.validateDisbursementDateWithMeetingDate(actualDisbursementDate,
 calendarInstance, 
                     scheduleGeneratorDTO.isSkipRepaymentOnFirstDayofMonth(), 
scheduleGeneratorDTO.getNumberOfdays());
         }
@@ -338,8 +339,6 @@ public class LoanWritePlatformServiceJpaRepositoryImpl 
implements LoanWritePlatf
         
         final Boolean 
isPaymnetypeApplicableforDisbursementCharge=configurationDomainService.isPaymnetypeApplicableforDisbursementCharge();
 
-        // Recalculate first repayment date based in actual disbursement date.
-        final LocalDate actualDisbursementDate = 
command.localDateValueOfParameterNamed("actualDisbursementDate");
         updateLoanCounters(loan, actualDisbursementDate);
         Money amountBeforeAdjust = loan.getPrincpal();
         loan.validateAccountStatus(LoanEvent.LOAN_DISBURSED);

Reply via email to