fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nazeer1100...@apache.org
Subject fineract git commit: FINERACT-498
Date Thu, 20 Jul 2017 09:52:38 GMT
Repository: fineract
Updated Branches:
  refs/heads/develop ee21ab8c5 -> a41bd8a84


FINERACT-498


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

Branch: refs/heads/develop
Commit: a41bd8a84da904f4c0900b7e64963c3c81833cf1
Parents: ee21ab8
Author: Nazeer Hussain Shaik <nazeer.shaik@confluxtechnologies.com>
Authored: Thu Jul 20 15:16:35 2017 +0530
Committer: Nazeer Hussain Shaik <nazeer.shaik@confluxtechnologies.com>
Committed: Thu Jul 20 15:16:35 2017 +0530

----------------------------------------------------------------------
 .../loanschedule/service/LoanScheduleAssembler.java            | 2 +-
 .../LoanApplicationWritePlatformServiceJpaRepositoryImpl.java  | 6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/fineract/blob/a41bd8a8/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleAssembler.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleAssembler.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleAssembler.java
index 1d62273..095da8a 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleAssembler.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleAssembler.java
@@ -537,7 +537,7 @@ public class LoanScheduleAssembler {
 
     public void validateDisbursementDateWithMeetingDates(final LocalDate expectedDisbursementDate,
final Calendar calendar, Boolean isSkipRepaymentOnFirstMonth, Integer numberOfDays) {
         // disbursement date should fall on a meeting date
-        if (!calendar.isValidRecurringDate(expectedDisbursementDate, isSkipRepaymentOnFirstMonth,
numberOfDays)) {
+        if (calendar != null && !calendar.isValidRecurringDate(expectedDisbursementDate,
isSkipRepaymentOnFirstMonth, numberOfDays)) {
             final String errorMessage = "Expected disbursement date '" + expectedDisbursementDate
+ "' do not fall on a meeting date";
             throw new LoanApplicationDateException("disbursement.date.do.not.match.meeting.date",
errorMessage, expectedDisbursementDate);
         }

http://git-wip-us.apache.org/repos/asf/fineract/blob/a41bd8a8/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApplicationWritePlatformServiceJpaRepositoryImpl.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApplicationWritePlatformServiceJpaRepositoryImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApplicationWritePlatformServiceJpaRepositoryImpl.java
index 8757e01..3b14a92 100755
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApplicationWritePlatformServiceJpaRepositoryImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApplicationWritePlatformServiceJpaRepositoryImpl.java
@@ -1086,7 +1086,11 @@ public class LoanApplicationWritePlatformServiceJpaRepositoryImpl implements
Loa
         if (loan.isSyncDisbursementWithMeeting() && (loan.isGroupLoan() || loan.isJLGLoan()))
{
             final CalendarInstance calendarInstance = this.calendarInstanceRepository.findCalendarInstaneByEntityId(loan.getId(),
                     CalendarEntityType.LOANS.getValue());
-            final Calendar calendar = calendarInstance.getCalendar();
+            Calendar calendar = null;
+            if (calendarInstance != null) {
+                calendar = calendarInstance.getCalendar();
+            }
+           // final Calendar calendar = calendarInstance.getCalendar();
             boolean isSkipRepaymentOnFirstMonthEnabled = this.configurationDomainService.isSkippingMeetingOnFirstDayOfMonthEnabled();
             if (isSkipRepaymentOnFirstMonthEnabled) {
                 isSkipRepaymentOnFirstMonth = this.loanUtilService.isLoanRepaymentsSyncWithMeeting(loan.group(),
calendar);


Mime
View raw message