budaidev commented on code in PR #4912:
URL: https://github.com/apache/fineract/pull/4912#discussion_r2262273753
##########
fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/ProgressiveLoanRescheduleRequestDataValidator.java:
##########
@@ -179,11 +179,21 @@ private void
validateInterestRateChangeRescheduleFromDate(Loan loan, LocalDate r
}
private BigDecimal validateInterestRate(final FromJsonHelper
fromJsonHelper, final JsonElement jsonElement,
- DataValidatorBuilder dataValidatorBuilder) {
+ DataValidatorBuilder dataValidatorBuilder, Loan loan) {
final BigDecimal interestRate = fromJsonHelper
.extractBigDecimalWithLocaleNamed(RescheduleLoansApiConstants.newInterestRateParamName,
jsonElement);
-
dataValidatorBuilder.reset().parameter(RescheduleLoansApiConstants.newInterestRateParamName).value(interestRate).ignoreIfNull()
- .zeroOrPositiveAmount();
+ DataValidatorBuilder interestRareDataValidatorBuilder =
dataValidatorBuilder.reset()
Review Comment:
Typo: interestRareDataValidatorBuilder -> interestRateDataValidatorBuilder
##########
fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/global/LoanProductGlobalInitializerStep.java:
##########
@@ -3570,6 +3571,40 @@ public void initialize() throws Exception {
TestContext.INSTANCE.set(
TestContextKey.DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_PROGRESSIVE_ADV_PYMNT_INTEREST_RECALC_360_30_MULTIDISB_OVER_APPLIED_EXPECTED_TRANCHES,
responseLoanProductsRequestLP2ProgressiveAdvPymnt36030InterestRecalcMultidisbApprovedOverAppliedExpectTranches);
+
+ // LP2 with progressive loan schedule + horizontal + interest EMI +
360/30
+ // + interest recalculation, preClosureInterestCalculationStrategy=
till preclose,
+ // interestRecalculationCompoundingMethod = none
+ // Frequency for recalculate Outstanding Principal: Daily, Frequency
Interval for recalculation: 1
+ //
(LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE)
+ // min interest rate / year 3 and max interest rate / year is 20
+ String name135 =
DefaultLoanProduct.LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_MIN_INT_3_MAX_INT_20
+ .getName();
+ PostLoanProductsRequest
loanProductsRequestLP2AdvancedpaymentInterestEmi36030InterestRecalcDailyTillPrecloseMinInt3MaxInt20
= loanProductsRequestFactory
+ .defaultLoanProductsRequestLP2Emi()//
+ .name(name135)//
+ .daysInYearType(DaysInYearType.DAYS360.value)//
+ .daysInMonthType(DaysInMonthType.DAYS30.value)//
+ .isInterestRecalculationEnabled(true)//
+ .preClosureInterestCalculationStrategy(1)//
+ .rescheduleStrategyMethod(4)//
+ .interestRecalculationCompoundingMethod(0)//
+ .recalculationRestFrequencyType(2)//
+ .recalculationRestFrequencyInterval(1)//
+ .minInterestRatePerPeriod(3D)//
+ .interestRatePerPeriod(12D) //
+ .maxInterestRatePerPeriod(20D)//
+
.interestRateFrequencyType(INTEREST_RATE_FREQUENCY_TYPE_YEAR).paymentAllocation(List.of(//
+ createPaymentAllocation("DEFAULT",
"NEXT_INSTALLMENT"), //
+ createPaymentAllocation("GOODWILL_CREDIT",
"LAST_INSTALLMENT"), //
+ createPaymentAllocation("MERCHANT_ISSUED_REFUND",
"REAMORTIZATION"), //
+ createPaymentAllocation("PAYOUT_REFUND",
"NEXT_INSTALLMENT")));//
+ Response<PostLoanProductsResponse>
responseLoanProductsRequestLP2AdvancedpaymentInterest36030InterestRecalcDailyTillPreCloeseMinInt3MaxInt20
= loanProductsApi
Review Comment:
Another typo: PreCloeseMinInt3MaxInt20 -> PreCloseMinInt3MaxInt20
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]