MIFOSX-1464 spelling mistakes corrected
This commit is contained in:
+23
-23
@@ -152,7 +152,7 @@ public class LoanAccountData {
|
||||
|
||||
private final Boolean multiDisburseLoan;
|
||||
|
||||
private final Boolean canDefineInstalmentAmount;
|
||||
private final Boolean canDefineInstallmentAmount;
|
||||
|
||||
private final BigDecimal fixedEmiAmount;
|
||||
|
||||
@@ -265,7 +265,7 @@ public class LoanAccountData {
|
||||
final PortfolioAccountData linkedAccount = null;
|
||||
final Collection<DisbursementData> disbursementData = null;
|
||||
final Boolean multiDisburseLoan = null;
|
||||
final Boolean canDefineInstalmentAmount = null;
|
||||
final Boolean canDefineInstallmentAmount = null;
|
||||
final BigDecimal fixedEmiAmount = null;
|
||||
final BigDecimal maxOutstandingLoanBalance = null;
|
||||
final Collection<LoanTermVariationsData> emiAmountVariations = null;
|
||||
@@ -296,7 +296,7 @@ public class LoanAccountData {
|
||||
interestRateFrequencyTypeOptions, amortizationTypeOptions, interestTypeOptions, interestCalculationPeriodTypeOptions,
|
||||
fundOptions, chargeOptions, chargeTemplate, loanOfficerOptions, loanPurposeOptions, loanCollateralOptions, calendarOptions,
|
||||
syncDisbursementWithMeeting, loancounter, loanProductCounter, notes, accountLinkingOptions, linkedAccount,
|
||||
disbursementData, multiDisburseLoan, canDefineInstalmentAmount, fixedEmiAmount, maxOutstandingLoanBalance,
|
||||
disbursementData, multiDisburseLoan, canDefineInstallmentAmount, fixedEmiAmount, maxOutstandingLoanBalance,
|
||||
emiAmountVariations, memberVariations, product, inArrears, graceOnArrearsAgeing, overdueCharges, isNPA, daysInMonthType,
|
||||
daysInYearType, isInterestRecalculationEnabled, interestRecalculationData, originalSchedule,
|
||||
createStandingInstructionAtDisbursement, paidInAdvance);
|
||||
@@ -385,7 +385,7 @@ public class LoanAccountData {
|
||||
final PortfolioAccountData linkedAccount = null;
|
||||
final Collection<DisbursementData> disbursementData = null;
|
||||
final Boolean multiDisburseLoan = null;
|
||||
final Boolean canDefineInstalmentAmount = null;
|
||||
final Boolean canDefineInstallmentAmount = null;
|
||||
final BigDecimal fixedEmiAmount = null;
|
||||
final BigDecimal maxOutstandingLoanBalance = null;
|
||||
final Collection<LoanTermVariationsData> emiAmountVariations = null;
|
||||
@@ -416,7 +416,7 @@ public class LoanAccountData {
|
||||
interestRateFrequencyTypeOptions, amortizationTypeOptions, interestTypeOptions, interestCalculationPeriodTypeOptions,
|
||||
fundOptions, chargeOptions, chargeTemplate, loanOfficerOptions, loanPurposeOptions, loanCollateralOptions, calendarOptions,
|
||||
syncDisbursementWithMeeting, loancounter, loanProductCounter, notes, accountLinkingOptions, linkedAccount,
|
||||
disbursementData, multiDisburseLoan, canDefineInstalmentAmount, fixedEmiAmount, maxOutstandingLoanBalance,
|
||||
disbursementData, multiDisburseLoan, canDefineInstallmentAmount, fixedEmiAmount, maxOutstandingLoanBalance,
|
||||
emiAmountVariations, memberVariations, product, inArrears, graceOnArrearsAgeing, overdueCharges, isNPA, daysInMonthType,
|
||||
daysInYearType, isInterestRecalculationEnabled, interestRecalculationData, originalSchedule,
|
||||
createStandingInstructionAtDisbursement, paidInAdvance);
|
||||
@@ -440,7 +440,7 @@ public class LoanAccountData {
|
||||
acc.interestTypeOptions, acc.interestCalculationPeriodTypeOptions, acc.fundOptions, acc.chargeOptions, null,
|
||||
acc.loanOfficerOptions, acc.loanPurposeOptions, acc.loanCollateralOptions, acc.calendarOptions,
|
||||
acc.syncDisbursementWithMeeting, acc.loanCounter, acc.loanProductCounter, acc.notes, acc.accountLinkingOptions,
|
||||
acc.linkedAccount, acc.disbursementDetails, acc.multiDisburseLoan, acc.canDefineInstalmentAmount, acc.fixedEmiAmount,
|
||||
acc.linkedAccount, acc.disbursementDetails, acc.multiDisburseLoan, acc.canDefineInstallmentAmount, acc.fixedEmiAmount,
|
||||
acc.maxOutstandingLoanBalance, acc.emiAmountVariations, acc.memberVariations, acc.product, acc.inArrears,
|
||||
acc.graceOnArrearsAgeing, acc.overdueCharges, acc.isNPA, acc.daysInMonthType, acc.daysInYearType,
|
||||
acc.isInterestRecalculationEnabled, acc.interestRecalculationData, acc.originalSchedule,
|
||||
@@ -531,7 +531,7 @@ public class LoanAccountData {
|
||||
final PortfolioAccountData linkedAccount = null;
|
||||
final Collection<DisbursementData> disbursementData = null;
|
||||
final Boolean multiDisburseLoan = null;
|
||||
final Boolean canDefineInstalmentAmount = null;
|
||||
final Boolean canDefineInstallmentAmount = null;
|
||||
final BigDecimal fixedEmiAmount = null;
|
||||
final BigDecimal maxOutstandingBalance = null;
|
||||
final Collection<LoanTermVariationsData> emiAmountVariations = null;
|
||||
@@ -562,7 +562,7 @@ public class LoanAccountData {
|
||||
interestRateFrequencyTypeOptions, amortizationTypeOptions, interestTypeOptions, interestCalculationPeriodTypeOptions,
|
||||
fundOptions, chargeOptions, chargeTemplate, loanOfficerOptions, loanPurposeOptions, loanCollateralOptions, calendarOptions,
|
||||
syncDisbursementWithMeeting, loancounter, loanProductCounter, notes, accountLinkingOptions, linkedAccount,
|
||||
disbursementData, multiDisburseLoan, canDefineInstalmentAmount, fixedEmiAmount, maxOutstandingBalance, emiAmountVariations,
|
||||
disbursementData, multiDisburseLoan, canDefineInstallmentAmount, fixedEmiAmount, maxOutstandingBalance, emiAmountVariations,
|
||||
memberVariations, product, inArrears, graceOnArrearsAgeing, overdueCharges, isNPA, daysInMonthType, daysInYearType,
|
||||
isInterestRecalculationEnabled, interestRecalculationData, originalSchedule, createStandingInstructionAtDisbursement,
|
||||
paidInAdvance);
|
||||
@@ -586,7 +586,7 @@ public class LoanAccountData {
|
||||
acc.interestTypeOptions, acc.interestCalculationPeriodTypeOptions, acc.fundOptions, acc.chargeOptions, null,
|
||||
acc.loanOfficerOptions, acc.loanPurposeOptions, acc.loanCollateralOptions, acc.calendarOptions,
|
||||
acc.syncDisbursementWithMeeting, acc.loanCounter, acc.loanProductCounter, acc.notes, acc.accountLinkingOptions,
|
||||
acc.linkedAccount, acc.disbursementDetails, acc.multiDisburseLoan, acc.canDefineInstalmentAmount, acc.fixedEmiAmount,
|
||||
acc.linkedAccount, acc.disbursementDetails, acc.multiDisburseLoan, acc.canDefineInstallmentAmount, acc.fixedEmiAmount,
|
||||
acc.maxOutstandingLoanBalance, acc.emiAmountVariations, acc.memberVariations, acc.product, acc.inArrears,
|
||||
acc.graceOnArrearsAgeing, acc.overdueCharges, acc.isNPA, acc.daysInMonthType, acc.daysInYearType,
|
||||
acc.isInterestRecalculationEnabled, acc.interestRecalculationData, acc.originalSchedule,
|
||||
@@ -723,7 +723,7 @@ public class LoanAccountData {
|
||||
amortizationTypeOptions, interestTypeOptions, interestCalculationPeriodTypeOptions, fundOptions, chargeOptions,
|
||||
chargeTemplate, loanOfficerOptions, loanPurposeOptions, loanCollateralOptions, calendarOptions,
|
||||
syncDisbursementWithMeeting, loancounter, loanProductCounter, notes, accountLinkingOptions, linkedAccount,
|
||||
disbursementData, product.getMultiDisburseLoan(), product.canDefineInstalmentAmount(), fixedEmi,
|
||||
disbursementData, product.getMultiDisburseLoan(), product.canDefineInstallmentAmount(), fixedEmi,
|
||||
product.getOutstandingLoanBalance(), emiAmountVariations, memberVariations, product, inArrears,
|
||||
product.getGraceOnArrearsAgeing(), product.overdueFeeCharges(), isNPA, product.getDaysInMonthType(),
|
||||
product.getDaysInYearType(), product.isInterestRecalculationEnabled(), product.toLoanInterestRecalculationData(),
|
||||
@@ -779,7 +779,7 @@ public class LoanAccountData {
|
||||
interestCalculationPeriodTypeOptions, fundOptions, chargeOptions, chargeTemplate, loanOfficerOptions, loanPurposeOptions,
|
||||
loanCollateralOptions, calendarOptions, acc.syncDisbursementWithMeeting, acc.loanCounter, acc.loanProductCounter, notes,
|
||||
acc.accountLinkingOptions, acc.linkedAccount, acc.disbursementDetails, product.getMultiDisburseLoan(),
|
||||
product.canDefineInstalmentAmount(), acc.fixedEmiAmount, product.getOutstandingLoanBalance(), acc.emiAmountVariations,
|
||||
product.canDefineInstallmentAmount(), acc.fixedEmiAmount, product.getOutstandingLoanBalance(), acc.emiAmountVariations,
|
||||
acc.memberVariations, product, acc.inArrears, product.getGraceOnArrearsAgeing(), product.overdueFeeCharges(), acc.isNPA,
|
||||
product.getDaysInMonthType(), product.getDaysInYearType(), product.isInterestRecalculationEnabled(),
|
||||
product.toLoanInterestRecalculationData(), acc.originalSchedule, acc.createStandingInstructionAtDisbursement, paidInAdvance);
|
||||
@@ -804,7 +804,7 @@ public class LoanAccountData {
|
||||
final Integer graceOnInterestCharged, final LocalDate interestChargedFromDate, final LoanApplicationTimelineData timeline,
|
||||
final LoanSummaryData loanSummary, final BigDecimal feeChargesDueAtDisbursementCharged,
|
||||
final Boolean syncDisbursementWithMeeting, final Integer loancounter, final Integer loanProductCounter,
|
||||
final Boolean multiDisburseLoan, Boolean canDefineInstalmentAmount, final BigDecimal fixedEmiAmont,
|
||||
final Boolean multiDisburseLoan, Boolean canDefineInstallmentAmount, final BigDecimal fixedEmiAmont,
|
||||
final BigDecimal outstandingLoanBalance, final Boolean inArrears, final Integer graceOnArrearsAgeing, final Boolean isNPA,
|
||||
final EnumOptionData daysInMonthType, final EnumOptionData daysInYearType, final boolean isInterestRecalculationEnabled,
|
||||
final LoanInterestRecalculationData interestRecalculationData, final Boolean createStandingInstructionAtDisbursement) {
|
||||
@@ -856,7 +856,7 @@ public class LoanAccountData {
|
||||
amortizationTypeOptions, interestTypeOptions, interestCalculationPeriodTypeOptions, fundOptions, chargeOptions,
|
||||
chargeTemplate, loanOfficerOptions, loanPurposeOptions, loanCollateralOptions, calendarOptions,
|
||||
syncDisbursementWithMeeting, loancounter, loanProductCounter, notes, accountLinkingOptions, linkedAccount,
|
||||
disbursementData, multiDisburseLoan, canDefineInstalmentAmount, fixedEmiAmont, outstandingLoanBalance, emiAmountVariations,
|
||||
disbursementData, multiDisburseLoan, canDefineInstallmentAmount, fixedEmiAmont, outstandingLoanBalance, emiAmountVariations,
|
||||
memberVariations, product, inArrears, graceOnArrearsAgeing, overdueCharges, isNPA, daysInMonthType, daysInYearType,
|
||||
isInterestRecalculationEnabled, interestRecalculationData, originalSchedule, createStandingInstructionAtDisbursement,
|
||||
paidInAdvance);
|
||||
@@ -899,7 +899,7 @@ public class LoanAccountData {
|
||||
interestRateFrequencyTypeOptions, amortizationTypeOptions, interestTypeOptions, interestCalculationPeriodTypeOptions,
|
||||
fundOptions, chargeOptions, chargeTemplate, loanOfficerOptions, loanPurposeOptions, loanCollateralOptions, calendarOptions,
|
||||
acc.syncDisbursementWithMeeting, acc.loanCounter, acc.loanProductCounter, notes, accountLinkingOptions, linkedAccount,
|
||||
disbursementDetails, acc.multiDisburseLoan, acc.canDefineInstalmentAmount, acc.fixedEmiAmount,
|
||||
disbursementDetails, acc.multiDisburseLoan, acc.canDefineInstallmentAmount, acc.fixedEmiAmount,
|
||||
acc.maxOutstandingLoanBalance, emiAmountVariations, acc.memberVariations, acc.product, acc.inArrears,
|
||||
acc.graceOnArrearsAgeing, overdueCharges, acc.isNPA, acc.daysInMonthType, acc.daysInYearType,
|
||||
acc.isInterestRecalculationEnabled, acc.interestRecalculationData, acc.originalSchedule,
|
||||
@@ -935,7 +935,7 @@ public class LoanAccountData {
|
||||
acc.interestTypeOptions, acc.interestCalculationPeriodTypeOptions, acc.fundOptions, acc.chargeOptions, null,
|
||||
acc.loanOfficerOptions, acc.loanPurposeOptions, acc.loanCollateralOptions, acc.calendarOptions,
|
||||
acc.syncDisbursementWithMeeting, acc.loanCounter, acc.loanProductCounter, acc.notes, acc.accountLinkingOptions,
|
||||
acc.linkedAccount, acc.disbursementDetails, acc.multiDisburseLoan, acc.canDefineInstalmentAmount, acc.fixedEmiAmount,
|
||||
acc.linkedAccount, acc.disbursementDetails, acc.multiDisburseLoan, acc.canDefineInstallmentAmount, acc.fixedEmiAmount,
|
||||
acc.maxOutstandingLoanBalance, acc.emiAmountVariations, acc.memberVariations, acc.product, acc.inArrears,
|
||||
acc.graceOnArrearsAgeing, acc.overdueCharges, acc.isNPA, acc.daysInMonthType, acc.daysInYearType,
|
||||
acc.isInterestRecalculationEnabled, acc.interestRecalculationData, acc.originalSchedule,
|
||||
@@ -996,7 +996,7 @@ public class LoanAccountData {
|
||||
acc.interestTypeOptions, acc.interestCalculationPeriodTypeOptions, acc.fundOptions, acc.chargeOptions, null,
|
||||
acc.loanOfficerOptions, acc.loanPurposeOptions, acc.loanCollateralOptions, acc.calendarOptions,
|
||||
acc.syncDisbursementWithMeeting, acc.loanCounter, acc.loanProductCounter, acc.notes, acc.accountLinkingOptions,
|
||||
acc.linkedAccount, acc.disbursementDetails, acc.multiDisburseLoan, acc.canDefineInstalmentAmount, acc.fixedEmiAmount,
|
||||
acc.linkedAccount, acc.disbursementDetails, acc.multiDisburseLoan, acc.canDefineInstallmentAmount, acc.fixedEmiAmount,
|
||||
acc.maxOutstandingLoanBalance, acc.emiAmountVariations, memberVariations, acc.product, acc.inArrears,
|
||||
acc.graceOnArrearsAgeing, acc.overdueCharges, acc.isNPA, acc.daysInMonthType, acc.daysInYearType,
|
||||
acc.isInterestRecalculationEnabled, acc.interestRecalculationData, acc.originalSchedule,
|
||||
@@ -1023,7 +1023,7 @@ public class LoanAccountData {
|
||||
acc.interestTypeOptions, acc.interestCalculationPeriodTypeOptions, acc.fundOptions, acc.chargeOptions, null,
|
||||
acc.loanOfficerOptions, acc.loanPurposeOptions, acc.loanCollateralOptions, acc.calendarOptions,
|
||||
acc.syncDisbursementWithMeeting, acc.loanCounter, acc.loanProductCounter, acc.notes, acc.accountLinkingOptions,
|
||||
acc.linkedAccount, acc.disbursementDetails, acc.multiDisburseLoan, acc.canDefineInstalmentAmount, acc.fixedEmiAmount,
|
||||
acc.linkedAccount, acc.disbursementDetails, acc.multiDisburseLoan, acc.canDefineInstallmentAmount, acc.fixedEmiAmount,
|
||||
acc.maxOutstandingLoanBalance, acc.emiAmountVariations, acc.memberVariations, acc.product, acc.inArrears,
|
||||
acc.graceOnArrearsAgeing, acc.overdueCharges, acc.isNPA, acc.daysInMonthType, acc.daysInYearType,
|
||||
acc.isInterestRecalculationEnabled, interestRecalculationData, acc.originalSchedule,
|
||||
@@ -1048,7 +1048,7 @@ public class LoanAccountData {
|
||||
acc.interestTypeOptions, acc.interestCalculationPeriodTypeOptions, acc.fundOptions, acc.chargeOptions, null,
|
||||
acc.loanOfficerOptions, acc.loanPurposeOptions, acc.loanCollateralOptions, acc.calendarOptions,
|
||||
acc.syncDisbursementWithMeeting, acc.loanCounter, acc.loanProductCounter, acc.notes, acc.accountLinkingOptions,
|
||||
acc.linkedAccount, acc.disbursementDetails, acc.multiDisburseLoan, acc.canDefineInstalmentAmount, acc.fixedEmiAmount,
|
||||
acc.linkedAccount, acc.disbursementDetails, acc.multiDisburseLoan, acc.canDefineInstallmentAmount, acc.fixedEmiAmount,
|
||||
acc.maxOutstandingLoanBalance, acc.emiAmountVariations, acc.memberVariations, acc.product, acc.inArrears,
|
||||
acc.graceOnArrearsAgeing, acc.overdueCharges, acc.isNPA, acc.daysInMonthType, acc.daysInYearType,
|
||||
acc.isInterestRecalculationEnabled, acc.interestRecalculationData, originalSchedule,
|
||||
@@ -1107,7 +1107,7 @@ public class LoanAccountData {
|
||||
final Boolean syncDisbursementWithMeeting, final Integer loanCounter, final Integer loanProductCounter,
|
||||
final Collection<NoteData> notes, final Collection<PortfolioAccountData> accountLinkingOptions,
|
||||
final PortfolioAccountData linkedAccount, final Collection<DisbursementData> disbursementDetails,
|
||||
final Boolean multiDisburseLoan, final Boolean canDefineInstalmentAmount, BigDecimal fixedEmiAmount,
|
||||
final Boolean multiDisburseLoan, final Boolean canDefineInstallmentAmount, BigDecimal fixedEmiAmount,
|
||||
final BigDecimal maxOutstandingLoanBalance, final Collection<LoanTermVariationsData> emiAmountVariations,
|
||||
final Map<Long, LoanBorrowerCycleData> memberVariations, final LoanProductData product, final Boolean inArrears,
|
||||
final Integer graceOnArrearsAgeing, final Collection<ChargeData> overdueCharges, final Boolean isNPA,
|
||||
@@ -1235,13 +1235,13 @@ public class LoanAccountData {
|
||||
this.disbursementDetails = disbursementDetails;
|
||||
this.multiDisburseLoan = multiDisburseLoan;
|
||||
|
||||
Boolean canDefineEMIAmount = canDefineInstalmentAmount;
|
||||
if (canDefineInstalmentAmount == null) {
|
||||
Boolean canDefineEMIAmount = canDefineInstallmentAmount;
|
||||
if (canDefineInstallmentAmount == null) {
|
||||
canDefineEMIAmount = multiDisburseLoan;
|
||||
} else if (multiDisburseLoan != null) {
|
||||
canDefineEMIAmount = canDefineInstalmentAmount || multiDisburseLoan;
|
||||
canDefineEMIAmount = canDefineInstallmentAmount || multiDisburseLoan;
|
||||
}
|
||||
this.canDefineInstalmentAmount = canDefineEMIAmount;
|
||||
this.canDefineInstallmentAmount = canDefineEMIAmount;
|
||||
this.fixedEmiAmount = fixedEmiAmount;
|
||||
this.maxOutstandingLoanBalance = maxOutstandingLoanBalance;
|
||||
|
||||
|
||||
+6
-6
@@ -1405,7 +1405,7 @@ public class Loan extends AbstractPersistable<Long> {
|
||||
this.disbursementDetails.clear();
|
||||
}
|
||||
|
||||
if (loanProduct.isMultiDisburseLoan() || loanProduct.canDefineInstalmentAmount()) {
|
||||
if (loanProduct.isMultiDisburseLoan() || loanProduct.canDefineInstallmentAmount ()) {
|
||||
if (command.isChangeInBigDecimalParameterNamed(LoanApiConstants.emiAmountParameterName, this.fixedEmiAmount)) {
|
||||
this.fixedEmiAmount = command.bigDecimalValueOfParameterNamed(LoanApiConstants.emiAmountParameterName);
|
||||
actualChanges.put(LoanApiConstants.emiAmountParameterName, this.fixedEmiAmount);
|
||||
@@ -2071,7 +2071,7 @@ public class Loan extends AbstractPersistable<Long> {
|
||||
public void regenerateScheduleOnDisbursement(final ScheduleGeneratorDTO scheduleGeneratorDTO, final boolean recalculateSchedule,
|
||||
final LocalDate actualDisbursementDate, BigDecimal emiAmount, final AppUser currentUser) {
|
||||
boolean isEmiAmountChanged = false;
|
||||
if ((this.loanProduct.isMultiDisburseLoan() || this.loanProduct.canDefineInstalmentAmount()) && emiAmount != null
|
||||
if ((this.loanProduct.isMultiDisburseLoan() || this.loanProduct.canDefineInstallmentAmount ()) && emiAmount != null
|
||||
&& emiAmount.compareTo(retriveLastEmiAmount()) != 0) {
|
||||
if (this.loanProduct.isMultiDisburseLoan()) {
|
||||
LoanTermVariations loanVariationTerms = new LoanTermVariations(LoanTermVariationType.EMI_AMOUNT.getValue(),
|
||||
@@ -2316,7 +2316,7 @@ public class Loan extends AbstractPersistable<Long> {
|
||||
getExpectedFirstRepaymentOnDate(), scheduleGeneratorDTO.getCalculatedRepaymentsStartingFromDate(), getInArrearsTolerance(),
|
||||
this.loanRepaymentScheduleDetail, this.loanProduct.isMultiDisburseLoan(), this.fixedEmiAmount, disbursementData,
|
||||
this.maxOutstandingLoanBalance, loanVariationTermsData, getInterestChargedFromDate(),
|
||||
this.loanProduct.getPrincipalThresholdForLastInstalment(), this.loanProduct.getInstalmentAmountInMultiplesOf());
|
||||
this.loanProduct.getPrincipalThresholdForLastInstalment(), this.loanProduct.getInstallmentAmountInMultiplesOf());
|
||||
|
||||
final LoanScheduleModel loanSchedule = loanScheduleGenerator.generate(mc, loanApplicationTerms, charges(),
|
||||
scheduleGeneratorDTO.getHolidayDetailDTO());
|
||||
@@ -4650,7 +4650,7 @@ public class Loan extends AbstractPersistable<Long> {
|
||||
this.loanProduct.isMultiDisburseLoan(), this.fixedEmiAmount, disbursementData, this.maxOutstandingLoanBalance,
|
||||
loanVariationTermsData, getInterestChargedFromDate(), this.loanInterestRecalculationDetails,
|
||||
calendarInstanceForInterestRecalculation, recalculationFrequencyType,
|
||||
this.loanProduct.getPrincipalThresholdForLastInstalment(), this.loanProduct.getInstalmentAmountInMultiplesOf());
|
||||
this.loanProduct.getPrincipalThresholdForLastInstalment(), this.loanProduct.getInstallmentAmountInMultiplesOf());
|
||||
return loanApplicationTerms;
|
||||
}
|
||||
|
||||
@@ -4694,7 +4694,7 @@ public class Loan extends AbstractPersistable<Long> {
|
||||
loanTermPeriodFrequencyType, nthDayType, dayOfWeekType, getDisbursementDate(), getExpectedFirstRepaymentOnDate(), null,
|
||||
getInArrearsTolerance(), this.loanRepaymentScheduleDetail, this.loanProduct.isMultiDisburseLoan(), this.fixedEmiAmount,
|
||||
disbursementData, this.maxOutstandingLoanBalance, loanVariationTermsData, getInterestChargedFromDate(),
|
||||
this.loanProduct.getPrincipalThresholdForLastInstalment(), this.loanProduct.getInstalmentAmountInMultiplesOf());
|
||||
this.loanProduct.getPrincipalThresholdForLastInstalment(), this.loanProduct.getInstallmentAmountInMultiplesOf());
|
||||
|
||||
installment = loanScheduleGenerator.calculatePrepaymentAmount(this.repaymentScheduleInstallments, getCurrency(),
|
||||
LocalDate.now(), getInterestChargedFromDate(), loanApplicationTerms, mc, charges());
|
||||
@@ -4896,7 +4896,7 @@ public class Loan extends AbstractPersistable<Long> {
|
||||
dayOfWeekType, expectedDisbursementDate, repaymentsStartingFromDate, calculatedRepaymentsStartingFromDate,
|
||||
inArrearsToleranceMoney, this.loanRepaymentScheduleDetail, loanProduct.isMultiDisburseLoan(), emiAmount, disbursementData,
|
||||
maxOutstandingBalance, loanVariationTermsData, interestChargedFromDate,
|
||||
this.loanProduct.getPrincipalThresholdForLastInstalment(), this.loanProduct.getInstalmentAmountInMultiplesOf());
|
||||
this.loanProduct.getPrincipalThresholdForLastInstalment(), this.loanProduct.getInstallmentAmountInMultiplesOf());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+12
-12
@@ -135,7 +135,7 @@ public final class LoanApplicationTerms {
|
||||
private final RecalculationFrequencyType recalculationFrequencyType;
|
||||
|
||||
private final BigDecimal principalThresholdForLastInstalment;
|
||||
private final Integer instalmentAmountInMultiplesOf;
|
||||
private final Integer installmentAmountInMultiplesOf;
|
||||
|
||||
public static LoanApplicationTerms assembleFrom(final ApplicationCurrency currency, final Integer loanTermFrequency,
|
||||
final PeriodFrequencyType loanTermPeriodFrequencyType, final Integer numberOfRepayments, final Integer repaymentEvery,
|
||||
@@ -150,7 +150,7 @@ public final class LoanApplicationTerms {
|
||||
final List<DisbursementData> disbursementDatas, final BigDecimal maxOutstandingBalance,
|
||||
final List<LoanTermVariationsData> emiAmountVariations, final Integer graceOnArrearsAgeing,
|
||||
final DaysInMonthType daysInMonthType, final DaysInYearType daysInYearType, final boolean isInterestRecalculationEnabled,
|
||||
BigDecimal principalThresholdForLastInstalment, Integer instalmentAmountInMultiplesOf) {
|
||||
BigDecimal principalThresholdForLastInstalment, Integer installmentAmountInMultiplesOf) {
|
||||
|
||||
final LoanRescheduleStrategyMethod rescheduleStrategyMethod = null;
|
||||
final InterestRecalculationCompoundingMethod interestRecalculationCompoundingMethod = null;
|
||||
@@ -163,7 +163,7 @@ public final class LoanApplicationTerms {
|
||||
graceOnInterestPayment, graceOnInterestCharged, interestChargedFromDate, inArrearsTolerance, multiDisburseLoan, emiAmount,
|
||||
disbursementDatas, maxOutstandingBalance, emiAmountVariations, graceOnArrearsAgeing, daysInMonthType, daysInYearType,
|
||||
isInterestRecalculationEnabled, rescheduleStrategyMethod, interestRecalculationCompoundingMethod, restCalendarInstance,
|
||||
recalculationFrequencyType, principalThresholdForLastInstalment, instalmentAmountInMultiplesOf);
|
||||
recalculationFrequencyType, principalThresholdForLastInstalment, installmentAmountInMultiplesOf);
|
||||
}
|
||||
|
||||
public static LoanApplicationTerms assembleFrom(final ApplicationCurrency applicationCurrency, final Integer loanTermFrequency,
|
||||
@@ -173,7 +173,7 @@ public final class LoanApplicationTerms {
|
||||
final LoanProductRelatedDetail loanProductRelatedDetail, final boolean multiDisburseLoan, final BigDecimal emiAmount,
|
||||
final List<DisbursementData> disbursementDatas, final BigDecimal maxOutstandingBalance,
|
||||
final List<LoanTermVariationsData> emiAmountVariations, final LocalDate interestChargedFromDate,
|
||||
final BigDecimal principalThresholdForLastInstalment, Integer instalmentAmountInMultiplesOf) {
|
||||
final BigDecimal principalThresholdForLastInstalment, Integer installmentAmountInMultiplesOf) {
|
||||
|
||||
final Integer numberOfRepayments = loanProductRelatedDetail.getNumberOfRepayments();
|
||||
final Integer repaymentEvery = loanProductRelatedDetail.getRepayEvery();
|
||||
@@ -209,7 +209,7 @@ public final class LoanApplicationTerms {
|
||||
multiDisburseLoan, emiAmount, disbursementDatas, maxOutstandingBalance, emiAmountVariations,
|
||||
loanProductRelatedDetail.getGraceOnDueDate(), daysInMonthType, daysInYearType, isInterestRecalculationEnabled,
|
||||
rescheduleStrategyMethod, interestRecalculationCompoundingMethod, restCalendarInstance, recalculationFrequencyType,
|
||||
principalThresholdForLastInstalment, instalmentAmountInMultiplesOf);
|
||||
principalThresholdForLastInstalment, installmentAmountInMultiplesOf);
|
||||
}
|
||||
|
||||
public static LoanApplicationTerms assembleFrom(final ApplicationCurrency applicationCurrency, final Integer loanTermFrequency,
|
||||
@@ -220,7 +220,7 @@ public final class LoanApplicationTerms {
|
||||
final List<LoanTermVariationsData> emiAmountVariations, final LocalDate interestChargedFromDate,
|
||||
final LoanInterestRecalculationDetails interestRecalculationDetails, final CalendarInstance restCalendarInstance,
|
||||
final RecalculationFrequencyType recalculationFrequencyType, final BigDecimal principalThresholdForLastInstalment,
|
||||
Integer instalmentAmountInMultiplesOf) {
|
||||
Integer installmentAmountInMultiplesOf) {
|
||||
|
||||
final Integer numberOfRepayments = loanProductRelatedDetail.getNumberOfRepayments();
|
||||
final Integer repaymentEvery = loanProductRelatedDetail.getRepayEvery();
|
||||
@@ -258,7 +258,7 @@ public final class LoanApplicationTerms {
|
||||
disbursementDatas, maxOutstandingBalance, emiAmountVariations, loanProductRelatedDetail.getGraceOnDueDate(),
|
||||
daysInMonthType, daysInYearType, isInterestRecalculationEnabled, rescheduleStrategyMethod,
|
||||
interestRecalculationCompoundingMethod, restCalendarInstance, recalculationFrequencyType,
|
||||
principalThresholdForLastInstalment, instalmentAmountInMultiplesOf);
|
||||
principalThresholdForLastInstalment, installmentAmountInMultiplesOf);
|
||||
}
|
||||
|
||||
public static LoanApplicationTerms assembleFrom(final Integer repaymentEvery, final PeriodFrequencyType repaymentPeriodFrequencyType,
|
||||
@@ -277,7 +277,7 @@ public final class LoanApplicationTerms {
|
||||
applicationTerms.interestRecalculationEnabled, applicationTerms.rescheduleStrategyMethod,
|
||||
applicationTerms.interestRecalculationCompoundingMethod, applicationTerms.restCalendarInstance,
|
||||
applicationTerms.recalculationFrequencyType, applicationTerms.principalThresholdForLastInstalment,
|
||||
applicationTerms.instalmentAmountInMultiplesOf);
|
||||
applicationTerms.installmentAmountInMultiplesOf);
|
||||
}
|
||||
|
||||
private LoanApplicationTerms(final ApplicationCurrency currency, final Integer loanTermFrequency,
|
||||
@@ -295,7 +295,7 @@ public final class LoanApplicationTerms {
|
||||
final boolean isInterestRecalculationEnabled, final LoanRescheduleStrategyMethod rescheduleStrategyMethod,
|
||||
final InterestRecalculationCompoundingMethod interestRecalculationCompoundingMethod,
|
||||
final CalendarInstance restCalendarInstance, final RecalculationFrequencyType recalculationFrequencyType,
|
||||
final BigDecimal principalThresholdForLastInstalment, final Integer instalmentAmountInMultiplesOf) {
|
||||
final BigDecimal principalThresholdForLastInstalment, final Integer installmentAmountInMultiplesOf) {
|
||||
this.currency = currency;
|
||||
this.loanTermFrequency = loanTermFrequency;
|
||||
this.loanTermPeriodFrequencyType = loanTermPeriodFrequencyType;
|
||||
@@ -338,7 +338,7 @@ public final class LoanApplicationTerms {
|
||||
this.restCalendarInstance = restCalendarInstance;
|
||||
this.recalculationFrequencyType = recalculationFrequencyType;
|
||||
this.principalThresholdForLastInstalment = principalThresholdForLastInstalment;
|
||||
this.instalmentAmountInMultiplesOf = instalmentAmountInMultiplesOf;
|
||||
this.installmentAmountInMultiplesOf = installmentAmountInMultiplesOf;
|
||||
}
|
||||
|
||||
public Money adjustPrincipalIfLastRepaymentPeriod(final Money principalForPeriod, final Money totalCumulativePrincipalToDate,
|
||||
@@ -817,8 +817,8 @@ public final class LoanApplicationTerms {
|
||||
double installmentAmount = FinanicalFunctions.pmt(periodicInterestRate.doubleValue(), periodsRemaining.doubleValue(),
|
||||
principalDouble, futureValue, false);
|
||||
|
||||
if (this.instalmentAmountInMultiplesOf != null) {
|
||||
installmentAmount = Money.roundToMultiplesOf(installmentAmount, this.instalmentAmountInMultiplesOf);
|
||||
if (this.installmentAmountInMultiplesOf != null) {
|
||||
installmentAmount = Money.roundToMultiplesOf(installmentAmount, this.installmentAmountInMultiplesOf);
|
||||
}
|
||||
setFixedEmiAmount(BigDecimal.valueOf(installmentAmount));
|
||||
}
|
||||
|
||||
+2
-2
@@ -251,7 +251,7 @@ public class LoanScheduleAssembler {
|
||||
final boolean isInterestRecalculationEnabled = loanProduct.isInterestRecalculationEnabled();
|
||||
|
||||
final BigDecimal principalThresholdForLastInstalment = loanProduct.getPrincipalThresholdForLastInstalment();
|
||||
final Integer instalmentAmountInMultiplesOf = loanProduct.getInstalmentAmountInMultiplesOf();
|
||||
final Integer installmentAmountInMultiplesOf= loanProduct.getInstallmentAmountInMultiplesOf();
|
||||
|
||||
return LoanApplicationTerms.assembleFrom(applicationCurrency, loanTermFrequency, loanTermPeriodFrequencyType, numberOfRepayments,
|
||||
repaymentEvery, repaymentPeriodFrequencyType, nthDay, weekDayType, amortizationMethod, interestMethod,
|
||||
@@ -260,7 +260,7 @@ public class LoanScheduleAssembler {
|
||||
graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, interestChargedFromDate, inArrearsToleranceMoney,
|
||||
loanProduct.isMultiDisburseLoan(), emiAmount, disbursementDatas, maxOutstandingBalance, loanVariationTermsData,
|
||||
graceOnArrearsAgeing, daysInMonthType, daysInYearType, isInterestRecalculationEnabled, principalThresholdForLastInstalment,
|
||||
instalmentAmountInMultiplesOf);
|
||||
installmentAmountInMultiplesOf);
|
||||
}
|
||||
|
||||
private List<DisbursementData> fetchDisbursementData(final JsonObject command) {
|
||||
|
||||
+2
-2
@@ -363,7 +363,7 @@ public final class LoanApplicationCommandFromApiJsonHelper {
|
||||
}
|
||||
|
||||
if (this.fromApiJsonHelper.parameterExists(LoanApiConstants.emiAmountParameterName, element)) {
|
||||
if (!(loanProduct.canDefineInstalmentAmount() || loanProduct.isMultiDisburseLoan())) {
|
||||
if (!(loanProduct.canDefineInstallmentAmount() || loanProduct.isMultiDisburseLoan())) {
|
||||
List<String> unsupportedParameterList = new ArrayList<>();
|
||||
unsupportedParameterList.add(LoanApiConstants.emiAmountParameterName);
|
||||
throw new UnsupportedParameterException(unsupportedParameterList);
|
||||
@@ -711,7 +711,7 @@ public final class LoanApplicationCommandFromApiJsonHelper {
|
||||
}
|
||||
|
||||
if (this.fromApiJsonHelper.parameterExists(LoanApiConstants.emiAmountParameterName, element)) {
|
||||
if (!(loanProduct.canDefineInstalmentAmount() || loanProduct.isMultiDisburseLoan())) {
|
||||
if (!(loanProduct.canDefineInstallmentAmount() || loanProduct.isMultiDisburseLoan())) {
|
||||
List<String> unsupportedParameterList = new ArrayList<>();
|
||||
unsupportedParameterList.add(LoanApiConstants.emiAmountParameterName);
|
||||
throw new UnsupportedParameterException(unsupportedParameterList);
|
||||
|
||||
+1
-1
@@ -199,7 +199,7 @@ public class LoanAssembler {
|
||||
final EnumOptionData loanType = AccountEnumerations.loanType(loanTypeStr);
|
||||
Set<LoanDisbursementDetails> disbursementDetails = null;
|
||||
BigDecimal fixedEmiAmount = null;
|
||||
if (loanProduct.isMultiDisburseLoan() || loanProduct.canDefineInstalmentAmount()) {
|
||||
if (loanProduct.isMultiDisburseLoan() || loanProduct.canDefineInstallmentAmount()) {
|
||||
fixedEmiAmount = this.fromApiJsonHelper.extractBigDecimalWithLocaleNamed(LoanApiConstants.emiAmountParameterName, element);
|
||||
}
|
||||
BigDecimal maxOutstandingLoanBalance = null;
|
||||
|
||||
+3
-3
@@ -501,7 +501,7 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService {
|
||||
+ " l.loan_type_enum as loanType, l.loanpurpose_cv_id as loanPurposeId, cv.code_value as loanPurposeName,"
|
||||
+ " lp.id as loanProductId, lp.name as loanProductName, lp.description as loanProductDescription,"
|
||||
+ " lp.allow_multiple_disbursals as multiDisburseLoan,"
|
||||
+ " lp.can_define_fixed_emi_amount as canDefineInstalmentAmount,"
|
||||
+ " lp.can_define_fixed_emi_amount as canDefineInstallmentAmount,"
|
||||
+ " c.id as clientId, c.display_name as clientName, c.office_id as clientOfficeId,"
|
||||
+ " g.id as groupId, g.display_name as groupName,"
|
||||
+ " g.office_id as groupOfficeId, g.staff_id As groupStaffId , g.parent_id as groupParentId, "
|
||||
@@ -631,7 +631,7 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService {
|
||||
final String loanProductName = rs.getString("loanProductName");
|
||||
final String loanProductDescription = rs.getString("loanProductDescription");
|
||||
final Boolean multiDisburseLoan = rs.getBoolean("multiDisburseLoan");
|
||||
final Boolean canDefineInstalmentAmount = rs.getBoolean("canDefineInstalmentAmount");
|
||||
final Boolean canDefineInstallmentAmount = rs.getBoolean("canDefineInstallmentAmount");
|
||||
final BigDecimal outstandingLoanBalance = rs.getBigDecimal("outstandingLoanBalance");
|
||||
|
||||
final LocalDate submittedOnDate = JdbcSupport.getLocalDate(rs, "submittedOnDate");
|
||||
@@ -837,7 +837,7 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService {
|
||||
amortizationType, interestRatePerPeriod, interestRateFrequencyType, annualInterestRate, interestType,
|
||||
interestCalculationPeriodType, expectedFirstRepaymentOnDate, graceOnPrincipalPayment, graceOnInterestPayment,
|
||||
graceOnInterestCharged, interestChargedFromDate, timeline, loanSummary, feeChargesDueAtDisbursementCharged,
|
||||
syncDisbursementWithMeeting, loanCounter, loanProductCounter, multiDisburseLoan, canDefineInstalmentAmount,
|
||||
syncDisbursementWithMeeting, loanCounter, loanProductCounter, multiDisburseLoan, canDefineInstallmentAmount,
|
||||
fixedEmiAmount, outstandingLoanBalance, inArrears, graceOnArrearsAgeing, isNPA, daysInMonthType,
|
||||
daysInYearType, isInterestRecalculationEnabled, interestRecalculationData, createStandingInstructionAtDisbursement);
|
||||
}
|
||||
|
||||
+2
-2
@@ -86,7 +86,7 @@ public interface LoanProductConstants {
|
||||
public static final BigDecimal DEFAULT_PRINCIPAL_THRESHOLD_FOR_MULTI_DISBURSE_LOAN = BigDecimal.valueOf(50);
|
||||
public static final BigDecimal DEFAULT_PRINCIPAL_THRESHOLD_FOR_SINGLE_DISBURSE_LOAN = BigDecimal.valueOf(0);
|
||||
// Fixed installment configuration related
|
||||
public static final String canDefineEmiAmountParamName = "canDefineInstalmentAmount";
|
||||
public static final String instalmentAmountInMultiplesOfParamName = "instalmentAmountInMultiplesOf";
|
||||
public static final String canDefineEmiAmountParamName = "canDefineInstallmentAmount";
|
||||
public static final String installmentAmountInMultiplesOfParamName = "installmentAmountInMultiplesOf";
|
||||
|
||||
}
|
||||
|
||||
+21
-21
@@ -84,8 +84,8 @@ public class LoanProductData {
|
||||
private final boolean isInterestRecalculationEnabled;
|
||||
private final LoanProductInterestRecalculationData interestRecalculationData;
|
||||
private final Integer minimumDaysBetweenDisbursalAndFirstRepayment;
|
||||
private final boolean canDefineInstalmentAmount;
|
||||
private final Integer instalmentAmountInMultiplesOf;
|
||||
private final boolean canDefineInstallmentAmount;
|
||||
private final Integer installmentAmountInMultiplesOf;
|
||||
|
||||
// charges
|
||||
private final Collection<ChargeData> charges;
|
||||
@@ -199,8 +199,8 @@ public class LoanProductData {
|
||||
final boolean isInterestRecalculationEnabled = false;
|
||||
final LoanProductInterestRecalculationData interestRecalculationData = null;
|
||||
final Integer minimumDaysBetweenDisbursalAndFirstRepayment = null;
|
||||
final boolean canDefineInstalmentAmount = false;
|
||||
final Integer instalmentAmountInMultiplesOf = null;
|
||||
final boolean canDefineInstallmentAmount = false;
|
||||
final Integer installmentAmountInMultiplesOf = null;
|
||||
|
||||
return new LoanProductData(id, name, shortName, description, currency, principal, minPrincipal, maxPrincipal, tolerance,
|
||||
numberOfRepayments, minNumberOfRepayments, maxNumberOfRepayments, repaymentEvery, interestRatePerPeriod,
|
||||
@@ -211,8 +211,8 @@ public class LoanProductData {
|
||||
interestRateVariations, numberOfRepaymentVariations, multiDisburseLoan, maxTrancheCount, outstandingLoanBalance,
|
||||
graceOnArrearsAgeing, overdueDaysForNPA, daysInMonthType, daysInYearType, isInterestRecalculationEnabled,
|
||||
interestRecalculationData, minimumDaysBetweenDisbursalAndFirstRepayment, holdGuaranteeFunds, productGuaranteeData,
|
||||
principalThresholdForLastInstalment, accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineInstalmentAmount,
|
||||
instalmentAmountInMultiplesOf);
|
||||
principalThresholdForLastInstalment, accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineInstallmentAmount,
|
||||
installmentAmountInMultiplesOf);
|
||||
}
|
||||
|
||||
public static LoanProductData lookupWithCurrency(final Long id, final String name, final CurrencyData currency) {
|
||||
@@ -270,8 +270,8 @@ public class LoanProductData {
|
||||
final LoanProductGuaranteeData productGuaranteeData = null;
|
||||
final BigDecimal principalThresholdForLastInstalment = null;
|
||||
final boolean accountMovesOutOfNPAOnlyOnArrearsCompletion = false;
|
||||
final boolean canDefineInstalmentAmount = false;
|
||||
final Integer instalmentAmountInMultiplesOf = null;
|
||||
final boolean canDefineInstallmentAmount = false;
|
||||
final Integer installmentAmountInMultiplesOf = null;
|
||||
|
||||
return new LoanProductData(id, name, shortName, description, currency, principal, minPrincipal, maxPrincipal, tolerance,
|
||||
numberOfRepayments, minNumberOfRepayments, maxNumberOfRepayments, repaymentEvery, interestRatePerPeriod,
|
||||
@@ -282,8 +282,8 @@ public class LoanProductData {
|
||||
interestRateVariations, numberOfRepaymentVariations, multiDisburseLoan, maxTrancheCount, outstandingLoanBalance,
|
||||
graceOnArrearsAgeing, overdueDaysForNPA, daysInMonthType, daysInYearType, isInterestRecalculationEnabled,
|
||||
interestRecalculationData, minimumDaysBetweenDisbursalAndFirstRepayment, holdGuaranteeFunds, productGuaranteeData,
|
||||
principalThresholdForLastInstalment, accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineInstalmentAmount,
|
||||
instalmentAmountInMultiplesOf);
|
||||
principalThresholdForLastInstalment, accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineInstallmentAmount,
|
||||
installmentAmountInMultiplesOf);
|
||||
}
|
||||
|
||||
public static LoanProductData sensibleDefaultsForNewLoanProductCreation() {
|
||||
@@ -348,8 +348,8 @@ public class LoanProductData {
|
||||
final LoanProductGuaranteeData productGuaranteeData = null;
|
||||
final BigDecimal principalThresholdForLastInstalment = null;
|
||||
final boolean accountMovesOutOfNPAOnlyOnArrearsCompletion = false;
|
||||
final boolean canDefineInstalmentAmount = false;
|
||||
final Integer instalmentAmountInMultiplesOf = null;
|
||||
final boolean canDefineInstallmentAmount = false;
|
||||
final Integer installmentAmountInMultiplesOf = null;
|
||||
|
||||
return new LoanProductData(id, name, shortName, description, currency, principal, minPrincipal, maxPrincipal, tolerance,
|
||||
numberOfRepayments, minNumberOfRepayments, maxNumberOfRepayments, repaymentEvery, interestRatePerPeriod,
|
||||
@@ -361,7 +361,7 @@ public class LoanProductData {
|
||||
multiDisburseLoan, maxTrancheCount, outstandingLoanBalance, graceOnArrearsAgeing, overdueDaysForNPA, daysInMonthType,
|
||||
daysInYearType, isInterestRecalculationEnabled, interestRecalculationData, minimumDaysBetweenDisbursalAndFirstRepayment,
|
||||
holdGuaranteeFunds, productGuaranteeData, principalThresholdForLastInstalment, accountMovesOutOfNPAOnlyOnArrearsCompletion,
|
||||
canDefineInstalmentAmount, instalmentAmountInMultiplesOf);
|
||||
canDefineInstallmentAmount, installmentAmountInMultiplesOf);
|
||||
}
|
||||
|
||||
public static LoanProductData withAccountingDetails(final LoanProductData productData, final Map<String, Object> accountingMappings,
|
||||
@@ -394,8 +394,8 @@ public class LoanProductData {
|
||||
final boolean isInterestRecalculationEnabled, final LoanProductInterestRecalculationData interestRecalculationData,
|
||||
final Integer minimumDaysBetweenDisbursalAndFirstRepayment, boolean holdGuaranteeFunds,
|
||||
final LoanProductGuaranteeData loanProductGuaranteeData, final BigDecimal principalThresholdForLastInstalment,
|
||||
final boolean accountMovesOutOfNPAOnlyOnArrearsCompletion, boolean canDefineInstalmentAmount,
|
||||
Integer instalmentAmountInMultiplesOf) {
|
||||
final boolean accountMovesOutOfNPAOnlyOnArrearsCompletion, boolean canDefineInstallmentAmount,
|
||||
Integer installmentAmountInMultiplesOf) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.shortName = shortName;
|
||||
@@ -477,8 +477,8 @@ public class LoanProductData {
|
||||
this.rescheduleStrategyTypeOptions = null;
|
||||
this.interestRecalculationFrequencyTypeOptions = null;
|
||||
|
||||
this.canDefineInstalmentAmount = canDefineInstalmentAmount;
|
||||
this.instalmentAmountInMultiplesOf = instalmentAmountInMultiplesOf;
|
||||
this.canDefineInstallmentAmount = canDefineInstallmentAmount;
|
||||
this.installmentAmountInMultiplesOf = installmentAmountInMultiplesOf;
|
||||
|
||||
}
|
||||
|
||||
@@ -590,8 +590,8 @@ public class LoanProductData {
|
||||
this.interestRecalculationFrequencyTypeOptions = interestRecalculationFrequencyTypeOptions;
|
||||
}
|
||||
|
||||
this.canDefineInstalmentAmount = productData.canDefineInstalmentAmount;
|
||||
this.instalmentAmountInMultiplesOf = productData.instalmentAmountInMultiplesOf;
|
||||
this.canDefineInstallmentAmount = productData.canDefineInstallmentAmount;
|
||||
this.installmentAmountInMultiplesOf = productData.installmentAmountInMultiplesOf;
|
||||
}
|
||||
|
||||
private Collection<ChargeData> nullIfEmpty(final Collection<ChargeData> charges) {
|
||||
@@ -842,7 +842,7 @@ public class LoanProductData {
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean canDefineInstalmentAmount() {
|
||||
return this.canDefineInstalmentAmount;
|
||||
public boolean canDefineInstallmentAmount() {
|
||||
return this.canDefineInstallmentAmount;
|
||||
}
|
||||
}
|
||||
+19
-19
@@ -143,10 +143,10 @@ public class LoanProduct extends AbstractPersistable<Long> {
|
||||
private boolean accountMovesOutOfNPAOnlyOnArrearsCompletion;
|
||||
|
||||
@Column(name = "can_define_fixed_emi_amount")
|
||||
private boolean canDefineInstalmentAmount;
|
||||
private boolean canDefineInstallmentAmount;
|
||||
|
||||
@Column(name = "instalment_amount_in_multiples_of", nullable = true)
|
||||
private Integer instalmentAmountInMultiplesOf;
|
||||
private Integer installmentAmountInMultiplesOf;
|
||||
|
||||
public static LoanProduct assembleFromJson(final Fund fund, final LoanTransactionProcessingStrategy loanTransactionProcessingStrategy,
|
||||
final List<Charge> productCharges, final JsonCommand command, final AprCalculator aprCalculator) {
|
||||
@@ -247,8 +247,8 @@ public class LoanProduct extends AbstractPersistable<Long> {
|
||||
final boolean accountMovesOutOfNPAOnlyOnArrearsCompletion = command
|
||||
.booleanPrimitiveValueOfParameterNamed(LoanProductConstants.accountMovesOutOfNPAOnlyOnArrearsCompletionParamName);
|
||||
final boolean canDefineEmiAmount = command.booleanPrimitiveValueOfParameterNamed(LoanProductConstants.canDefineEmiAmountParamName);
|
||||
final Integer instalmentAmountInMultiplesOf = command
|
||||
.integerValueOfParameterNamed(LoanProductConstants.instalmentAmountInMultiplesOfParamName);
|
||||
final Integer installmentAmountInMultiplesOf = command
|
||||
.integerValueOfParameterNamed(LoanProductConstants.installmentAmountInMultiplesOfParamName);
|
||||
|
||||
return new LoanProduct(fund, loanTransactionProcessingStrategy, name, shortName, description, currency, principal, minPrincipal,
|
||||
maxPrincipal, interestRatePerPeriod, minInterestRatePerPeriod, maxInterestRatePerPeriod, interestFrequencyType,
|
||||
@@ -259,7 +259,7 @@ public class LoanProduct extends AbstractPersistable<Long> {
|
||||
outstandingLoanBalance, graceOnArrearsAgeing, overdueDaysForNPA, daysInMonthType, daysInYearType,
|
||||
isInterestRecalculationEnabled, interestRecalculationSettings, minimumDaysBetweenDisbursalAndFirstRepayment,
|
||||
holdGuarantorFunds, loanProductGuaranteeDetails, principalThresholdForLastInstalment,
|
||||
accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineEmiAmount, instalmentAmountInMultiplesOf);
|
||||
accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineEmiAmount, installmentAmountInMultiplesOf);
|
||||
|
||||
}
|
||||
|
||||
@@ -486,7 +486,7 @@ public class LoanProduct extends AbstractPersistable<Long> {
|
||||
final Integer minimumDaysBetweenDisbursalAndFirstRepayment, final boolean holdGuarantorFunds,
|
||||
final LoanProductGuaranteeDetails loanProductGuaranteeDetails, final BigDecimal principalThresholdForLastInstalment,
|
||||
final boolean accountMovesOutOfNPAOnlyOnArrearsCompletion, final boolean canDefineEmiAmount,
|
||||
final Integer instalmentAmountInMultiplesOf) {
|
||||
final Integer installmentAmountInMultiplesOf) {
|
||||
this.fund = fund;
|
||||
this.transactionProcessingStrategy = transactionProcessingStrategy;
|
||||
this.name = name.trim();
|
||||
@@ -540,8 +540,8 @@ public class LoanProduct extends AbstractPersistable<Long> {
|
||||
this.loanProductGuaranteeDetails = loanProductGuaranteeDetails;
|
||||
this.principalThresholdForLastInstalment = principalThresholdForLastInstalment;
|
||||
this.accountMovesOutOfNPAOnlyOnArrearsCompletion = accountMovesOutOfNPAOnlyOnArrearsCompletion;
|
||||
this.canDefineInstalmentAmount = canDefineEmiAmount;
|
||||
this.instalmentAmountInMultiplesOf = instalmentAmountInMultiplesOf;
|
||||
this.canDefineInstallmentAmount = canDefineEmiAmount;
|
||||
this.installmentAmountInMultiplesOf = installmentAmountInMultiplesOf;
|
||||
}
|
||||
|
||||
public MonetaryCurrency getCurrency() {
|
||||
@@ -783,18 +783,18 @@ public class LoanProduct extends AbstractPersistable<Long> {
|
||||
actualChanges.put(LoanProductConstants.accountMovesOutOfNPAOnlyOnArrearsCompletionParamName, newValue);
|
||||
this.accountMovesOutOfNPAOnlyOnArrearsCompletion = newValue;
|
||||
}
|
||||
if (command.isChangeInBooleanParameterNamed(LoanProductConstants.canDefineEmiAmountParamName, this.canDefineInstalmentAmount)) {
|
||||
if (command.isChangeInBooleanParameterNamed(LoanProductConstants.canDefineEmiAmountParamName, this.canDefineInstallmentAmount)) {
|
||||
final boolean newValue = command.booleanPrimitiveValueOfParameterNamed(LoanProductConstants.canDefineEmiAmountParamName);
|
||||
actualChanges.put(LoanProductConstants.canDefineEmiAmountParamName, newValue);
|
||||
this.canDefineInstalmentAmount = newValue;
|
||||
this.canDefineInstallmentAmount = newValue;
|
||||
}
|
||||
|
||||
if (command.isChangeInIntegerParameterNamedWithNullCheck(LoanProductConstants.instalmentAmountInMultiplesOfParamName,
|
||||
this.instalmentAmountInMultiplesOf)) {
|
||||
final Integer newValue = command.integerValueOfParameterNamed(LoanProductConstants.instalmentAmountInMultiplesOfParamName);
|
||||
actualChanges.put(LoanProductConstants.instalmentAmountInMultiplesOfParamName, newValue);
|
||||
if (command.isChangeInIntegerParameterNamedWithNullCheck(LoanProductConstants.installmentAmountInMultiplesOfParamName,
|
||||
this.installmentAmountInMultiplesOf)) {
|
||||
final Integer newValue = command.integerValueOfParameterNamed(LoanProductConstants.installmentAmountInMultiplesOfParamName);
|
||||
actualChanges.put(LoanProductConstants.installmentAmountInMultiplesOfParamName, newValue);
|
||||
actualChanges.put("locale", localeAsInput);
|
||||
this.instalmentAmountInMultiplesOf = newValue;
|
||||
this.installmentAmountInMultiplesOf = newValue;
|
||||
}
|
||||
|
||||
return actualChanges;
|
||||
@@ -1061,12 +1061,12 @@ public class LoanProduct extends AbstractPersistable<Long> {
|
||||
return isBasedOnOriginalSchedule;
|
||||
}
|
||||
|
||||
public boolean canDefineInstalmentAmount() {
|
||||
return this.canDefineInstalmentAmount;
|
||||
public boolean canDefineInstallmentAmount() {
|
||||
return this.canDefineInstallmentAmount;
|
||||
}
|
||||
|
||||
public Integer getInstalmentAmountInMultiplesOf() {
|
||||
return this.instalmentAmountInMultiplesOf;
|
||||
public Integer getInstallmentAmountInMultiplesOf() {
|
||||
return this.installmentAmountInMultiplesOf;
|
||||
}
|
||||
|
||||
}
|
||||
+15
-15
@@ -76,7 +76,7 @@ public final class LoanProductDataValidator {
|
||||
LoanProductConstants.holdGuaranteeFundsParamName, LoanProductConstants.minimumGuaranteeFromGuarantorParamName,
|
||||
LoanProductConstants.minimumGuaranteeFromOwnFundsParamName, LoanProductConstants.principalThresholdForLastInstalmentParamName,
|
||||
LoanProductConstants.accountMovesOutOfNPAOnlyOnArrearsCompletionParamName, LoanProductConstants.canDefineEmiAmountParamName,
|
||||
LoanProductConstants.instalmentAmountInMultiplesOfParamName));
|
||||
LoanProductConstants.installmentAmountInMultiplesOfParamName));
|
||||
|
||||
private final FromJsonHelper fromApiJsonHelper;
|
||||
|
||||
@@ -340,17 +340,17 @@ public final class LoanProductDataValidator {
|
||||
baseDataValidator.reset().parameter(LoanProductConstants.principalThresholdForLastInstalmentParamName)
|
||||
.value(principalThresholdForLastInstalment).notLessThanMin(BigDecimal.ZERO).notGreaterThanMax(BigDecimal.valueOf(100));
|
||||
if (this.fromApiJsonHelper.parameterExists(LoanProductConstants.canDefineEmiAmountParamName, element)) {
|
||||
final Boolean canDefineInstalmentAmount = this.fromApiJsonHelper.extractBooleanNamed(
|
||||
final Boolean canDefineInstallmentAmount = this.fromApiJsonHelper.extractBooleanNamed(
|
||||
LoanProductConstants.canDefineEmiAmountParamName, element);
|
||||
baseDataValidator.reset().parameter(LoanProductConstants.canDefineEmiAmountParamName).value(canDefineInstalmentAmount)
|
||||
baseDataValidator.reset().parameter(LoanProductConstants.canDefineEmiAmountParamName).value(canDefineInstallmentAmount)
|
||||
.isOneOfTheseValues(true, false);
|
||||
}
|
||||
|
||||
if (this.fromApiJsonHelper.parameterExists(LoanProductConstants.instalmentAmountInMultiplesOfParamName, element)) {
|
||||
final Integer instalmentAmountInMultiplesOf = this.fromApiJsonHelper.extractIntegerWithLocaleNamed(
|
||||
LoanProductConstants.instalmentAmountInMultiplesOfParamName, element);
|
||||
baseDataValidator.reset().parameter(LoanProductConstants.instalmentAmountInMultiplesOfParamName)
|
||||
.value(instalmentAmountInMultiplesOf).ignoreIfNull().integerGreaterThanZero();
|
||||
if (this.fromApiJsonHelper.parameterExists(LoanProductConstants.installmentAmountInMultiplesOfParamName, element)) {
|
||||
final Integer installmentAmountInMultiplesOf = this.fromApiJsonHelper.extractIntegerWithLocaleNamed(
|
||||
LoanProductConstants.installmentAmountInMultiplesOfParamName, element);
|
||||
baseDataValidator.reset().parameter(LoanProductConstants.installmentAmountInMultiplesOfParamName)
|
||||
.value(installmentAmountInMultiplesOf).ignoreIfNull().integerGreaterThanZero();
|
||||
}
|
||||
|
||||
// accounting related data validation
|
||||
@@ -797,17 +797,17 @@ public final class LoanProductDataValidator {
|
||||
.notGreaterThanMax(BigDecimal.valueOf(100));
|
||||
}
|
||||
if (this.fromApiJsonHelper.parameterExists(LoanProductConstants.canDefineEmiAmountParamName, element)) {
|
||||
final Boolean canDefineInstalmentAmount = this.fromApiJsonHelper.extractBooleanNamed(
|
||||
final Boolean canDefineInstallmentAmount = this.fromApiJsonHelper.extractBooleanNamed(
|
||||
LoanProductConstants.canDefineEmiAmountParamName, element);
|
||||
baseDataValidator.reset().parameter(LoanProductConstants.canDefineEmiAmountParamName).value(canDefineInstalmentAmount)
|
||||
baseDataValidator.reset().parameter(LoanProductConstants.canDefineEmiAmountParamName).value(canDefineInstallmentAmount)
|
||||
.isOneOfTheseValues(true, false);
|
||||
}
|
||||
|
||||
if (this.fromApiJsonHelper.parameterExists(LoanProductConstants.instalmentAmountInMultiplesOfParamName, element)) {
|
||||
final Integer instalmentAmountInMultiplesOf = this.fromApiJsonHelper.extractIntegerWithLocaleNamed(
|
||||
LoanProductConstants.instalmentAmountInMultiplesOfParamName, element);
|
||||
baseDataValidator.reset().parameter(LoanProductConstants.instalmentAmountInMultiplesOfParamName)
|
||||
.value(instalmentAmountInMultiplesOf).ignoreIfNull().integerGreaterThanZero();
|
||||
if (this.fromApiJsonHelper.parameterExists(LoanProductConstants.installmentAmountInMultiplesOfParamName, element)) {
|
||||
final Integer installmentAmountInMultiplesOf = this.fromApiJsonHelper.extractIntegerWithLocaleNamed(
|
||||
LoanProductConstants.installmentAmountInMultiplesOfParamName, element);
|
||||
baseDataValidator.reset().parameter(LoanProductConstants.installmentAmountInMultiplesOfParamName)
|
||||
.value(installmentAmountInMultiplesOf).ignoreIfNull().integerGreaterThanZero();
|
||||
}
|
||||
|
||||
final Integer accountingRuleType = this.fromApiJsonHelper.extractIntegerNamed("accountingRule", element, Locale.getDefault());
|
||||
|
||||
+5
-5
@@ -160,7 +160,7 @@ public class LoanProductReadPlatformServiceImpl implements LoanProductReadPlatfo
|
||||
+ "lp.accounting_type as accountingType, lp.include_in_borrower_cycle as includeInBorrowerCycle,lp.use_borrower_cycle as useBorrowerCycle, lp.start_date as startDate, lp.close_date as closeDate, "
|
||||
+ "lp.allow_multiple_disbursals as multiDisburseLoan, lp.max_disbursals as maxTrancheCount, lp.max_outstanding_loan_balance as outstandingLoanBalance, "
|
||||
+ "lp.days_in_month_enum as daysInMonth, lp.days_in_year_enum as daysInYear, lp.interest_recalculation_enabled as isInterestRecalculationEnabled, "
|
||||
+ "lp.can_define_fixed_emi_amount as canDefineInstalmentAmount, lp.instalment_amount_in_multiples_of as instalmentAmountInMultiplesOf, "
|
||||
+ "lp.can_define_fixed_emi_amount as canDefineInstallmentAmount, lp.instalment_amount_in_multiples_of as installmentAmountInMultiplesOf, "
|
||||
+ "lpr.id as lprId, lpr.product_id as productId, lpr.compound_type_enum as compoundType, lpr.reschedule_strategy_enum as rescheduleStrategy, "
|
||||
+ "lpr.rest_frequency_type_enum as restFrequencyEnum, lpr.rest_frequency_interval as restFrequencyInterval, "
|
||||
+ "lpr.rest_freqency_date as restFrequencyDate, lpr.arrears_based_on_original_schedule as isArrearsBasedOnOriginalSchedule, "
|
||||
@@ -277,8 +277,8 @@ public class LoanProductReadPlatformServiceImpl implements LoanProductReadPlatfo
|
||||
final EnumOptionData daysInMonthType = CommonEnumerations.daysInMonthType(daysInMonth);
|
||||
final int daysInYear = JdbcSupport.getInteger(rs, "daysInYear");
|
||||
final EnumOptionData daysInYearType = CommonEnumerations.daysInYearType(daysInYear);
|
||||
final Integer instalmentAmountInMultiplesOf = JdbcSupport.getInteger(rs, "instalmentAmountInMultiplesOf");
|
||||
final boolean canDefineInstalmentAmount = rs.getBoolean("canDefineInstalmentAmount");
|
||||
final Integer installmentAmountInMultiplesOf = JdbcSupport.getInteger(rs, "installmentAmountInMultiplesOf");
|
||||
final boolean canDefineInstallmentAmount = rs.getBoolean("canDefineInstallmentAmount");
|
||||
final boolean isInterestRecalculationEnabled = rs.getBoolean("isInterestRecalculationEnabled");
|
||||
|
||||
LoanProductInterestRecalculationData interestRecalculationData = null;
|
||||
@@ -325,8 +325,8 @@ public class LoanProductReadPlatformServiceImpl implements LoanProductReadPlatfo
|
||||
numberOfRepaymentVariationsForBorrowerCycle, multiDisburseLoan, maxTrancheCount, outstandingLoanBalance,
|
||||
graceOnArrearsAgeing, overdueDaysForNPA, daysInMonthType, daysInYearType, isInterestRecalculationEnabled,
|
||||
interestRecalculationData, minimumDaysBetweenDisbursalAndFirstRepayment, holdGuaranteeFunds, loanProductGuaranteeData,
|
||||
principalThresholdForLastInstalment, accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineInstalmentAmount,
|
||||
instalmentAmountInMultiplesOf);
|
||||
principalThresholdForLastInstalment, accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineInstallmentAmount,
|
||||
installmentAmountInMultiplesOf);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user