fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nazeer1100...@apache.org
Subject [1/2] incubator-fineract git commit: FINERACT-68:Validating for first repayment date while center rescheduling
Date Mon, 14 Mar 2016 10:52:18 GMT
Repository: incubator-fineract
Updated Branches:
  refs/heads/develop 4d6488eb0 -> bf6d0eaa5


FINERACT-68:Validating for first repayment date while center rescheduling


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

Branch: refs/heads/develop
Commit: 8331deb9bec67e1b72b639b8426242e6ac8a8b24
Parents: 7e9a759
Author: sachinkulkarni12 <sachin.kulkarni@confluxtechnologies.com>
Authored: Mon Mar 14 14:54:20 2016 +0530
Committer: sachinkulkarni12 <sachin.kulkarni@confluxtechnologies.com>
Committed: Mon Mar 14 14:54:20 2016 +0530

----------------------------------------------------------------------
 .../service/LoanWritePlatformServiceJpaRepositoryImpl.java     | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/8331deb9/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 bcdb3e0..5caaf67 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
@@ -83,6 +83,7 @@ import org.apache.fineract.portfolio.calendar.domain.CalendarInstance;
 import org.apache.fineract.portfolio.calendar.domain.CalendarInstanceRepository;
 import org.apache.fineract.portfolio.calendar.domain.CalendarRepository;
 import org.apache.fineract.portfolio.calendar.domain.CalendarType;
+import org.apache.fineract.portfolio.calendar.exception.CalendarParameterUpdateNotSupportedException;
 import org.apache.fineract.portfolio.charge.domain.Charge;
 import org.apache.fineract.portfolio.charge.domain.ChargePaymentMode;
 import org.apache.fineract.portfolio.charge.domain.ChargeRepositoryWrapper;
@@ -1985,6 +1986,11 @@ public class LoanWritePlatformServiceJpaRepositoryImpl implements LoanWritePlatf
         // loop through each loan to reschedule the repayment dates
         for (final Loan loan : loans) {
             if (loan != null) {
+                if(loan.getExpectedFirstRepaymentOnDate() != null && loan.getExpectedFirstRepaymentOnDate().equals(presentMeetingDate)){
+                    final String defaultUserMessage = "Meeting calendar date update is not
supported since its a first repayment date";
+                    throw new CalendarParameterUpdateNotSupportedException("meeting.for.first.repayment.date",
defaultUserMessage,
+                            loan.getExpectedFirstRepaymentOnDate(), presentMeetingDate);
+                }
                 holidays = this.holidayRepository.findByOfficeIdAndGreaterThanDate(loan.getOfficeId(),
loan.getDisbursementDate().toDate());
                 if (loan.repaymentScheduleDetail().isInterestRecalculationEnabled()) {
                     ScheduleGeneratorDTO scheduleGeneratorDTO = loanUtilService.buildScheduleGeneratorDTO(loan,
recalculateFrom);


Mime
View raw message