FINERACT-498
This commit is contained in:
+1
-1
@@ -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);
|
||||
}
|
||||
|
||||
+5
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user