FINERACT-2065: Fixed length loan configuration
This commit is contained in:
committed by
Peter Bagrij
parent
76ad2a2bc9
commit
b2685ce9cf
+3
-3
@@ -351,7 +351,7 @@ public class LoanImportHandler implements ImportHandler {
|
||||
nominalInterestRate, submittedOnDate, amortizationEnumOption, interestMethodEnum, interestCalculationPeriodEnum,
|
||||
arrearsTolerance, repaymentStrategyCode, graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged,
|
||||
interestChargedFromDate, firstRepaymentOnDate, row.getRowNum(), externalId, null, charges, linkAccountId, locale,
|
||||
dateFormat, loanCollateralManagementData);
|
||||
dateFormat, loanCollateralManagementData, null);
|
||||
} else if (loanType.equals("jlg")) {
|
||||
Long clientId = ImportHandlerUtils.getIdByName(workbook.getSheet(TemplatePopulateImportConstants.CLIENT_SHEET_NAME),
|
||||
clientOrGroupName);
|
||||
@@ -360,7 +360,7 @@ public class LoanImportHandler implements ImportHandler {
|
||||
nominalInterestRate, submittedOnDate, amortizationEnumOption, interestMethodEnum, interestCalculationPeriodEnum,
|
||||
arrearsTolerance, repaymentStrategyCode, graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged,
|
||||
interestChargedFromDate, firstRepaymentOnDate, row.getRowNum(), externalId, groupId, charges, linkAccountId, locale,
|
||||
dateFormat, null);
|
||||
dateFormat, null, null);
|
||||
} else {
|
||||
Long groupIdforGroupLoan = ImportHandlerUtils
|
||||
.getIdByName(workbook.getSheet(TemplatePopulateImportConstants.GROUP_SHEET_NAME), clientOrGroupName);
|
||||
@@ -369,7 +369,7 @@ public class LoanImportHandler implements ImportHandler {
|
||||
loanTermFrequencyEnum, nominalInterestRate, amortizationEnumOption, interestMethodEnum,
|
||||
interestCalculationPeriodEnum, arrearsTolerance, repaymentStrategyCode, graceOnPrincipalPayment,
|
||||
graceOnInterestPayment, graceOnInterestCharged, interestChargedFromDate, firstRepaymentOnDate, row.getRowNum(),
|
||||
externalId, linkAccountId, locale, dateFormat);
|
||||
externalId, linkAccountId, locale, dateFormat, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+6
@@ -1085,6 +1085,8 @@ final class LoansApiResourceSwagger {
|
||||
@Schema(example = "1")
|
||||
public Integer repaymentEvery;
|
||||
public GetLoansLoanIdRepaymentFrequencyType repaymentFrequencyType;
|
||||
@Schema(example = "1")
|
||||
public Integer fixedLength;
|
||||
@Schema(example = "24")
|
||||
public BigDecimal interestRatePerPeriod;
|
||||
public GetLoansLoanIdInterestRateFrequencyType interestRateFrequencyType;
|
||||
@@ -1181,6 +1183,8 @@ final class LoansApiResourceSwagger {
|
||||
public Integer repaymentEvery;
|
||||
@Schema(example = "2")
|
||||
public Integer repaymentFrequencyType;
|
||||
@Schema(example = "1")
|
||||
public Integer fixedLength;
|
||||
@Schema(example = "2")
|
||||
public BigDecimal interestRatePerPeriod;
|
||||
@Schema(example = "1")
|
||||
@@ -1317,6 +1321,8 @@ final class LoansApiResourceSwagger {
|
||||
public Integer repaymentEvery;
|
||||
@Schema(example = "0")
|
||||
public Integer repaymentFrequencyType;
|
||||
@Schema(example = "1")
|
||||
public Integer fixedLength;
|
||||
@Schema(example = "2")
|
||||
public BigDecimal interestRatePerPeriod;
|
||||
@Schema(example = "0")
|
||||
|
||||
+18
-16
@@ -104,6 +104,7 @@ public class LoanAccountData {
|
||||
private EnumOptionData termPeriodFrequencyType;
|
||||
private Integer numberOfRepayments;
|
||||
private Integer repaymentEvery;
|
||||
private Integer fixedLength;
|
||||
private EnumOptionData repaymentFrequencyType;
|
||||
private EnumOptionData repaymentFrequencyNthDayType;
|
||||
private EnumOptionData repaymentFrequencyDayOfWeekType;
|
||||
@@ -274,7 +275,8 @@ public class LoanAccountData {
|
||||
BigDecimal inArrearsTolerance, String transactionProcessingStrategyCode, Integer graceOnPrincipalPayment,
|
||||
Integer graceOnInterestPayment, Integer graceOnInterestCharged, LocalDate interestChargedFromDate,
|
||||
LocalDate repaymentsStartingFromDate, Integer rowIndex, ExternalId externalId, Long groupId, Collection<LoanChargeData> charges,
|
||||
String linkAccountId, String locale, String dateFormat, List<LoanCollateralManagementData> loanCollateralManagementData) {
|
||||
String linkAccountId, String locale, String dateFormat, List<LoanCollateralManagementData> loanCollateralManagementData,
|
||||
Integer fixedLength) {
|
||||
|
||||
return new LoanAccountData().setLoanType(loanTypeEnumOption).setClientId(clientId).setProductId(productId)
|
||||
.setLoanOfficerId(loanOfficerId).setSubmittedOnDate(submittedOnDate).setFundId(fundId).setPrincipal(principal)
|
||||
@@ -288,7 +290,7 @@ public class LoanAccountData {
|
||||
.setGraceOnInterestCharged(graceOnInterestCharged).setInterestChargedFromDate(interestChargedFromDate)
|
||||
.setRepaymentsStartingFromDate(repaymentsStartingFromDate).setRowIndex(rowIndex).setExternalId(externalId)
|
||||
.setGroupId(groupId).setCharges(charges).setLinkAccountId(linkAccountId).setLocale(locale).setDateFormat(dateFormat)
|
||||
.setCollateral(loanCollateralManagementData);
|
||||
.setCollateral(loanCollateralManagementData).setFixedLength(fixedLength);
|
||||
}
|
||||
|
||||
public static LoanAccountData importInstanceGroup(EnumOptionData loanTypeEnumOption, Long groupIdforGroupLoan, Long productId,
|
||||
@@ -298,7 +300,7 @@ public class LoanAccountData {
|
||||
EnumOptionData interestMethodEnum, EnumOptionData interestCalculationPeriodEnum, BigDecimal arrearsTolerance,
|
||||
String transactionProcessingStrategyCode, Integer graceOnPrincipalPayment, Integer graceOnInterestPayment,
|
||||
Integer graceOnInterestCharged, LocalDate interestChargedFromDate, LocalDate repaymentsStartingFromDate, Integer rowIndex,
|
||||
ExternalId externalId, String linkAccountId, String locale, String dateFormat) {
|
||||
ExternalId externalId, String linkAccountId, String locale, String dateFormat, Integer fixedLength) {
|
||||
|
||||
return new LoanAccountData().setLoanType(loanTypeEnumOption).setGroupId(groupIdforGroupLoan).setProductId(productId)
|
||||
.setLoanOfficerId(loanOfficerId).setSubmittedOnDate(submittedOnDate).setFundId(fundId).setPrincipal(principal)
|
||||
@@ -310,8 +312,8 @@ public class LoanAccountData {
|
||||
.setTransactionProcessingStrategyCode(transactionProcessingStrategyCode).setGraceOnPrincipalPayment(graceOnPrincipalPayment)
|
||||
.setGraceOnInterestPayment(graceOnInterestPayment).setGraceOnInterestCharged(graceOnInterestCharged)
|
||||
.setInterestChargedFromDate(interestChargedFromDate).setRepaymentsStartingFromDate(repaymentsStartingFromDate)
|
||||
.setRowIndex(rowIndex).setExternalId(externalId).setLinkAccountId(linkAccountId).setLocale(locale)
|
||||
.setDateFormat(dateFormat);
|
||||
.setRowIndex(rowIndex).setExternalId(externalId).setLinkAccountId(linkAccountId).setLocale(locale).setDateFormat(dateFormat)
|
||||
.setFixedLength(fixedLength);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -350,7 +352,7 @@ public class LoanAccountData {
|
||||
.setTermPeriodFrequencyType(acc.termPeriodFrequencyType).setNumberOfRepayments(acc.numberOfRepayments)
|
||||
.setRepaymentEvery(acc.repaymentEvery).setRepaymentFrequencyType(acc.repaymentFrequencyType)
|
||||
.setRepaymentFrequencyNthDayType(acc.repaymentFrequencyNthDayType)
|
||||
.setRepaymentFrequencyDayOfWeekType(acc.repaymentFrequencyDayOfWeekType)
|
||||
.setRepaymentFrequencyDayOfWeekType(acc.repaymentFrequencyDayOfWeekType).setFixedLength(acc.fixedLength)
|
||||
.setTransactionProcessingStrategyCode(acc.transactionProcessingStrategyCode)
|
||||
.setTransactionProcessingStrategyName(acc.transactionProcessingStrategyName).setAmortizationType(acc.amortizationType)
|
||||
.setInterestRatePerPeriod(acc.interestRatePerPeriod).setInterestRateFrequencyType(acc.interestRateFrequencyType)
|
||||
@@ -424,7 +426,7 @@ public class LoanAccountData {
|
||||
.setTermPeriodFrequencyType(acc.termPeriodFrequencyType).setNumberOfRepayments(acc.numberOfRepayments)
|
||||
.setRepaymentEvery(acc.repaymentEvery).setRepaymentFrequencyType(acc.repaymentFrequencyType)
|
||||
.setRepaymentFrequencyNthDayType(acc.repaymentFrequencyNthDayType)
|
||||
.setRepaymentFrequencyDayOfWeekType(acc.repaymentFrequencyDayOfWeekType)
|
||||
.setRepaymentFrequencyDayOfWeekType(acc.repaymentFrequencyDayOfWeekType).setFixedLength(acc.fixedLength)
|
||||
.setTransactionProcessingStrategyCode(acc.transactionProcessingStrategyCode)
|
||||
.setTransactionProcessingStrategyName(acc.transactionProcessingStrategyName).setAmortizationType(acc.amortizationType)
|
||||
.setInterestRatePerPeriod(acc.interestRatePerPeriod).setInterestRateFrequencyType(acc.interestRateFrequencyType)
|
||||
@@ -643,7 +645,7 @@ public class LoanAccountData {
|
||||
.setFixedPrincipalPercentagePerInstallment(product.getFixedPrincipalPercentagePerInstallment()).setDelinquent(delinquent)
|
||||
.setDisallowExpectedDisbursements(product.getDisallowExpectedDisbursements()).setFraud(acc.fraud)
|
||||
.setOverpaidOnDate(acc.overpaidOnDate).setChargedOff(acc.chargedOff).setLoanScheduleType(acc.getLoanScheduleType())
|
||||
.setLoanScheduleProcessingType(acc.getLoanScheduleProcessingType());
|
||||
.setLoanScheduleProcessingType(acc.getLoanScheduleProcessingType()).setFixedLength(product.getFixedLength());
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -680,7 +682,7 @@ public class LoanAccountData {
|
||||
LocalDate lastClosedBusinessDate, LocalDate overpaidOnDate, final boolean chargedOff, final boolean enableDownPayment,
|
||||
final BigDecimal disbursedAmountPercentageForDownPayment, final boolean enableAutoRepaymentForDownPayment,
|
||||
final boolean enableInstallmentLevelDelinquency, final EnumOptionData loanScheduleType,
|
||||
final EnumOptionData loanScheduleProcessingType) {
|
||||
final EnumOptionData loanScheduleProcessingType, final Integer fixedLength) {
|
||||
|
||||
final CollectionData delinquent = CollectionData.template();
|
||||
|
||||
@@ -724,7 +726,7 @@ public class LoanAccountData {
|
||||
.setEnableDownPayment(enableDownPayment).setDisbursedAmountPercentageForDownPayment(disbursedAmountPercentageForDownPayment)
|
||||
.setEnableAutoRepaymentForDownPayment(enableAutoRepaymentForDownPayment)
|
||||
.setEnableInstallmentLevelDelinquency(enableInstallmentLevelDelinquency).setLoanScheduleType(loanScheduleType)
|
||||
.setLoanScheduleProcessingType(loanScheduleProcessingType);
|
||||
.setLoanScheduleProcessingType(loanScheduleProcessingType).setFixedLength(fixedLength);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -764,7 +766,7 @@ public class LoanAccountData {
|
||||
.setPrincipal(acc.principal).setApprovedPrincipal(acc.approvedPrincipal).setNetDisbursalAmount(acc.netDisbursalAmount)
|
||||
.setTotalOverpaid(acc.totalOverpaid).setInArrearsTolerance(acc.inArrearsTolerance).setTermFrequency(acc.termFrequency)
|
||||
.setTermPeriodFrequencyType(acc.termPeriodFrequencyType).setNumberOfRepayments(acc.numberOfRepayments)
|
||||
.setRepaymentEvery(acc.repaymentEvery).setRepaymentFrequencyType(acc.repaymentFrequencyType)
|
||||
.setRepaymentEvery(acc.repaymentEvery).setRepaymentFrequencyType(acc.repaymentFrequencyType).setFixedLength(acc.fixedLength)
|
||||
.setRepaymentFrequencyNthDayType(acc.repaymentFrequencyNthDayType)
|
||||
.setRepaymentFrequencyDayOfWeekType(acc.repaymentFrequencyDayOfWeekType)
|
||||
.setTransactionProcessingStrategyCode(acc.transactionProcessingStrategyCode)
|
||||
@@ -848,7 +850,7 @@ public class LoanAccountData {
|
||||
.setTermPeriodFrequencyType(acc.termPeriodFrequencyType).setNumberOfRepayments(acc.numberOfRepayments)
|
||||
.setRepaymentEvery(acc.repaymentEvery).setRepaymentFrequencyType(acc.repaymentFrequencyType)
|
||||
.setRepaymentFrequencyNthDayType(acc.repaymentFrequencyNthDayType)
|
||||
.setRepaymentFrequencyDayOfWeekType(acc.repaymentFrequencyDayOfWeekType)
|
||||
.setRepaymentFrequencyDayOfWeekType(acc.repaymentFrequencyDayOfWeekType).setFixedLength(acc.fixedLength)
|
||||
.setTransactionProcessingStrategyCode(acc.transactionProcessingStrategyCode)
|
||||
.setTransactionProcessingStrategyName(acc.transactionProcessingStrategyName).setAmortizationType(acc.amortizationType)
|
||||
.setInterestRatePerPeriod(acc.interestRatePerPeriod).setInterestRateFrequencyType(acc.interestRateFrequencyType)
|
||||
@@ -947,7 +949,7 @@ public class LoanAccountData {
|
||||
.setTotalOverpaid(acc.totalOverpaid).setInArrearsTolerance(acc.inArrearsTolerance).setTermFrequency(acc.termFrequency)
|
||||
.setTermPeriodFrequencyType(acc.termPeriodFrequencyType).setNumberOfRepayments(acc.numberOfRepayments)
|
||||
.setRepaymentEvery(acc.repaymentEvery).setRepaymentFrequencyType(acc.repaymentFrequencyType)
|
||||
.setRepaymentFrequencyNthDayType(acc.repaymentFrequencyNthDayType)
|
||||
.setRepaymentFrequencyNthDayType(acc.repaymentFrequencyNthDayType).setFixedLength(acc.fixedLength)
|
||||
.setRepaymentFrequencyDayOfWeekType(acc.repaymentFrequencyDayOfWeekType)
|
||||
.setTransactionProcessingStrategyCode(acc.transactionProcessingStrategyCode)
|
||||
.setTransactionProcessingStrategyName(acc.transactionProcessingStrategyName).setAmortizationType(acc.amortizationType)
|
||||
@@ -1016,7 +1018,7 @@ public class LoanAccountData {
|
||||
.setTermPeriodFrequencyType(acc.termPeriodFrequencyType).setNumberOfRepayments(acc.numberOfRepayments)
|
||||
.setRepaymentEvery(acc.repaymentEvery).setRepaymentFrequencyType(acc.repaymentFrequencyType)
|
||||
.setRepaymentFrequencyNthDayType(acc.repaymentFrequencyNthDayType)
|
||||
.setRepaymentFrequencyDayOfWeekType(acc.repaymentFrequencyDayOfWeekType)
|
||||
.setRepaymentFrequencyDayOfWeekType(acc.repaymentFrequencyDayOfWeekType).setFixedLength(acc.fixedLength)
|
||||
.setTransactionProcessingStrategyCode(acc.transactionProcessingStrategyCode)
|
||||
.setTransactionProcessingStrategyName(acc.transactionProcessingStrategyName).setAmortizationType(acc.amortizationType)
|
||||
.setInterestRatePerPeriod(acc.interestRatePerPeriod).setInterestRateFrequencyType(acc.interestRateFrequencyType)
|
||||
@@ -1094,7 +1096,7 @@ public class LoanAccountData {
|
||||
.setMeeting(acc.meeting).setProductOptions(acc.productOptions).setTermFrequencyTypeOptions(acc.termFrequencyTypeOptions)
|
||||
.setRepaymentFrequencyTypeOptions(acc.repaymentFrequencyTypeOptions)
|
||||
.setRepaymentFrequencyNthDayTypeOptions(acc.repaymentFrequencyNthDayTypeOptions)
|
||||
.setRepaymentFrequencyDaysOfWeekTypeOptions(acc.repaymentFrequencyDaysOfWeekTypeOptions)
|
||||
.setRepaymentFrequencyDaysOfWeekTypeOptions(acc.repaymentFrequencyDaysOfWeekTypeOptions).setFixedLength(acc.fixedLength)
|
||||
.setTransactionProcessingStrategyOptions(acc.transactionProcessingStrategyOptions)
|
||||
.setInterestRateFrequencyTypeOptions(acc.interestRateFrequencyTypeOptions)
|
||||
.setAmortizationTypeOptions(acc.amortizationTypeOptions).setInterestTypeOptions(acc.interestTypeOptions)
|
||||
@@ -1141,7 +1143,7 @@ public class LoanAccountData {
|
||||
.setTermPeriodFrequencyType(acc.termPeriodFrequencyType).setNumberOfRepayments(acc.numberOfRepayments)
|
||||
.setRepaymentEvery(acc.repaymentEvery).setRepaymentFrequencyType(acc.repaymentFrequencyType)
|
||||
.setRepaymentFrequencyNthDayType(acc.repaymentFrequencyNthDayType)
|
||||
.setRepaymentFrequencyDayOfWeekType(acc.repaymentFrequencyDayOfWeekType)
|
||||
.setRepaymentFrequencyDayOfWeekType(acc.repaymentFrequencyDayOfWeekType).setFixedLength(acc.fixedLength)
|
||||
.setTransactionProcessingStrategyCode(acc.transactionProcessingStrategyCode)
|
||||
.setTransactionProcessingStrategyName(acc.transactionProcessingStrategyName).setAmortizationType(acc.amortizationType)
|
||||
.setInterestRatePerPeriod(acc.interestRatePerPeriod).setInterestRateFrequencyType(acc.interestRateFrequencyType)
|
||||
|
||||
+12
-5
@@ -469,14 +469,21 @@ public class LoanScheduleAssembler {
|
||||
|
||||
LoanScheduleType loanScheduleType = loanProduct.getLoanProductRelatedDetail().getLoanScheduleType();
|
||||
if (this.fromApiJsonHelper.parameterExists(LoanProductConstants.LOAN_SCHEDULE_TYPE, element)) {
|
||||
LoanScheduleType.valueOf(this.fromApiJsonHelper.extractStringNamed(LoanProductConstants.LOAN_SCHEDULE_TYPE, element));
|
||||
loanScheduleType = LoanScheduleType
|
||||
.valueOf(this.fromApiJsonHelper.extractStringNamed(LoanProductConstants.LOAN_SCHEDULE_TYPE, element));
|
||||
}
|
||||
LoanScheduleProcessingType loanScheduleProcessingType = loanProduct.getLoanProductRelatedDetail().getLoanScheduleProcessingType();
|
||||
|
||||
if (this.fromApiJsonHelper.parameterExists(LoanProductConstants.LOAN_SCHEDULE_TYPE, element)) {
|
||||
LoanScheduleProcessingType
|
||||
LoanScheduleProcessingType loanScheduleProcessingType = loanProduct.getLoanProductRelatedDetail().getLoanScheduleProcessingType();
|
||||
if (this.fromApiJsonHelper.parameterExists(LoanProductConstants.LOAN_SCHEDULE_PROCESSING_TYPE, element)) {
|
||||
loanScheduleProcessingType = LoanScheduleProcessingType
|
||||
.valueOf(this.fromApiJsonHelper.extractStringNamed(LoanProductConstants.LOAN_SCHEDULE_PROCESSING_TYPE, element));
|
||||
}
|
||||
|
||||
Integer fixedLength = loanProduct.getLoanProductRelatedDetail().getFixedLength();
|
||||
if (this.fromApiJsonHelper.parameterExists(LoanProductConstants.FIXED_LENGTH, element)) {
|
||||
fixedLength = this.fromApiJsonHelper.extractIntegerWithLocaleNamed(LoanProductConstants.FIXED_LENGTH, element);
|
||||
}
|
||||
|
||||
return LoanApplicationTerms.assembleFrom(applicationCurrency, loanTermFrequency, loanTermPeriodFrequencyType, numberOfRepayments,
|
||||
repaymentEvery, repaymentPeriodFrequencyType, nthDay, weekDayType, amortizationMethod, interestMethod,
|
||||
interestRatePerPeriod, interestRatePeriodFrequencyType, annualNominalInterestRate, interestCalculationPeriodMethod,
|
||||
@@ -491,7 +498,7 @@ public class LoanScheduleAssembler {
|
||||
allowCompoundingOnEod, isEqualAmortization, isInterestToBeRecoveredFirstWhenGreaterThanEMI,
|
||||
fixedPrincipalPercentagePerInstallment, isPrincipalCompoundingDisabledForOverdueLoans, isDownPaymentEnabled,
|
||||
disbursedAmountPercentageForDownPayment, isAutoRepaymentForDownPaymentEnabled, repaymentStartDateType, submittedOnDate,
|
||||
loanScheduleType, loanScheduleProcessingType);
|
||||
loanScheduleType, loanScheduleProcessingType, fixedLength);
|
||||
}
|
||||
|
||||
private CalendarInstance createCalendarForSameAsRepayment(final Integer repaymentEvery,
|
||||
|
||||
+1
-1
@@ -104,7 +104,7 @@ public final class LoanApplicationCommandFromApiJsonHelper {
|
||||
LoanApiConstants.lastApplication, // glim specific
|
||||
LoanApiConstants.daysInYearTypeParameterName, LoanApiConstants.fixedPrincipalPercentagePerInstallmentParamName,
|
||||
LoanApiConstants.DISALLOW_EXPECTED_DISBURSEMENTS, LoanApiConstants.FRAUD_ATTRIBUTE_NAME,
|
||||
LoanProductConstants.LOAN_SCHEDULE_PROCESSING_TYPE));
|
||||
LoanProductConstants.LOAN_SCHEDULE_PROCESSING_TYPE, LoanProductConstants.FIXED_LENGTH));
|
||||
public static final String LOANAPPLICATION_UNDO = "loanapplication.undo";
|
||||
|
||||
private final FromJsonHelper fromApiJsonHelper;
|
||||
|
||||
+3
-1
@@ -637,6 +637,7 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService, Loa
|
||||
+ " l.grace_on_principal_periods as graceOnPrincipalPayment, l.recurring_moratorium_principal_periods as recurringMoratoriumOnPrincipalPeriods, l.grace_on_interest_periods as graceOnInterestPayment, l.grace_interest_free_periods as graceOnInterestCharged,l.grace_on_arrears_ageing as graceOnArrearsAgeing,"
|
||||
+ " l.nominal_interest_rate_per_period as interestRatePerPeriod, l.annual_nominal_interest_rate as annualInterestRate, "
|
||||
+ " l.repayment_period_frequency_enum as repaymentFrequencyType, l.interest_period_frequency_enum as interestRateFrequencyType, "
|
||||
+ " l.fixed_length as fixedLength, "
|
||||
+ " l.term_frequency as termFrequency, l.term_period_frequency_enum as termPeriodFrequencyType, "
|
||||
+ " l.amortization_method_enum as amortizationType, l.interest_method_enum as interestType, l.is_equal_amortization as isEqualAmortization, l.interest_calculated_in_period_enum as interestCalculationPeriodType,"
|
||||
+ " l.fixed_principal_percentage_per_installment fixedPrincipalPercentagePerInstallment, "
|
||||
@@ -1059,6 +1060,7 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService, Loa
|
||||
final LoanScheduleType loanScheduleType = LoanScheduleType.valueOf(loanScheduleTypeStr);
|
||||
final String loanScheduleProcessingTypeStr = rs.getString("loanScheduleProcessingType");
|
||||
final LoanScheduleProcessingType loanScheduleProcessingType = LoanScheduleProcessingType.valueOf(loanScheduleProcessingTypeStr);
|
||||
final Integer fixedLength = JdbcSupport.getInteger(rs, "fixedLength");
|
||||
|
||||
return LoanAccountData.basicLoanDetails(id, accountNo, status, externalId, clientId, clientAccountNo, clientName,
|
||||
clientOfficeId, clientExternalId, groupData, loanType, loanProductId, loanProductName, loanProductDescription,
|
||||
@@ -1077,7 +1079,7 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService, Loa
|
||||
fixedPrincipalPercentagePerInstallment, delinquencyRange, disallowExpectedDisbursements, isFraud,
|
||||
lastClosedBusinessDate, overpaidOnDate, isChargedOff, enableDownPayment, disbursedAmountPercentageForDownPayment,
|
||||
enableAutoRepaymentForDownPayment, enableInstallmentLevelDelinquency, loanScheduleType.asEnumOptionData(),
|
||||
loanScheduleProcessingType.asEnumOptionData());
|
||||
loanScheduleProcessingType.asEnumOptionData(), fixedLength);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+8
@@ -95,6 +95,8 @@ final class LoanProductsApiResourceSwagger {
|
||||
public BigDecimal fixedPrincipalPercentagePerInstallment;
|
||||
@Schema(example = "true")
|
||||
public Boolean canDefineInstallmentAmount;
|
||||
@Schema(example = "10")
|
||||
public Integer fixedLength;
|
||||
|
||||
// Settings
|
||||
@Schema(example = "false")
|
||||
@@ -555,6 +557,8 @@ final class LoanProductsApiResourceSwagger {
|
||||
@Schema(example = "7")
|
||||
public Integer repaymentEvery;
|
||||
public GetLoanProductsRepaymentFrequencyType repaymentFrequencyType;
|
||||
@Schema(example = "10")
|
||||
public Integer fixedLength;
|
||||
@Schema(example = "15.000000")
|
||||
public Double interestRatePerPeriod;
|
||||
public GetLoanProductsResponse.GetLoanProductsInterestRateFrequencyType interestRateFrequencyType;
|
||||
@@ -1210,6 +1214,8 @@ final class LoanProductsApiResourceSwagger {
|
||||
@Schema(example = "7")
|
||||
public Integer repaymentEvery;
|
||||
public GetLoanProductsResponse.GetLoanProductsRepaymentFrequencyType repaymentFrequencyType;
|
||||
@Schema(example = "10")
|
||||
public Integer fixedLength;
|
||||
@Schema(example = "5.000000")
|
||||
public Double interestRatePerPeriod;
|
||||
public GetLoanProductsProductIdResponse.GetLoanProductsInterestRateFrequencyType interestRateFrequencyType;
|
||||
@@ -1332,6 +1338,8 @@ final class LoanProductsApiResourceSwagger {
|
||||
public BigDecimal fixedPrincipalPercentagePerInstallment;
|
||||
@Schema(example = "true")
|
||||
public Boolean canDefineInstallmentAmount;
|
||||
@Schema(example = "10.0")
|
||||
public Integer fixedLength;
|
||||
|
||||
// Settings
|
||||
@Schema(example = "false")
|
||||
|
||||
+12
-5
@@ -89,6 +89,7 @@ public class LoanProductData implements Serializable {
|
||||
private final Integer maxNumberOfRepayments;
|
||||
private final Integer repaymentEvery;
|
||||
private final EnumOptionData repaymentFrequencyType;
|
||||
private final Integer fixedLength;
|
||||
private final BigDecimal interestRatePerPeriod;
|
||||
private final BigDecimal minInterestRatePerPeriod;
|
||||
private final BigDecimal maxInterestRatePerPeriod;
|
||||
@@ -237,6 +238,7 @@ public class LoanProductData implements Serializable {
|
||||
final Integer minNumberOfRepayments = null;
|
||||
final Integer maxNumberOfRepayments = null;
|
||||
final Integer repaymentEvery = null;
|
||||
final Integer fixedLength = null;
|
||||
final BigDecimal interestRatePerPeriod = null;
|
||||
final BigDecimal minInterestRatePerPeriod = null;
|
||||
final BigDecimal maxInterestRatePerPeriod = null;
|
||||
@@ -341,7 +343,7 @@ public class LoanProductData implements Serializable {
|
||||
fixedPrincipalPercentagePerInstallment, delinquencyBucketOptions, delinquencyBucket, dueDaysForRepaymentEvent,
|
||||
overDueDaysForRepaymentEvent, enableDownPayment, disbursedAmountPercentageDownPayment, enableAutoRepaymentForDownPayment,
|
||||
paymentAllocation, creditAllocation, repaymentStartDateType, enableInstallmentLevelDelinquency, loanScheduleType,
|
||||
loanScheduleProcessingType);
|
||||
loanScheduleProcessingType, fixedLength);
|
||||
|
||||
}
|
||||
|
||||
@@ -356,6 +358,7 @@ public class LoanProductData implements Serializable {
|
||||
final Integer minNumberOfRepayments = null;
|
||||
final Integer maxNumberOfRepayments = null;
|
||||
final Integer repaymentEvery = null;
|
||||
final Integer fixedLength = null;
|
||||
final BigDecimal interestRatePerPeriod = null;
|
||||
final BigDecimal minInterestRatePerPeriod = null;
|
||||
final BigDecimal maxInterestRatePerPeriod = null;
|
||||
@@ -460,7 +463,7 @@ public class LoanProductData implements Serializable {
|
||||
fixedPrincipalPercentagePerInstallment, delinquencyBucketOptions, delinquencyBucket, dueDaysForRepaymentEvent,
|
||||
overDueDaysForRepaymentEvent, enableDownPayment, disbursedAmountPercentageDownPayment, enableAutoRepaymentForDownPayment,
|
||||
paymentAllocation, creditAllocation, repaymentStartDateType, enableInstallmentLevelDelinquency, loanScheduleType,
|
||||
loanScheduleProcessingType);
|
||||
loanScheduleProcessingType, fixedLength);
|
||||
|
||||
}
|
||||
|
||||
@@ -479,6 +482,7 @@ public class LoanProductData implements Serializable {
|
||||
final Integer maxNumberOfRepayments = null;
|
||||
|
||||
final Integer repaymentEvery = null;
|
||||
final Integer fixedLength = null;
|
||||
final BigDecimal interestRatePerPeriod = null;
|
||||
final BigDecimal minInterestRatePerPeriod = null;
|
||||
final BigDecimal maxInterestRatePerPeriod = null;
|
||||
@@ -586,7 +590,7 @@ public class LoanProductData implements Serializable {
|
||||
fixedPrincipalPercentagePerInstallment, delinquencyBucketOptions, delinquencyBucket, dueDaysForRepaymentEvent,
|
||||
overDueDaysForRepaymentEvent, enableDownPayment, disbursedAmountPercentageDownPayment, enableAutoRepaymentForDownPayment,
|
||||
paymentAllocation, creditAllocation, repaymentStartDateType, enableInstallmentLevelDelinquency, loanScheduleType,
|
||||
loanScheduleProcessingType);
|
||||
loanScheduleProcessingType, fixedLength);
|
||||
|
||||
}
|
||||
|
||||
@@ -607,6 +611,7 @@ public class LoanProductData implements Serializable {
|
||||
final Integer maxNumberOfRepayments = null;
|
||||
|
||||
final Integer repaymentEvery = null;
|
||||
final Integer fixedLength = null;
|
||||
final BigDecimal interestRatePerPeriod = null;
|
||||
final BigDecimal minInterestRatePerPeriod = null;
|
||||
final BigDecimal maxInterestRatePerPeriod = null;
|
||||
@@ -706,7 +711,7 @@ public class LoanProductData implements Serializable {
|
||||
fixedPrincipalPercentagePerInstallment, delinquencyBucketOptions, delinquencyBucket, dueDaysForRepaymentEvent,
|
||||
overDueDaysForRepaymentEvent, enableDownPayment, disbursedAmountPercentageDownPayment, enableAutoRepaymentForDownPayment,
|
||||
paymentAllocation, creditAllocationData, repaymentStartDateType, enableInstallmentLevelDelinquency, loanScheduleType,
|
||||
loanScheduleProcessingType);
|
||||
loanScheduleProcessingType, fixedLength);
|
||||
}
|
||||
|
||||
public static LoanProductData withAccountingDetails(final LoanProductData productData, final Map<String, Object> accountingMappings,
|
||||
@@ -756,7 +761,7 @@ public class LoanProductData implements Serializable {
|
||||
final BigDecimal disbursedAmountPercentageForDownPayment, final boolean enableAutoRepaymentForDownPayment,
|
||||
final Collection<AdvancedPaymentData> paymentAllocation, final Collection<CreditAllocationData> creditAllocation,
|
||||
final EnumOptionData repaymentStartDateType, final boolean enableInstallmentLevelDelinquency,
|
||||
final EnumOptionData loanScheduleType, final EnumOptionData loanScheduleProcessingType) {
|
||||
final EnumOptionData loanScheduleType, final EnumOptionData loanScheduleProcessingType, final Integer fixedLength) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.shortName = shortName;
|
||||
@@ -774,6 +779,7 @@ public class LoanProductData implements Serializable {
|
||||
this.graceOnInterestPayment = graceOnInterestPayment;
|
||||
this.graceOnInterestCharged = graceOnInterestCharged;
|
||||
this.repaymentEvery = repaymentEvery;
|
||||
this.fixedLength = fixedLength;
|
||||
this.interestRatePerPeriod = interestRatePerPeriod;
|
||||
this.minInterestRatePerPeriod = minInterestRatePerPeriod;
|
||||
this.maxInterestRatePerPeriod = maxInterestRatePerPeriod;
|
||||
@@ -929,6 +935,7 @@ public class LoanProductData implements Serializable {
|
||||
this.minNumberOfRepayments = productData.minNumberOfRepayments;
|
||||
this.maxNumberOfRepayments = productData.maxNumberOfRepayments;
|
||||
this.repaymentEvery = productData.repaymentEvery;
|
||||
this.fixedLength = productData.fixedLength;
|
||||
this.interestRatePerPeriod = productData.interestRatePerPeriod;
|
||||
this.minInterestRatePerPeriod = productData.minInterestRatePerPeriod;
|
||||
this.maxInterestRatePerPeriod = productData.maxInterestRatePerPeriod;
|
||||
|
||||
+1
-1
@@ -171,7 +171,7 @@ public final class LoanProductDataValidator {
|
||||
LoanProductConstants.ENABLE_DOWN_PAYMENT, LoanProductConstants.DISBURSED_AMOUNT_PERCENTAGE_DOWN_PAYMENT,
|
||||
LoanProductConstants.ENABLE_AUTO_REPAYMENT_DOWN_PAYMENT, LoanProductConstants.REPAYMENT_START_DATE_TYPE,
|
||||
LoanProductConstants.ENABLE_INSTALLMENT_LEVEL_DELINQUENCY, LoanProductConstants.LOAN_SCHEDULE_TYPE,
|
||||
LoanProductConstants.LOAN_SCHEDULE_PROCESSING_TYPE));
|
||||
LoanProductConstants.LOAN_SCHEDULE_PROCESSING_TYPE, LoanProductConstants.FIXED_LENGTH));
|
||||
|
||||
private static final String[] SUPPORTED_LOAN_CONFIGURABLE_ATTRIBUTES = { LoanProductConstants.amortizationTypeParamName,
|
||||
LoanProductConstants.interestTypeParamName, LoanProductConstants.transactionProcessingStrategyCodeParamName,
|
||||
|
||||
+4
-1
@@ -234,6 +234,7 @@ public class LoanProductReadPlatformServiceImpl implements LoanProductReadPlatfo
|
||||
+ "lp.nominal_interest_rate_per_period as interestRatePerPeriod, lp.min_nominal_interest_rate_per_period as minInterestRatePerPeriod, lp.max_nominal_interest_rate_per_period as maxInterestRatePerPeriod, lp.interest_period_frequency_enum as interestRatePerPeriodFreq, "
|
||||
+ "lp.annual_nominal_interest_rate as annualInterestRate, lp.interest_method_enum as interestMethod, lp.interest_calculated_in_period_enum as interestCalculationInPeriodMethod,lp.allow_partial_period_interest_calcualtion as allowPartialPeriodInterestCalcualtion, "
|
||||
+ "lp.repay_every as repaidEvery, lp.repayment_period_frequency_enum as repaymentPeriodFrequency, lp.number_of_repayments as numberOfRepayments, lp.min_number_of_repayments as minNumberOfRepayments, lp.max_number_of_repayments as maxNumberOfRepayments, "
|
||||
+ "lp.fixed_length as fixedLength, "
|
||||
+ "lp.grace_on_principal_periods as graceOnPrincipalPayment, lp.recurring_moratorium_principal_periods as recurringMoratoriumOnPrincipalPeriods, lp.grace_on_interest_periods as graceOnInterestPayment, lp.grace_interest_free_periods as graceOnInterestCharged,lp.grace_on_arrears_ageing as graceOnArrearsAgeing,lp.overdue_days_for_npa as overdueDaysForNPA, "
|
||||
+ "lp.min_days_between_disbursal_and_first_repayment As minimumDaysBetweenDisbursalAndFirstRepayment, "
|
||||
+ "lp.amortization_method_enum as amortizationMethod, lp.arrearstolerance_amount as tolerance, "
|
||||
@@ -319,6 +320,7 @@ public class LoanProductReadPlatformServiceImpl implements LoanProductReadPlatfo
|
||||
final Integer minNumberOfRepayments = JdbcSupport.getInteger(rs, "minNumberOfRepayments");
|
||||
final Integer maxNumberOfRepayments = JdbcSupport.getInteger(rs, "maxNumberOfRepayments");
|
||||
final Integer repaymentEvery = JdbcSupport.getInteger(rs, "repaidEvery");
|
||||
final Integer fixedLength = JdbcSupport.getInteger(rs, "fixedLength");
|
||||
|
||||
final Integer graceOnPrincipalPayment = JdbcSupport.getIntegerDefaultToNullIfZero(rs, "graceOnPrincipalPayment");
|
||||
final Integer recurringMoratoriumOnPrincipalPeriods = JdbcSupport.getIntegerDefaultToNullIfZero(rs,
|
||||
@@ -544,7 +546,8 @@ public class LoanProductReadPlatformServiceImpl implements LoanProductReadPlatfo
|
||||
isRatesEnabled, fixedPrincipalPercentagePerInstallment, delinquencyBucketOptions, delinquencyBucket,
|
||||
dueDaysForRepaymentEvent, overDueDaysForRepaymentEvent, enableDownPayment, disbursedAmountPercentageForDownPayment,
|
||||
enableAutoRepaymentForDownPayment, advancedPaymentData, creditAllocationData, repaymentStartDateType,
|
||||
enableInstallmentLevelDelinquency, loanScheduleType.asEnumOptionData(), loanScheduleProcessingType.asEnumOptionData());
|
||||
enableInstallmentLevelDelinquency, loanScheduleType.asEnumOptionData(), loanScheduleProcessingType.asEnumOptionData(),
|
||||
fixedLength);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -123,7 +123,7 @@ public class DefaultScheduledDateGeneratorTest {
|
||||
null, null, null, null, null, Money.of(fromApplicationCurrency(dollarCurrency), ZERO), false, null, EMPTY_LIST,
|
||||
BigDecimal.valueOf(36_000L), null, DaysInMonthType.ACTUAL, DaysInYearType.ACTUAL, false, null, null, null, null, null, ZERO,
|
||||
null, NONE, null, ZERO, EMPTY_LIST, true, 0, false, holidayDetailDTO, false, false, false, null, false, false, null, false,
|
||||
DISBURSEMENT_DATE, submittedOnDate, CUMULATIVE, LoanScheduleProcessingType.HORIZONTAL);
|
||||
DISBURSEMENT_DATE, submittedOnDate, CUMULATIVE, LoanScheduleProcessingType.HORIZONTAL, null);
|
||||
}
|
||||
|
||||
private HolidayDetailDTO createHolidayDTO() {
|
||||
|
||||
Reference in New Issue
Block a user