// meeting with daily frequency should allow loan products with any
// frequency.
if (!PeriodFrequencyType.DAYS.getValue().equals(meetingFrequency)) {
// repayment frequency must match with meeting frequency
if (!meetingFrequency.equals(repaymentFrequency)) {
throw new MeetingFrequencyMismatchException("loanapplication.repayment.frequency",
"Loan repayment frequency period must match that of meeting frequency period", repaymentFrequency);
} else if (meetingFrequency.equals(repaymentFrequency)) {
// repayment frequency is same as meeting frequency repayment
// interval should be same or multiple of meeting interval
if (repaymentInterval % meetingInterval != 0) {
// throw exception: Loan product frequency/interval
throw new MeetingFrequencyMismatchException("loanapplication.repayment.interval",
"Loan repayment repaid every # must equal or multiple of meeting interval " + meetingInterval, meetingInterval,
repaymentInterval);
}
}
}