FINERACT-1971: remove disableScheduleExtensionForDownPayment
This commit is contained in:
-2
@@ -1126,8 +1126,6 @@ final class LoansApiResourceSwagger {
|
||||
public BigDecimal disbursedAmountPercentageForDownPayment;
|
||||
@Schema(example = "false")
|
||||
public Boolean enableAutoRepaymentForDownPayment;
|
||||
@Schema(example = "false")
|
||||
public Boolean disableScheduleExtensionForDownPayment;
|
||||
@Schema(example = "CUMULATIVE")
|
||||
public EnumOptionData loanScheduleType;
|
||||
@Schema(example = "HORIZONTAL")
|
||||
|
||||
+2
-5
@@ -262,7 +262,6 @@ public class LoanAccountData {
|
||||
private Boolean enableDownPayment;
|
||||
private BigDecimal disbursedAmountPercentageForDownPayment;
|
||||
private Boolean enableAutoRepaymentForDownPayment;
|
||||
private Boolean disableScheduleExtensionForDownPayment;
|
||||
|
||||
private EnumOptionData loanScheduleType;
|
||||
private EnumOptionData loanScheduleProcessingType;
|
||||
@@ -680,8 +679,8 @@ public class LoanAccountData {
|
||||
final DelinquencyRangeData delinquencyRange, final boolean disallowExpectedDisbursements, final boolean fraud,
|
||||
LocalDate lastClosedBusinessDate, LocalDate overpaidOnDate, final boolean chargedOff, final boolean enableDownPayment,
|
||||
final BigDecimal disbursedAmountPercentageForDownPayment, final boolean enableAutoRepaymentForDownPayment,
|
||||
final boolean disableScheduleExtensionForDownPayment, final boolean enableInstallmentLevelDelinquency,
|
||||
final EnumOptionData loanScheduleType, final EnumOptionData loanScheduleProcessingType) {
|
||||
final boolean enableInstallmentLevelDelinquency, final EnumOptionData loanScheduleType,
|
||||
final EnumOptionData loanScheduleProcessingType) {
|
||||
|
||||
final CollectionData delinquent = CollectionData.template();
|
||||
|
||||
@@ -724,7 +723,6 @@ public class LoanAccountData {
|
||||
.setLastClosedBusinessDate(lastClosedBusinessDate).setOverpaidOnDate(overpaidOnDate).setChargedOff(chargedOff)
|
||||
.setEnableDownPayment(enableDownPayment).setDisbursedAmountPercentageForDownPayment(disbursedAmountPercentageForDownPayment)
|
||||
.setEnableAutoRepaymentForDownPayment(enableAutoRepaymentForDownPayment)
|
||||
.setDisableScheduleExtensionForDownPayment(disableScheduleExtensionForDownPayment)
|
||||
.setEnableInstallmentLevelDelinquency(enableInstallmentLevelDelinquency).setLoanScheduleType(loanScheduleType)
|
||||
.setLoanScheduleProcessingType(loanScheduleProcessingType);
|
||||
}
|
||||
@@ -815,7 +813,6 @@ public class LoanAccountData {
|
||||
.setChargedOff(acc.chargedOff).setEnableDownPayment(acc.enableDownPayment)
|
||||
.setDisbursedAmountPercentageForDownPayment(acc.disbursedAmountPercentageForDownPayment)
|
||||
.setEnableAutoRepaymentForDownPayment(acc.enableAutoRepaymentForDownPayment)
|
||||
.setDisableScheduleExtensionForDownPayment(acc.disableScheduleExtensionForDownPayment)
|
||||
.setEnableInstallmentLevelDelinquency(acc.enableInstallmentLevelDelinquency).setLoanScheduleType(acc.loanScheduleType)
|
||||
.setLoanScheduleProcessingType(acc.loanScheduleProcessingType).setLoanScheduleTypeOptions(loanScheduleTypeOptions)
|
||||
.setLoanScheduleProcessingTypeOptions(loanScheduleProcessingTypeOptions);
|
||||
|
||||
+1
-4
@@ -459,13 +459,10 @@ public class LoanScheduleAssembler {
|
||||
final boolean isDownPaymentEnabled = loanProduct.getLoanProductRelatedDetail().isEnableDownPayment();
|
||||
BigDecimal disbursedAmountPercentageForDownPayment = null;
|
||||
boolean isAutoRepaymentForDownPaymentEnabled = false;
|
||||
boolean isScheduleExtensionForDownPaymentDisabled = false;
|
||||
if (isDownPaymentEnabled) {
|
||||
disbursedAmountPercentageForDownPayment = loanProduct.getLoanProductRelatedDetail()
|
||||
.getDisbursedAmountPercentageForDownPayment();
|
||||
isAutoRepaymentForDownPaymentEnabled = loanProduct.getLoanProductRelatedDetail().isEnableAutoRepaymentForDownPayment();
|
||||
isScheduleExtensionForDownPaymentDisabled = loanProduct.getLoanProductRelatedDetail()
|
||||
.isDisableScheduleExtensionForDownPayment();
|
||||
|
||||
}
|
||||
|
||||
@@ -493,7 +490,7 @@ public class LoanScheduleAssembler {
|
||||
allowCompoundingOnEod, isEqualAmortization, isInterestToBeRecoveredFirstWhenGreaterThanEMI,
|
||||
fixedPrincipalPercentagePerInstallment, isPrincipalCompoundingDisabledForOverdueLoans, isDownPaymentEnabled,
|
||||
disbursedAmountPercentageForDownPayment, isAutoRepaymentForDownPaymentEnabled, repaymentStartDateType, submittedOnDate,
|
||||
isScheduleExtensionForDownPaymentDisabled, loanScheduleType, loanScheduleProcessingType);
|
||||
loanScheduleType, loanScheduleProcessingType);
|
||||
}
|
||||
|
||||
private CalendarInstance createCalendarForSameAsRepayment(final Integer repaymentEvery,
|
||||
|
||||
+3
-4
@@ -694,7 +694,7 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService, Loa
|
||||
+ " lp.can_use_for_topup as canUseForTopup, l.is_topup as isTopup, topup.closure_loan_id as closureLoanId, "
|
||||
+ " l.total_recovered_derived as totalRecovered, topuploan.account_no as closureLoanAccountNo, "
|
||||
+ " topup.topup_amount as topupAmount, l.last_closed_business_date as lastClosedBusinessDate,l.overpaidon_date as overpaidOnDate, "
|
||||
+ " l.is_charged_off as isChargedOff, l.charge_off_reason_cv_id as chargeOffReasonId, codec.code_value as chargeOffReason, l.charged_off_on_date as chargedOffOnDate, l.enable_down_payment as enableDownPayment, l.disbursed_amount_percentage_for_down_payment as disbursedAmountPercentageForDownPayment, l.enable_auto_repayment_for_down_payment as enableAutoRepaymentForDownPayment, l.disable_schedule_extension_for_down_payment as disableScheduleExtensionForDownPayment,"
|
||||
+ " l.is_charged_off as isChargedOff, l.charge_off_reason_cv_id as chargeOffReasonId, codec.code_value as chargeOffReason, l.charged_off_on_date as chargedOffOnDate, l.enable_down_payment as enableDownPayment, l.disbursed_amount_percentage_for_down_payment as disbursedAmountPercentageForDownPayment, l.enable_auto_repayment_for_down_payment as enableAutoRepaymentForDownPayment,"
|
||||
+ " cobu.username as chargedOffByUsername, cobu.firstname as chargedOffByFirstname, cobu.lastname as chargedOffByLastname, l.loan_schedule_type as loanScheduleType, l.loan_schedule_processing_type as loanScheduleProcessingType "
|
||||
+ " from m_loan l" //
|
||||
+ " join m_product_loan lp on lp.id = l.product_id" //
|
||||
@@ -1041,7 +1041,6 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService, Loa
|
||||
final boolean enableDownPayment = rs.getBoolean("enableDownPayment");
|
||||
final BigDecimal disbursedAmountPercentageForDownPayment = rs.getBigDecimal("disbursedAmountPercentageForDownPayment");
|
||||
final boolean enableAutoRepaymentForDownPayment = rs.getBoolean("enableAutoRepaymentForDownPayment");
|
||||
final boolean disableScheduleExtensionForDownPayment = rs.getBoolean("disableScheduleExtensionForDownPayment");
|
||||
final boolean enableInstallmentLevelDelinquency = rs.getBoolean("enableInstallmentLevelDelinquency");
|
||||
final String loanScheduleTypeStr = rs.getString("loanScheduleType");
|
||||
final LoanScheduleType loanScheduleType = LoanScheduleType.valueOf(loanScheduleTypeStr);
|
||||
@@ -1064,8 +1063,8 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService, Loa
|
||||
canUseForTopup, isTopup, closureLoanId, closureLoanAccountNo, topupAmount, isEqualAmortization,
|
||||
fixedPrincipalPercentagePerInstallment, delinquencyRange, disallowExpectedDisbursements, isFraud,
|
||||
lastClosedBusinessDate, overpaidOnDate, isChargedOff, enableDownPayment, disbursedAmountPercentageForDownPayment,
|
||||
enableAutoRepaymentForDownPayment, disableScheduleExtensionForDownPayment, enableInstallmentLevelDelinquency,
|
||||
loanScheduleType.asEnumOptionData(), loanScheduleProcessingType.asEnumOptionData());
|
||||
enableAutoRepaymentForDownPayment, enableInstallmentLevelDelinquency, loanScheduleType.asEnumOptionData(),
|
||||
loanScheduleProcessingType.asEnumOptionData());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -118,7 +118,7 @@ public class LoanProductsApiResource {
|
||||
LoanApiConstants.fixedPrincipalPercentagePerInstallmentParamName, LoanProductConstants.DUE_DAYS_FOR_REPAYMENT_EVENT,
|
||||
LoanProductConstants.OVER_DUE_DAYS_FOR_REPAYMENT_EVENT, LoanProductConstants.ENABLE_DOWN_PAYMENT,
|
||||
LoanProductConstants.DISBURSED_AMOUNT_PERCENTAGE_DOWN_PAYMENT, LoanProductConstants.ENABLE_AUTO_REPAYMENT_DOWN_PAYMENT,
|
||||
LoanProductConstants.REPAYMENT_START_DATE_TYPE, LoanProductConstants.DISABLE_SCHEDULE_EXTENSION_FOR_DOWN_PAYMENT));
|
||||
LoanProductConstants.REPAYMENT_START_DATE_TYPE));
|
||||
|
||||
private static final Set<String> PRODUCT_MIX_DATA_PARAMETERS = new HashSet<>(
|
||||
Arrays.asList("productId", "productName", "restrictedProducts", "allowedProducts", "productOptions"));
|
||||
@@ -153,7 +153,7 @@ public class LoanProductsApiResource {
|
||||
@Operation(summary = "Create a Loan Product", description = "Depending of the Accounting Rule (accountingRule) selected, additional fields with details of the appropriate Ledger Account identifiers would need to be passed in.\n"
|
||||
+ "\n" + "Refer MifosX Accounting Specs Draft for more details regarding the significance of the selected accounting rule\n\n"
|
||||
+ "Mandatory Fields: name, shortName, currencyCode, digitsAfterDecimal, inMultiplesOf, principal, numberOfRepayments, repaymentEvery, repaymentFrequencyType, interestRatePerPeriod, interestRateFrequencyType, amortizationType, interestType, interestCalculationPeriodType, transactionProcessingStrategyCode, accountingRule, isInterestRecalculationEnabled, daysInYearType, daysInMonthType\n\n"
|
||||
+ "Optional Fields: inArrearsTolerance, graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, graceOnArrearsAgeing, charges, paymentChannelToFundSourceMappings, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, includeInBorrowerCycle, useBorrowerCycle,principalVariationsForBorrowerCycle, numberOfRepaymentVariationsForBorrowerCycle, interestRateVariationsForBorrowerCycle, multiDisburseLoan,maxTrancheCount, outstandingLoanBalance,overdueDaysForNPA,holdGuaranteeFunds, principalThresholdForLastInstalment, accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineInstallmentAmount, installmentAmountInMultiplesOf, allowAttributeOverrides, allowPartialPeriodInterestCalcualtion,dueDaysForRepaymentEvent,overDueDaysForRepaymentEvent,enableDownPayment,disbursedAmountPercentageDownPayment,enableAutoRepaymentForDownPayment,repaymentStartDateType,disableScheduleExtensionForDownPayment\n\n"
|
||||
+ "Optional Fields: inArrearsTolerance, graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, graceOnArrearsAgeing, charges, paymentChannelToFundSourceMappings, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, includeInBorrowerCycle, useBorrowerCycle,principalVariationsForBorrowerCycle, numberOfRepaymentVariationsForBorrowerCycle, interestRateVariationsForBorrowerCycle, multiDisburseLoan,maxTrancheCount, outstandingLoanBalance,overdueDaysForNPA,holdGuaranteeFunds, principalThresholdForLastInstalment, accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineInstallmentAmount, installmentAmountInMultiplesOf, allowAttributeOverrides, allowPartialPeriodInterestCalcualtion,dueDaysForRepaymentEvent,overDueDaysForRepaymentEvent,enableDownPayment,disbursedAmountPercentageDownPayment,enableAutoRepaymentForDownPayment,repaymentStartDateType\n\n"
|
||||
+ "Additional Mandatory Fields for Cash(2) based accounting: fundSourceAccountId, loanPortfolioAccountId, interestOnLoanAccountId, incomeFromFeeAccountId, incomeFromPenaltyAccountId, writeOffAccountId, transfersInSuspenseAccountId, overpaymentLiabilityAccountId\n\n"
|
||||
+ "Additional Mandatory Fields for periodic (3) and upfront (4)accrual accounting: fundSourceAccountId, loanPortfolioAccountId, interestOnLoanAccountId, incomeFromFeeAccountId, incomeFromPenaltyAccountId, writeOffAccountId, receivableInterestAccountId, receivableFeeAccountId, receivablePenaltyAccountId, transfersInSuspenseAccountId, overpaymentLiabilityAccountId\n\n"
|
||||
+ "Additional Mandatory Fields if interest recalculation is enabled(true): interestRecalculationCompoundingMethod, rescheduleStrategyMethod, recalculationRestFrequencyType\n\n"
|
||||
|
||||
-6
@@ -166,8 +166,6 @@ final class LoanProductsApiResourceSwagger {
|
||||
public Boolean enableAutoRepaymentForDownPayment;
|
||||
@Schema(example = "1")
|
||||
public Integer repaymentStartDateType;
|
||||
@Schema(example = "false")
|
||||
public Boolean disableScheduleExtensionForDownPayment;
|
||||
|
||||
// Interest Recalculation
|
||||
@Schema(example = "false")
|
||||
@@ -1262,8 +1260,6 @@ final class LoanProductsApiResourceSwagger {
|
||||
@Schema(example = "false")
|
||||
public Boolean enableAutoRepaymentForDownPayment;
|
||||
public GetLoanProductsRepaymentStartDateType repaymentStartDateType;
|
||||
@Schema(example = "false")
|
||||
public Boolean disableScheduleExtensionForDownPayment;
|
||||
@Schema(example = "CUMULATIVE")
|
||||
public EnumOptionData loanScheduleType;
|
||||
@Schema(example = "HORIZONTAL")
|
||||
@@ -1400,8 +1396,6 @@ final class LoanProductsApiResourceSwagger {
|
||||
public Boolean enableAutoRepaymentForDownPayment;
|
||||
@Schema(example = "1")
|
||||
public Integer repaymentStartDateType;
|
||||
@Schema(example = "false")
|
||||
public Boolean disableScheduleExtensionForDownPayment;
|
||||
|
||||
// Interest Recalculation
|
||||
@Schema(example = "false")
|
||||
|
||||
+6
-17
@@ -210,7 +210,6 @@ public class LoanProductData implements Serializable {
|
||||
private final boolean enableDownPayment;
|
||||
private final BigDecimal disbursedAmountPercentageForDownPayment;
|
||||
private final boolean enableAutoRepaymentForDownPayment;
|
||||
private final boolean disableScheduleExtensionForDownPayment;
|
||||
private final boolean enableInstallmentLevelDelinquency;
|
||||
|
||||
private final EnumOptionData loanScheduleType;
|
||||
@@ -309,7 +308,6 @@ public class LoanProductData implements Serializable {
|
||||
final Collection<AdvancedPaymentData> paymentAllocation = null;
|
||||
final boolean enableAutoRepaymentForDownPayment = false;
|
||||
final EnumOptionData repaymentStartDateType = null;
|
||||
final boolean disableScheduleExtensionForDownPayment = false;
|
||||
final boolean enableInstallmentLevelDelinquency = false;
|
||||
final EnumOptionData loanScheduleType = null;
|
||||
final EnumOptionData loanScheduleProcessingType = null;
|
||||
@@ -334,8 +332,7 @@ public class LoanProductData implements Serializable {
|
||||
syncExpectedWithDisbursementDate, canUseForTopup, isEqualAmortization, rateOptions, rates, isRatesEnabled,
|
||||
fixedPrincipalPercentagePerInstallment, delinquencyBucketOptions, delinquencyBucket, dueDaysForRepaymentEvent,
|
||||
overDueDaysForRepaymentEvent, enableDownPayment, disbursedAmountPercentageDownPayment, enableAutoRepaymentForDownPayment,
|
||||
paymentAllocation, repaymentStartDateType, disableScheduleExtensionForDownPayment, enableInstallmentLevelDelinquency,
|
||||
loanScheduleType, loanScheduleProcessingType);
|
||||
paymentAllocation, repaymentStartDateType, enableInstallmentLevelDelinquency, loanScheduleType, loanScheduleProcessingType);
|
||||
|
||||
}
|
||||
|
||||
@@ -430,7 +427,6 @@ public class LoanProductData implements Serializable {
|
||||
final boolean enableAutoRepaymentForDownPayment = false;
|
||||
final Collection<AdvancedPaymentData> paymentAllocation = null;
|
||||
final EnumOptionData repaymentStartDateType = null;
|
||||
final boolean disableScheduleExtensionForDownPayment = false;
|
||||
final boolean enableInstallmentLevelDelinquency = false;
|
||||
final EnumOptionData loanScheduleType = null;
|
||||
final EnumOptionData loanScheduleProcessingType = null;
|
||||
@@ -453,8 +449,7 @@ public class LoanProductData implements Serializable {
|
||||
syncExpectedWithDisbursementDate, canUseForTopup, isEqualAmortization, rateOptions, rates, isRatesEnabled,
|
||||
fixedPrincipalPercentagePerInstallment, delinquencyBucketOptions, delinquencyBucket, dueDaysForRepaymentEvent,
|
||||
overDueDaysForRepaymentEvent, enableDownPayment, disbursedAmountPercentageDownPayment, enableAutoRepaymentForDownPayment,
|
||||
paymentAllocation, repaymentStartDateType, disableScheduleExtensionForDownPayment, enableInstallmentLevelDelinquency,
|
||||
loanScheduleType, loanScheduleProcessingType);
|
||||
paymentAllocation, repaymentStartDateType, enableInstallmentLevelDelinquency, loanScheduleType, loanScheduleProcessingType);
|
||||
|
||||
}
|
||||
|
||||
@@ -556,7 +551,6 @@ public class LoanProductData implements Serializable {
|
||||
final boolean enableAutoRepaymentForDownPayment = false;
|
||||
final Collection<AdvancedPaymentData> paymentAllocation = null;
|
||||
final EnumOptionData repaymentStartDateType = LoanEnumerations.repaymentStartDateType(RepaymentStartDateType.DISBURSEMENT_DATE);
|
||||
final boolean disableScheduleExtensionForDownPayment = false;
|
||||
final boolean enableInstallmentLevelDelinquency = false;
|
||||
final EnumOptionData loanScheduleType = LoanScheduleType.CUMULATIVE.asEnumOptionData();
|
||||
final EnumOptionData loanScheduleProcessingType = LoanScheduleProcessingType.HORIZONTAL.asEnumOptionData();
|
||||
@@ -579,8 +573,7 @@ public class LoanProductData implements Serializable {
|
||||
syncExpectedWithDisbursementDate, canUseForTopup, isEqualAmortization, rateOptions, rates, isRatesEnabled,
|
||||
fixedPrincipalPercentagePerInstallment, delinquencyBucketOptions, delinquencyBucket, dueDaysForRepaymentEvent,
|
||||
overDueDaysForRepaymentEvent, enableDownPayment, disbursedAmountPercentageDownPayment, enableAutoRepaymentForDownPayment,
|
||||
paymentAllocation, repaymentStartDateType, disableScheduleExtensionForDownPayment, enableInstallmentLevelDelinquency,
|
||||
loanScheduleType, loanScheduleProcessingType);
|
||||
paymentAllocation, repaymentStartDateType, enableInstallmentLevelDelinquency, loanScheduleType, loanScheduleProcessingType);
|
||||
|
||||
}
|
||||
|
||||
@@ -676,7 +669,6 @@ public class LoanProductData implements Serializable {
|
||||
final boolean enableAutoRepaymentForDownPayment = false;
|
||||
final Collection<AdvancedPaymentData> paymentAllocation = null;
|
||||
final EnumOptionData repaymentStartDateType = LoanEnumerations.repaymentStartDateType(RepaymentStartDateType.DISBURSEMENT_DATE);
|
||||
final boolean disableScheduleExtensionForDownPayment = false;
|
||||
final boolean enableInstallmentLevelDelinquency = false;
|
||||
final EnumOptionData loanScheduleType = null;
|
||||
final EnumOptionData loanScheduleProcessingType = null;
|
||||
@@ -699,8 +691,7 @@ public class LoanProductData implements Serializable {
|
||||
syncExpectedWithDisbursementDate, canUseForTopup, isEqualAmortization, rateOptions, rates, isRatesEnabled,
|
||||
fixedPrincipalPercentagePerInstallment, delinquencyBucketOptions, delinquencyBucket, dueDaysForRepaymentEvent,
|
||||
overDueDaysForRepaymentEvent, enableDownPayment, disbursedAmountPercentageDownPayment, enableAutoRepaymentForDownPayment,
|
||||
paymentAllocation, repaymentStartDateType, disableScheduleExtensionForDownPayment, enableInstallmentLevelDelinquency,
|
||||
loanScheduleType, loanScheduleProcessingType);
|
||||
paymentAllocation, repaymentStartDateType, enableInstallmentLevelDelinquency, loanScheduleType, loanScheduleProcessingType);
|
||||
}
|
||||
|
||||
public static LoanProductData withAccountingDetails(final LoanProductData productData, final Map<String, Object> accountingMappings,
|
||||
@@ -749,8 +740,8 @@ public class LoanProductData implements Serializable {
|
||||
final Integer overDueDaysForRepaymentEvent, final boolean enableDownPayment,
|
||||
final BigDecimal disbursedAmountPercentageForDownPayment, final boolean enableAutoRepaymentForDownPayment,
|
||||
final Collection<AdvancedPaymentData> paymentAllocation, final EnumOptionData repaymentStartDateType,
|
||||
final boolean disableScheduleExtensionForDownPayment, final boolean enableInstallmentLevelDelinquency,
|
||||
final EnumOptionData loanScheduleType, final EnumOptionData loanScheduleProcessingType) {
|
||||
final boolean enableInstallmentLevelDelinquency, final EnumOptionData loanScheduleType,
|
||||
final EnumOptionData loanScheduleProcessingType) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.shortName = shortName;
|
||||
@@ -877,7 +868,6 @@ public class LoanProductData implements Serializable {
|
||||
this.advancedPaymentAllocationTransactionTypes = PaymentAllocationTransactionType.getValuesAsEnumOptionDataList();
|
||||
this.advancedPaymentAllocationFutureInstallmentAllocationRules = FutureInstallmentAllocationRule.getValuesAsEnumOptionDataList();
|
||||
this.advancedPaymentAllocationTypes = PaymentAllocationType.getValuesAsEnumOptionDataList();
|
||||
this.disableScheduleExtensionForDownPayment = disableScheduleExtensionForDownPayment;
|
||||
this.enableInstallmentLevelDelinquency = enableInstallmentLevelDelinquency;
|
||||
this.loanScheduleType = loanScheduleType;
|
||||
this.loanScheduleProcessingType = loanScheduleProcessingType;
|
||||
@@ -1047,7 +1037,6 @@ public class LoanProductData implements Serializable {
|
||||
this.advancedPaymentAllocationTransactionTypes = advancedPaymentAllocationTransactionTypes;
|
||||
this.advancedPaymentAllocationFutureInstallmentAllocationRules = advancedPaymentAllocationFutureInstallmentAllocationRules;
|
||||
this.advancedPaymentAllocationTypes = advancedPaymentAllocationTypes;
|
||||
this.disableScheduleExtensionForDownPayment = productData.disableScheduleExtensionForDownPayment;
|
||||
this.enableInstallmentLevelDelinquency = productData.enableInstallmentLevelDelinquency;
|
||||
this.loanScheduleType = productData.getLoanScheduleType();
|
||||
this.loanScheduleProcessingType = productData.getLoanScheduleProcessingType();
|
||||
|
||||
+2
-39
@@ -170,8 +170,8 @@ public final class LoanProductDataValidator {
|
||||
LoanProductConstants.DUE_DAYS_FOR_REPAYMENT_EVENT, LoanProductConstants.OVER_DUE_DAYS_FOR_REPAYMENT_EVENT,
|
||||
LoanProductConstants.ENABLE_DOWN_PAYMENT, LoanProductConstants.DISBURSED_AMOUNT_PERCENTAGE_DOWN_PAYMENT,
|
||||
LoanProductConstants.ENABLE_AUTO_REPAYMENT_DOWN_PAYMENT, LoanProductConstants.REPAYMENT_START_DATE_TYPE,
|
||||
LoanProductConstants.DISABLE_SCHEDULE_EXTENSION_FOR_DOWN_PAYMENT, LoanProductConstants.ENABLE_INSTALLMENT_LEVEL_DELINQUENCY,
|
||||
LoanProductConstants.LOAN_SCHEDULE_TYPE, LoanProductConstants.LOAN_SCHEDULE_PROCESSING_TYPE));
|
||||
LoanProductConstants.ENABLE_INSTALLMENT_LEVEL_DELINQUENCY, LoanProductConstants.LOAN_SCHEDULE_TYPE,
|
||||
LoanProductConstants.LOAN_SCHEDULE_PROCESSING_TYPE));
|
||||
|
||||
private static final String[] SUPPORTED_LOAN_CONFIGURABLE_ATTRIBUTES = { LoanProductConstants.amortizationTypeParamName,
|
||||
LoanProductConstants.interestTypeParamName, LoanProductConstants.transactionProcessingStrategyCodeParamName,
|
||||
@@ -764,7 +764,6 @@ public final class LoanProductDataValidator {
|
||||
.validateForBooleanValue();
|
||||
validateDownPaymentPercentage(enableDownPayment, baseDataValidator, element);
|
||||
validateAutoRepaymentForDownPayment(enableDownPayment, baseDataValidator, element);
|
||||
validateScheduleExtensionForDownPayment(enableDownPayment, baseDataValidator, element, null);
|
||||
}
|
||||
|
||||
if (this.fromApiJsonHelper.parameterExists(LoanProductConstants.REPAYMENT_START_DATE_TYPE, element)) {
|
||||
@@ -821,41 +820,6 @@ public final class LoanProductDataValidator {
|
||||
throwExceptionIfValidationWarningsExist(dataValidationErrors);
|
||||
}
|
||||
|
||||
private void validateScheduleExtensionForDownPayment(Boolean enableDownPayment, DataValidatorBuilder baseDataValidator,
|
||||
JsonElement element, final LoanProduct loanProduct) {
|
||||
|
||||
Boolean multiDisburseLoan = null;
|
||||
if (this.fromApiJsonHelper.parameterExists(LoanProductConstants.MULTI_DISBURSE_LOAN_PARAMETER_NAME, element)) {
|
||||
multiDisburseLoan = this.fromApiJsonHelper.extractBooleanNamed(LoanProductConstants.MULTI_DISBURSE_LOAN_PARAMETER_NAME,
|
||||
element);
|
||||
} else if (loanProduct != null) {
|
||||
multiDisburseLoan = loanProduct.isMultiDisburseLoan();
|
||||
}
|
||||
|
||||
if (multiDisburseLoan != null && multiDisburseLoan) {
|
||||
if (enableDownPayment) {
|
||||
if (this.fromApiJsonHelper.parameterExists(LoanProductConstants.DISABLE_SCHEDULE_EXTENSION_FOR_DOWN_PAYMENT, element)) {
|
||||
final Boolean disableScheduleExtensionForDownPayment = this.fromApiJsonHelper
|
||||
.extractBooleanNamed(LoanProductConstants.DISABLE_SCHEDULE_EXTENSION_FOR_DOWN_PAYMENT, element);
|
||||
baseDataValidator.reset().parameter(LoanProductConstants.DISABLE_SCHEDULE_EXTENSION_FOR_DOWN_PAYMENT)
|
||||
.value(disableScheduleExtensionForDownPayment).ignoreIfNull().validateForBooleanValue();
|
||||
}
|
||||
} else {
|
||||
if (this.fromApiJsonHelper.parameterExists(LoanProductConstants.DISABLE_SCHEDULE_EXTENSION_FOR_DOWN_PAYMENT, element)) {
|
||||
baseDataValidator.reset().parameter(LoanProductConstants.DISABLE_SCHEDULE_EXTENSION_FOR_DOWN_PAYMENT).failWithCode(
|
||||
"supported.only.for.multi.disburse.loan.with.enable.down.payment.true",
|
||||
"Disable repayment schedule extension for down-payment is supported only for multi disburse loan with enable down-payment true");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (this.fromApiJsonHelper.parameterExists(LoanProductConstants.DISABLE_SCHEDULE_EXTENSION_FOR_DOWN_PAYMENT, element)) {
|
||||
baseDataValidator.reset().parameter(LoanProductConstants.DISABLE_SCHEDULE_EXTENSION_FOR_DOWN_PAYMENT).failWithCode(
|
||||
"supported.only.for.multi.disburse.loan.with.enable.down.payment.true",
|
||||
"Disable repayment schedule extension for down-payment is supported only for multi disburse loan with enable down-payment true");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void validateAutoRepaymentForDownPayment(Boolean enableDownPayment, DataValidatorBuilder baseDataValidator,
|
||||
JsonElement element) {
|
||||
if (enableDownPayment) {
|
||||
@@ -1777,7 +1741,6 @@ public final class LoanProductDataValidator {
|
||||
.validateForBooleanValue();
|
||||
validateDownPaymentPercentage(enableDownPayment, baseDataValidator, element);
|
||||
validateAutoRepaymentForDownPayment(enableDownPayment, baseDataValidator, element);
|
||||
validateScheduleExtensionForDownPayment(enableDownPayment, baseDataValidator, element, loanProduct);
|
||||
}
|
||||
|
||||
Integer repaymentStartDateType = loanProduct.getRepaymentStartDateType().getValue();
|
||||
|
||||
+3
-4
@@ -230,7 +230,7 @@ public class LoanProductReadPlatformServiceImpl implements LoanProductReadPlatfo
|
||||
+ "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 canDefineInstallmentAmount, lp.instalment_amount_in_multiples_of as installmentAmountInMultiplesOf, "
|
||||
+ "lp.due_days_for_repayment_event as dueDaysForRepaymentEvent, lp.overdue_days_for_repayment_event as overDueDaysForRepaymentEvent, lp.enable_down_payment as enableDownPayment, lp.disbursed_amount_percentage_for_down_payment as disbursedAmountPercentageForDownPayment, lp.enable_auto_repayment_for_down_payment as enableAutoRepaymentForDownPayment, lp.repayment_start_date_type_enum as repaymentStartDateType, "
|
||||
+ "lp.disable_schedule_extension_for_down_payment as disableScheduleExtensionForDownPayment, lp.enable_installment_level_delinquency as enableInstallmentLevelDelinquency, "
|
||||
+ "lp.enable_installment_level_delinquency as enableInstallmentLevelDelinquency, "
|
||||
+ "lpr.pre_close_interest_calculation_strategy as preCloseInterestCalculationStrategy, "
|
||||
+ "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, "
|
||||
@@ -367,7 +367,6 @@ public class LoanProductReadPlatformServiceImpl implements LoanProductReadPlatfo
|
||||
final boolean enableAutoRepaymentForDownPayment = rs.getBoolean("enableAutoRepaymentForDownPayment");
|
||||
final Integer repaymentStartDateTypeId = JdbcSupport.getInteger(rs, "repaymentStartDateType");
|
||||
final EnumOptionData repaymentStartDateType = LoanEnumerations.repaymentStartDateType(repaymentStartDateTypeId);
|
||||
final boolean disableScheduleExtensionForDownPayment = rs.getBoolean("disableScheduleExtensionForDownPayment");
|
||||
final boolean enableInstallmentLevelDelinquency = rs.getBoolean("enableInstallmentLevelDelinquency");
|
||||
|
||||
String status = "";
|
||||
@@ -531,8 +530,8 @@ public class LoanProductReadPlatformServiceImpl implements LoanProductReadPlatfo
|
||||
maximumGap, syncExpectedWithDisbursementDate, canUseForTopup, isEqualAmortization, rateOptions, this.rates,
|
||||
isRatesEnabled, fixedPrincipalPercentagePerInstallment, delinquencyBucketOptions, delinquencyBucket,
|
||||
dueDaysForRepaymentEvent, overDueDaysForRepaymentEvent, enableDownPayment, disbursedAmountPercentageForDownPayment,
|
||||
enableAutoRepaymentForDownPayment, advancedPaymentData, repaymentStartDateType, disableScheduleExtensionForDownPayment,
|
||||
enableInstallmentLevelDelinquency, loanScheduleType.asEnumOptionData(), loanScheduleProcessingType.asEnumOptionData());
|
||||
enableAutoRepaymentForDownPayment, advancedPaymentData, repaymentStartDateType, enableInstallmentLevelDelinquency,
|
||||
loanScheduleType.asEnumOptionData(), loanScheduleProcessingType.asEnumOptionData());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+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, false, CUMULATIVE, LoanScheduleProcessingType.HORIZONTAL);
|
||||
DISBURSEMENT_DATE, submittedOnDate, CUMULATIVE, LoanScheduleProcessingType.HORIZONTAL);
|
||||
}
|
||||
|
||||
private HolidayDetailDTO createHolidayDTO() {
|
||||
|
||||
Reference in New Issue
Block a user