diff --git a/fineract-avro-schemas/src/main/avro/loan/v1/LoanAccountDataV1.avsc b/fineract-avro-schemas/src/main/avro/loan/v1/LoanAccountDataV1.avsc index cf0e11d03ed..8966f19a013 100644 --- a/fineract-avro-schemas/src/main/avro/loan/v1/LoanAccountDataV1.avsc +++ b/fineract-avro-schemas/src/main/avro/loan/v1/LoanAccountDataV1.avsc @@ -413,7 +413,7 @@ }, { "default": null, - "name": "graceOnArrearsAging", + "name": "graceOnArrearsAgeing", "type": [ "null", "int" diff --git a/fineract-avro-schemas/src/main/avro/loan/v1/LoanProductDataV1.avsc b/fineract-avro-schemas/src/main/avro/loan/v1/LoanProductDataV1.avsc index 81afe1537f8..fadd5f79739 100644 --- a/fineract-avro-schemas/src/main/avro/loan/v1/LoanProductDataV1.avsc +++ b/fineract-avro-schemas/src/main/avro/loan/v1/LoanProductDataV1.avsc @@ -389,7 +389,7 @@ }, { "default": null, - "name": "graceOnArrearsAging", + "name": "graceOnArrearsAgeing", "type": [ "null", "int" diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobName.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobName.java index ff2f57d4eae..16f9ad9c29e 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobName.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobName.java @@ -20,7 +20,7 @@ public enum JobName { - UPDATE_LOAN_ARREARS_AGING("Update Loan Arrears Aging"), // + UPDATE_LOAN_ARREARS_AGEING("Update Loan Arrears Ageing"), // APPLY_ANNUAL_FEE_FOR_SAVINGS("Apply Annual Fee For Savings"), // APPLY_HOLIDAYS_TO_LOANS("Apply Holidays To Loans"), // POST_INTEREST_FOR_SAVINGS("Post Interest For Savings"), // diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/LoanProductsRequestFactory.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/LoanProductsRequestFactory.java index f65f458d9ad..6d1f57f8158 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/LoanProductsRequestFactory.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/LoanProductsRequestFactory.java @@ -182,7 +182,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP1() { .daysInYearType(DAYS_IN_YEAR_TYPE)// .daysInMonthType(DAYS_IN_MONTH_TYPE)// .canDefineInstallmentAmount(true)// - .graceOnArrearsAging(3)// + .graceOnArrearsAgeing(3)// .overdueDaysForNPA(179)// .accountMovesOutOfNPAOnlyOnArrearsCompletion(false)// .principalThresholdForLastInstallment(50)// @@ -199,7 +199,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP1() { .inArrearsTolerance(true)// .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// - .graceOnArrearsAging(true))// + .graceOnArrearsAgeing(true))// .allowPartialPeriodInterestCalculation(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// @@ -292,7 +292,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP1InterestFlat() { .daysInYearType(DAYS_IN_YEAR_TYPE)// .daysInMonthType(DAYS_IN_MONTH_TYPE)// .canDefineInstallmentAmount(true)// - .graceOnArrearsAging(3)// + .graceOnArrearsAgeing(3)// .overdueDaysForNPA(179)// .accountMovesOutOfNPAOnlyOnArrearsCompletion(false)// .principalThresholdForLastInstallment(50)// @@ -309,7 +309,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP1InterestFlat() { .inArrearsTolerance(true)// .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// - .graceOnArrearsAging(true)) + .graceOnArrearsAgeing(true)) .allowPartialPeriodInterestCalculation(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// @@ -400,7 +400,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP1InterestDeclining() .daysInYearType(DAYS_IN_YEAR_TYPE)// .daysInMonthType(DAYS_IN_MONTH_TYPE)// .canDefineInstallmentAmount(true)// - .graceOnArrearsAging(3)// + .graceOnArrearsAgeing(3)// .overdueDaysForNPA(179)// .accountMovesOutOfNPAOnlyOnArrearsCompletion(false)// .principalThresholdForLastInstallment(50)// @@ -417,7 +417,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP1InterestDeclining() .inArrearsTolerance(true)// .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// - .graceOnArrearsAging(true)) + .graceOnArrearsAgeing(true)) .allowPartialPeriodInterestCalculation(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// @@ -507,7 +507,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP11MonthInterestDeclin .daysInYearType(DAYS_IN_YEAR_TYPE)// .daysInMonthType(DAYS_IN_MONTH_TYPE)// .canDefineInstallmentAmount(true)// - .graceOnArrearsAging(3)// + .graceOnArrearsAgeing(3)// .overdueDaysForNPA(179)// .accountMovesOutOfNPAOnlyOnArrearsCompletion(false)// .principalThresholdForLastInstallment(50)// @@ -523,7 +523,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP11MonthInterestDeclin .inArrearsTolerance(true)// .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// - .graceOnArrearsAging(true)) + .graceOnArrearsAgeing(true)) .outstandingLoanBalance(10000.0)// .charges(charges)// .accountingRule(LOAN_ACCOUNTING_RULE)// @@ -620,7 +620,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP1InterestDecliningBal .daysInYearType(DAYS_IN_YEAR_TYPE)// .daysInMonthType(DAYS_IN_MONTH_TYPE)// .canDefineInstallmentAmount(true)// - .graceOnArrearsAging(3)// + .graceOnArrearsAgeing(3)// .overdueDaysForNPA(179)// .accountMovesOutOfNPAOnlyOnArrearsCompletion(false)// .principalThresholdForLastInstallment(50)// @@ -636,7 +636,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP1InterestDecliningBal .inArrearsTolerance(true)// .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// - .graceOnArrearsAging(true)) + .graceOnArrearsAgeing(true)) .outstandingLoanBalance(10000.0)// .charges(charges)// .accountingRule(LOAN_ACCOUNTING_RULE)// @@ -705,7 +705,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP2InterestDailyRecalcu .inArrearsTolerance(true)// .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// - .graceOnArrearsAging(true))// + .graceOnArrearsAgeing(true))// .allowPartialPeriodInterestCalculation(false)// .allowVariableInstallments(false)// .amortizationType(AMORTIZATION_TYPE)// @@ -849,7 +849,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP2() { .daysInYearType(DAYS_IN_YEAR_TYPE)// .daysInMonthType(DAYS_IN_MONTH_TYPE)// .canDefineInstallmentAmount(true)// - .graceOnArrearsAging(3)// + .graceOnArrearsAgeing(3)// .overdueDaysForNPA(179)// .accountMovesOutOfNPAOnlyOnArrearsCompletion(false)// .principalThresholdForLastInstallment(50)// @@ -866,7 +866,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP2() { .inArrearsTolerance(true)// .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// - .graceOnArrearsAging(true))// + .graceOnArrearsAgeing(true))// .allowPartialPeriodInterestCalculation(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// @@ -962,7 +962,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP2InterestFlat() { .daysInYearType(DAYS_IN_YEAR_TYPE)// .daysInMonthType(DAYS_IN_MONTH_TYPE)// .canDefineInstallmentAmount(true)// - .graceOnArrearsAging(3)// + .graceOnArrearsAgeing(3)// .overdueDaysForNPA(179)// .accountMovesOutOfNPAOnlyOnArrearsCompletion(false)// .principalThresholdForLastInstallment(50)// @@ -979,7 +979,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP2InterestFlat() { .inArrearsTolerance(true)// .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// - .graceOnArrearsAging(true)) + .graceOnArrearsAgeing(true)) .allowPartialPeriodInterestCalculation(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// @@ -1073,7 +1073,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP2Emi() { .daysInYearType(DAYS_IN_YEAR_TYPE)// .daysInMonthType(DAYS_IN_MONTH_TYPE)// .canDefineInstallmentAmount(true)// - .graceOnArrearsAging(3)// + .graceOnArrearsAgeing(3)// .overdueDaysForNPA(179)// .accountMovesOutOfNPAOnlyOnArrearsCompletion(false)// .principalThresholdForLastInstallment(50)// @@ -1090,7 +1090,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP2Emi() { .inArrearsTolerance(true)// .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// - .graceOnArrearsAging(true))// + .graceOnArrearsAgeing(true))// .allowPartialPeriodInterestCalculation(false)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// @@ -1199,7 +1199,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP2EmiWithChargeOff() { .daysInYearType(DAYS_IN_YEAR_TYPE)// .daysInMonthType(DAYS_IN_MONTH_TYPE)// .canDefineInstallmentAmount(true)// - .graceOnArrearsAging(3)// + .graceOnArrearsAgeing(3)// .overdueDaysForNPA(179)// .accountMovesOutOfNPAOnlyOnArrearsCompletion(false)// .principalThresholdForLastInstallment(50)// @@ -1220,7 +1220,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP2EmiWithChargeOff() { .inArrearsTolerance(true)// .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// - .graceOnArrearsAging(true))// + .graceOnArrearsAgeing(true))// .allowPartialPeriodInterestCalculation(false)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// @@ -1321,7 +1321,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP2ChargeOffReasonToExp .daysInYearType(DAYS_IN_YEAR_TYPE)// .daysInMonthType(DAYS_IN_MONTH_TYPE)// .canDefineInstallmentAmount(true)// - .graceOnArrearsAging(3)// + .graceOnArrearsAgeing(3)// .overdueDaysForNPA(179)// .accountMovesOutOfNPAOnlyOnArrearsCompletion(false)// .principalThresholdForLastInstallment(50)// @@ -1338,7 +1338,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP2ChargeOffReasonToExp .inArrearsTolerance(true)// .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// - .graceOnArrearsAging(true))// + .graceOnArrearsAgeing(true))// .allowPartialPeriodInterestCalculation(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// @@ -1451,7 +1451,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP2EmiCashAccounting() .daysInYearType(DAYS_IN_YEAR_TYPE)// .daysInMonthType(DAYS_IN_MONTH_TYPE)// .canDefineInstallmentAmount(true)// - .graceOnArrearsAging(3)// + .graceOnArrearsAgeing(3)// .overdueDaysForNPA(179)// .accountMovesOutOfNPAOnlyOnArrearsCompletion(false)// .principalThresholdForLastInstallment(50)// @@ -1472,7 +1472,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP2EmiCashAccounting() .inArrearsTolerance(true)// .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// - .graceOnArrearsAging(true))// + .graceOnArrearsAgeing(true))// .allowPartialPeriodInterestCalculation(false)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// @@ -1560,7 +1560,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP2CapitalizedIncome() .daysInYearType(DAYS_IN_YEAR_TYPE)// .daysInMonthType(DAYS_IN_MONTH_TYPE)// .canDefineInstallmentAmount(true)// - .graceOnArrearsAging(3)// + .graceOnArrearsAgeing(3)// .overdueDaysForNPA(179)// .accountMovesOutOfNPAOnlyOnArrearsCompletion(false)// .principalThresholdForLastInstallment(50)// @@ -1577,7 +1577,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP2CapitalizedIncome() .inArrearsTolerance(true)// .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// - .graceOnArrearsAging(true))// + .graceOnArrearsAgeing(true))// .allowPartialPeriodInterestCalculation(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// @@ -1698,7 +1698,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP2BuyDownFees() { .daysInYearType(DAYS_IN_YEAR_TYPE_360)// .daysInMonthType(DAYS_IN_MONTH_TYPE_30)// .canDefineInstallmentAmount(true)// - .graceOnArrearsAging(3)// + .graceOnArrearsAgeing(3)// .overdueDaysForNPA(179)// .accountMovesOutOfNPAOnlyOnArrearsCompletion(false)// .principalThresholdForLastInstallment(50)// @@ -1715,7 +1715,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP2BuyDownFees() { .inArrearsTolerance(true)// .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// - .graceOnArrearsAging(true))// + .graceOnArrearsAgeing(true))// .allowPartialPeriodInterestCalculation(false)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/LoanRequestFactory.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/LoanRequestFactory.java index 772d128e500..77c3089fe1b 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/LoanRequestFactory.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/LoanRequestFactory.java @@ -119,7 +119,7 @@ public PostLoansRequest defaultLoansRequest(Long clientId) { .amortizationType(DEFAULT_AMORTIZATION_TYPE)// .transactionProcessingStrategyCode(DEFAULT_TRANSACTION_PROCESSING_STRATEGY_CODE)// .dateFormat(DATE_FORMAT)// - .graceOnArrearsAging(3)// + .graceOnArrearsAgeing(3)// .maxOutstandingLoanBalance(new BigDecimal(10000)); } @@ -143,7 +143,7 @@ public PostLoansRequest defaultProgressiveLoansRequest(final Long clientId) { .amortizationType(DEFAULT_AMORTIZATION_TYPE)// .transactionProcessingStrategyCode(DEFAULT_PROGRESSIVE_TRANSACTION_PROCESSING_STRATEGY_CODE)// .dateFormat(DATE_FORMAT)// - .graceOnArrearsAging(3)// + .graceOnArrearsAgeing(3)// .maxOutstandingLoanBalance(new BigDecimal(10000)); } @@ -172,7 +172,7 @@ public PutLoansLoanIdRequest modifySubmittedOnDateOnLoan(Long clientId, String n .amortizationType(DEFAULT_AMORTIZATION_TYPE)// .isEqualAmortization(false)// .transactionProcessingStrategyCode(DEFAULT_TRANSACTION_PROCESSING_STRATEGY_CODE)// - .graceOnArrearsAging(3)// + .graceOnArrearsAgeing(3)// .loanIdToClose(null)// .isTopup(null)// .maxOutstandingLoanBalance(10000L)// diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/global/LoanProductGlobalInitializerStep.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/global/LoanProductGlobalInitializerStep.java index c23d56f2f97..1eba7e12f96 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/global/LoanProductGlobalInitializerStep.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/global/LoanProductGlobalInitializerStep.java @@ -4048,7 +4048,7 @@ public void initialize() throws Exception { .inArrearsTolerance(10) // .graceOnPrincipalPayment(1) // .graceOnInterestPayment(1) // - .graceOnArrearsAging(3) // + .graceOnArrearsAgeing(3) // .numberOfRepayments(6) // .allowAttributeOverrides(new AllowAttributeOverrides() // .amortizationType(true) // @@ -4058,7 +4058,7 @@ public void initialize() throws Exception { .inArrearsTolerance(true) // .repaymentEvery(true) // .graceOnPrincipalAndInterestPayment(true) // - .graceOnArrearsAging(true)); + .graceOnArrearsAgeing(true)); final PostLoanProductsResponse responseWithOverrides = createLoanProductIdempotent(loanProductsRequestWithOverrides); TestContext.INSTANCE.set(TestContextKey.DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP1_WITH_OVERRIDES, responseWithOverrides); @@ -4071,7 +4071,7 @@ public void initialize() throws Exception { .inArrearsTolerance(10) // .graceOnPrincipalPayment(1) // .graceOnInterestPayment(1) // - .graceOnArrearsAging(3) // + .graceOnArrearsAgeing(3) // .numberOfRepayments(6) // .allowAttributeOverrides(new AllowAttributeOverrides() // .amortizationType(false) // @@ -4081,7 +4081,7 @@ public void initialize() throws Exception { .inArrearsTolerance(false) // .repaymentEvery(false) // .graceOnPrincipalAndInterestPayment(false) // - .graceOnArrearsAging(false)); + .graceOnArrearsAgeing(false)); final PostLoanProductsResponse responseNoOverrides = createLoanProductIdempotent(loanProductsRequestNoOverrides); TestContext.INSTANCE.set(TestContextKey.DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP1_NO_OVERRIDES, responseNoOverrides); diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanOverrideFieldsStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanOverrideFieldsStepDef.java index 2f3a14bde65..4750d474cca 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanOverrideFieldsStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanOverrideFieldsStepDef.java @@ -72,7 +72,7 @@ private Integer getIntFieldValue(final GetLoansLoanIdResponse loanDetails, final case "inArrearsTolerance" -> loanDetails.getInArrearsTolerance(); case "graceOnPrincipalPayment" -> loanDetails.getGraceOnPrincipalPayment(); case "graceOnInterestPayment" -> loanDetails.getGraceOnInterestPayment(); - case "graceOnArrearsAging" -> loanDetails.getGraceOnArrearsAging(); + case "graceOnArrearsAgeing" -> loanDetails.getGraceOnArrearsAgeing(); default -> throw new IllegalArgumentException("Unknown override field: " + fieldName); }; } @@ -113,7 +113,7 @@ private void applyOverrideField(final PostLoansRequest request, final String fie case "inArrearsTolerance" -> request.inArrearsTolerance(isNull ? null : new BigDecimal(value)); case "graceOnInterestPayment" -> request.graceOnInterestPayment(isNull ? null : Integer.valueOf(value)); case "graceOnPrincipalPayment" -> request.graceOnPrincipalPayment(isNull ? null : Integer.valueOf(value)); - case "graceOnArrearsAging" -> request.graceOnArrearsAging(isNull ? null : Integer.valueOf(value)); + case "graceOnArrearsAgeing" -> request.graceOnArrearsAgeing(isNull ? null : Integer.valueOf(value)); default -> throw new IllegalArgumentException("Unknown override field: " + fieldName); } } diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanReAgingStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanReAgingStepDef.java index 93b1abaa0c4..145c8e12afc 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanReAgingStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanReAgingStepDef.java @@ -68,7 +68,7 @@ public void createReAgingTransaction(DataTable table) throws IOException { PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); long loanId = loanResponse.getLoanId(); - PostLoansLoanIdTransactionsRequest reAgingRequest = setReAgingRequestProperties(// + PostLoansLoanIdTransactionsRequest reAgingRequest = setReAgeingRequestProperties(// LoanRequestFactory.defaultReAgingRequest(), // table.row(0), // table.row(1) // @@ -84,7 +84,7 @@ public void createReAgingTransactionByLoanExternalId(DataTable table) { PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); String loanExternalId = loanResponse.getResourceExternalId(); - PostLoansLoanIdTransactionsRequest reAgingRequest = setReAgingRequestProperties(// + PostLoansLoanIdTransactionsRequest reAgingRequest = setReAgeingRequestProperties(// LoanRequestFactory.defaultReAgingRequest(), // table.row(0), // table.row(1) // @@ -361,7 +361,7 @@ private List validateRepaymentScheduleTotal(List header, LoanSch return actualValues; } - PostLoansLoanIdTransactionsRequest setReAgingRequestProperties(PostLoansLoanIdTransactionsRequest request, List headers, + PostLoansLoanIdTransactionsRequest setReAgeingRequestProperties(PostLoansLoanIdTransactionsRequest request, List headers, List values) { for (int i = 0; i < headers.size(); i++) { String header = headers.get(i).toLowerCase().trim().replaceAll(" ", ""); @@ -383,7 +383,7 @@ public void adminCreatesALoanReAgingTransactionByLoanExternalIDWithTheFollowingD PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); String loanExternalId = loanResponse.getResourceExternalId(); - PostLoansLoanIdTransactionsRequest reAgingRequest = setReAgingRequestProperties(// + PostLoansLoanIdTransactionsRequest reAgingRequest = setReAgeingRequestProperties(// LoanRequestFactory.defaultReAgingRequest(), // table.row(0), // table.row(1) // @@ -399,7 +399,7 @@ public CallFailedRuntimeException getCreateLoanReAgeFailureResponse(DataTable ta Assertions.assertNotNull(loanResponse); final long loanId = loanResponse.getLoanId(); - PostLoansLoanIdTransactionsRequest reAgingRequest = setReAgingRequestProperties(// + PostLoansLoanIdTransactionsRequest reAgingRequest = setReAgeingRequestProperties(// LoanRequestFactory.defaultReAgingRequest(), // table.row(0), // table.row(1) // diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanStepDef.java index 27c2a2bc9ae..da78fee7fa3 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanStepDef.java @@ -678,10 +678,10 @@ public void createFullyCustomizedLoanWithInterestRateFrequencyType(final DataTab createFullyCustomizedLoanWithInterestRateFrequency(data.get(1)); } - @When("Admin creates a fully customized loan with graceOnArrearsAging and following data:") - public void createFullyCustomizedLoanWithGraceOnArrearsAging(final DataTable table) throws IOException { + @When("Admin creates a fully customized loan with graceOnArrearsAgeing and following data:") + public void createFullyCustomizedLoanWithGraceOnArrearsAgeing(final DataTable table) throws IOException { final List> data = table.asLists(); - createFullyCustomizedLoanWithGraceOnArrearsAging(data.get(1)); + createFullyCustomizedLoanWithGraceOnArrearsAgeing(data.get(1)); } @When("Admin creates a fully customized loan with charges and following data:") @@ -3617,7 +3617,7 @@ public void createFullyCustomizedLoanWithInterestRateFrequency(final List loanData) throws IOException { + public void createFullyCustomizedLoanWithGraceOnArrearsAgeing(final List loanData) throws IOException { final String loanProduct = loanData.get(0); final String submitDate = loanData.get(1); final String principal = loanData.get(2); @@ -3634,7 +3634,7 @@ public void createFullyCustomizedLoanWithGraceOnArrearsAging(final List final Integer graceOnInterestPayment = Integer.valueOf(loanData.get(13)); final Integer graceOnInterestCharged = Integer.valueOf(loanData.get(14)); final String transactionProcessingStrategyCode = loanData.get(15); - final String graceOnArrearsAgingStr = loanData.get(16); + final String graceOnArrearsAgeingStr = loanData.get(16); final PostClientsResponse clientResponse = testContext().get(TestContextKey.CLIENT_CREATE_RESPONSE); final Long clientId = clientResponse.getClientId(); @@ -3661,7 +3661,7 @@ public void createFullyCustomizedLoanWithGraceOnArrearsAging(final List .valueOf(transactionProcessingStrategyCode); final String transactionProcessingStrategyCodeValue = processingStrategyCode.getValue(); - Integer graceOnArrearsAgingValue = Integer.valueOf(graceOnArrearsAgingStr); + Integer graceOnArrearsAgeingValue = Integer.valueOf(graceOnArrearsAgeingStr); final PostLoansRequest loansRequest = loanRequestFactory// .defaultLoansRequest(clientId)// @@ -3682,7 +3682,7 @@ public void createFullyCustomizedLoanWithGraceOnArrearsAging(final List .graceOnInterestPayment(graceOnInterestPayment)// .graceOnInterestPayment(graceOnInterestCharged)// .transactionProcessingStrategyCode(transactionProcessingStrategyCodeValue)// - .graceOnArrearsAging(graceOnArrearsAgingValue);// + .graceOnArrearsAgeing(graceOnArrearsAgeingValue);// final PostLoansResponse response = ok( () -> fineractClient.loans().calculateLoanScheduleOrSubmitLoanApplication(loansRequest, Map.of())); diff --git a/fineract-e2e-tests-runner/src/test/resources/features/LoanDelinquency.feature b/fineract-e2e-tests-runner/src/test/resources/features/LoanDelinquency.feature index 366cfa4893f..b3444a6d681 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/LoanDelinquency.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/LoanDelinquency.feature @@ -2146,7 +2146,7 @@ Feature: LoanDelinquency | 5 | RANGE_90 | 250.00 | @TestRailId:C4140 - Scenario: Verify that loan delinquent days are correct when graceOnArrearsAging is set on loan product level (value=3) + Scenario: Verify that loan delinquent days are correct when graceOnArrearsAgeing is set on loan product level (value=3) When Admin sets the business date to "01 January 2025" And Admin creates a client with random data And Admin creates a fully customized loan with the following data: @@ -2162,11 +2162,11 @@ Feature: LoanDelinquency | RANGE_90 | 666.68 | 04 February 2025 | 100 | 103 | @TestRailId:C4141 - Scenario: Verify that loan delinquent days are correct when graceOnArrearsAging is overrided on loan level (value=5) + Scenario: Verify that loan delinquent days are correct when graceOnArrearsAgeing is overrided on loan level (value=5) When Admin sets the business date to "01 January 2025" And Admin creates a client with random data - And Admin creates a fully customized loan with graceOnArrearsAging and following data: - | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | graceOnArrearsAging | + And Admin creates a fully customized loan with graceOnArrearsAgeing and following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | graceOnArrearsAgeing | | LP2_PROGRESSIVE_ADVANCED_PAYMENT_ALLOCATION_BUYDOWN_FEES | 01 January 2025 | 1000 | 0 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | 5 | And Admin successfully approves the loan on "01 January 2025" with "1000" amount and expected disbursement date on "01 January 2025" And Admin successfully disburse the loan on "01 January 2025" with "1000" EUR transaction amount diff --git a/fineract-e2e-tests-runner/src/test/resources/features/LoanOverrideFileds.feature b/fineract-e2e-tests-runner/src/test/resources/features/LoanOverrideFileds.feature index 26069e719c8..7d8fc9aa93f 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/LoanOverrideFileds.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/LoanOverrideFileds.feature @@ -10,11 +10,11 @@ Feature: LoanOverrideFields | inArrearsTolerance | null | | graceOnPrincipalPayment | null | | graceOnInterestPayment | null | - | graceOnArrearsAging | null | + | graceOnArrearsAgeing | null | Then LoanDetails has "inArrearsTolerance" field with value: "10" Then LoanDetails has "graceOnPrincipalPayment" field with value: "1" Then LoanDetails has "graceOnInterestPayment" field with value: "1" - Then LoanDetails has "graceOnArrearsAging" field with value: "3" + Then LoanDetails has "graceOnArrearsAgeing" field with value: "3" @TestRailId:C4143 Scenario: Verify that all nullable fields ignore overrides when overrides not allowed @@ -25,11 +25,11 @@ Feature: LoanOverrideFields | inArrearsTolerance | 11 | | graceOnPrincipalPayment | 2 | | graceOnInterestPayment | 2 | - | graceOnArrearsAging | 4 | + | graceOnArrearsAgeing | 4 | Then LoanDetails has "inArrearsTolerance" field with value: "10" Then LoanDetails has "graceOnPrincipalPayment" field with value: "1" Then LoanDetails has "graceOnInterestPayment" field with value: "1" - Then LoanDetails has "graceOnArrearsAging" field with value: "3" + Then LoanDetails has "graceOnArrearsAgeing" field with value: "3" @TestRailId:C4144 Scenario: Verify that nullable fields default to product when override is allowed but not provided @@ -40,11 +40,11 @@ Feature: LoanOverrideFields | inArrearsTolerance | null | | graceOnPrincipalPayment | null | | graceOnInterestPayment | null | - | graceOnArrearsAging | null | + | graceOnArrearsAgeing | null | Then LoanDetails has "inArrearsTolerance" field with value: "10" Then LoanDetails has "graceOnPrincipalPayment" field with value: "1" Then LoanDetails has "graceOnInterestPayment" field with value: "1" - Then LoanDetails has "graceOnArrearsAging" field with value: "3" + Then LoanDetails has "graceOnArrearsAgeing" field with value: "3" @TestRailId:C4145 Scenario: Verify that nullable fields default to product when override is allowed and provided @@ -55,8 +55,8 @@ Feature: LoanOverrideFields | inArrearsTolerance | 11 | | graceOnPrincipalPayment | 2 | | graceOnInterestPayment | 2 | - | graceOnArrearsAging | 4 | + | graceOnArrearsAgeing | 4 | Then LoanDetails has "inArrearsTolerance" field with value: "11" Then LoanDetails has "graceOnPrincipalPayment" field with value: "2" Then LoanDetails has "graceOnInterestPayment" field with value: "2" - Then LoanDetails has "graceOnArrearsAging" field with value: "4" + Then LoanDetails has "graceOnArrearsAgeing" field with value: "4" diff --git a/fineract-e2e-tests-runner/src/test/resources/features/LoanReAging.feature b/fineract-e2e-tests-runner/src/test/resources/features/LoanReAging.feature index 3c813052b6e..08811d80f26 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/LoanReAging.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/LoanReAging.feature @@ -518,7 +518,7 @@ Feature: LoanReAging Then Loan is closed with zero outstanding balance and it's all installments have obligations met @TestRailId:C3059 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging transaction - partial principal payment scenario + undo re-aging + Scenario: Verify Loan re-aging transaction - partial principal payment scenario + undo re-ageing When Admin sets the business date to "01 January 2024" When Admin creates a client with random data When Admin set "LP2_DOWNPAYMENT_AUTO_ADVANCED_PAYMENT_ALLOCATION" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/LoanDelinquencyDomainServiceImpl.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/LoanDelinquencyDomainServiceImpl.java index cb9450dae75..e4fc1eb187f 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/LoanDelinquencyDomainServiceImpl.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/LoanDelinquencyDomainServiceImpl.java @@ -113,8 +113,8 @@ public CollectionData getOverdueCollectionData(final Loan loan, final List loanIds) { } } - public void updateLoanArrearsAgingDetailsForAllLoans() { + public void updateLoanArrearsAgeingDetailsForAllLoans() { truncateLoanArrearsAgingDetails(); - String insertSQLStatement = buildQueryForInsertAgingDetails(Boolean.TRUE); - List insertStatements = updateLoanArrearsAgingDetailsWithOriginalScheduleForAllLoans(); + String insertSQLStatement = buildQueryForInsertAgeingDetails(Boolean.TRUE); + List insertStatements = updateLoanArrearsAgeingDetailsWithOriginalScheduleForAllLoans(); insertStatements.add(0, insertSQLStatement); final int[] records = this.jdbcTemplate.batchUpdate(insertStatements.toArray(new String[0])); if (log.isDebugEnabled()) { @@ -72,14 +72,14 @@ public void updateLoanArrearsAgingDetailsForAllLoans() { for (int record : records) { result += record; } - log.debug("Records affected by updateLoanArrearsAgingDetails: {}", result); + log.debug("Records affected by updateLoanArrearsAgeingDetails: {}", result); } } - public void updateLoanArrearsAgingDetails(List loanIdsForUpdate) { + public void updateLoanArrearsAgeingDetails(List loanIdsForUpdate) { deleteLoanArrearsAgingDetails(loanIdsForUpdate); - String insertSQLStatement = buildQueryForInsertAgingDetails(Boolean.FALSE); + String insertSQLStatement = buildQueryForInsertAgeingDetails(Boolean.FALSE); List batch = new ArrayList(); if (!loanIdsForUpdate.isEmpty()) { for (Long loanId : loanIdsForUpdate) { @@ -89,7 +89,7 @@ public void updateLoanArrearsAgingDetails(List loanIdsForUpdate) { } final int[] recordsUpdatedWithoutOriginalSchedule = this.jdbcTemplate.batchUpdate(insertSQLStatement, batch); int[] recordsUpdatedWithOriginalSchedule = new int[0]; - List insertStatements = updateLoanArrearsAgingDetailsWithOriginalSchedule(loanIdsForUpdate); + List insertStatements = updateLoanArrearsAgeingDetailsWithOriginalSchedule(loanIdsForUpdate); if (!insertStatements.isEmpty()) { recordsUpdatedWithOriginalSchedule = this.jdbcTemplate.batchUpdate(insertStatements.toArray(new String[0])); @@ -104,12 +104,12 @@ public void updateLoanArrearsAgingDetails(List loanIdsForUpdate) { result += recordWithOriginalSchedule; } } - log.debug("Records affected by updateLoanArrearsAgingDetails: {}", result); + log.debug("Records affected by updateLoanArrearsAgeingDetails: {}", result); } } - private String buildQueryForInsertAgingDetails(boolean isForAllLoans) { + private String buildQueryForInsertAgeingDetails(boolean isForAllLoans) { final StringBuilder insertSqlStatementBuilder = new StringBuilder(900); final String principalOverdueCalculationSql = "SUM(COALESCE(mr.principal_amount, 0) - coalesce(mr.principal_completed_derived, 0) - coalesce(mr.principal_writtenoff_derived, 0))"; final String interestOverdueCalculationSql = "SUM(COALESCE(mr.interest_amount, 0) - coalesce(mr.interest_writtenoff_derived, 0) - coalesce(mr.interest_waived_derived, 0) - " @@ -139,7 +139,7 @@ private String buildQueryForInsertAgingDetails(boolean isForAllLoans) { } insertSqlStatementBuilder.append(" and mr.completed_derived is false "); insertSqlStatementBuilder.append(" and mr.duedate < ") - .append(sqlGenerator.subDate(sqlGenerator.currentBusinessDate(), "COALESCE(ml.grace_on_arrears_aging, 0)", "day")) + .append(sqlGenerator.subDate(sqlGenerator.currentBusinessDate(), "COALESCE(ml.grace_on_arrears_ageing, 0)", "day")) .append(" "); insertSqlStatementBuilder .append(" and (prd.arrears_based_on_original_schedule = false or prd.arrears_based_on_original_schedule is null) "); @@ -147,7 +147,7 @@ private String buildQueryForInsertAgingDetails(boolean isForAllLoans) { return insertSqlStatementBuilder.toString(); } - private List updateLoanArrearsAgingDetailsWithOriginalSchedule(List loanIdsForUpdate) { + private List updateLoanArrearsAgeingDetailsWithOriginalSchedule(List loanIdsForUpdate) { List insertStatement = new ArrayList<>(); String sqlForLoanIdentifiers = buildQueryForLoanIdentifiersWithOriginalSchedule(Boolean.FALSE); List loanIdsForQuery = new ArrayList<>(); @@ -166,7 +166,7 @@ private List updateLoanArrearsAgingDetailsWithOriginalSchedule(List updateLoanArrearsAgingDetailsWithOriginalScheduleForAllLoans() { + private List updateLoanArrearsAgeingDetailsWithOriginalScheduleForAllLoans() { List insertStatement = new ArrayList<>(); String sqlForLoanIdentifiers = buildQueryForLoanIdentifiersWithOriginalSchedule(Boolean.TRUE); List loanIds = this.jdbcTemplate.queryForList(sqlForLoanIdentifiers, Long.class); @@ -191,7 +191,7 @@ private String buildQueryForLoanIdentifiersWithOriginalSchedule(boolean isForAll loanIdentifier.append(" and ml.id IN (?)"); } loanIdentifier.append(" and mr.completed_derived is false and mr.duedate < ") - .append(sqlGenerator.subDate(sqlGenerator.currentBusinessDate(), "COALESCE(ml.grace_on_arrears_aging, 0)", "day")) + .append(sqlGenerator.subDate(sqlGenerator.currentBusinessDate(), "COALESCE(ml.grace_on_arrears_ageing, 0)", "day")) .append(" group by ml.id"); return loanIdentifier.toString(); } @@ -233,7 +233,7 @@ private static final class LoanOriginalScheduleExtractor implements ResultSetExt "mr.interest_amount as interestAmount, mr.fee_charges_amount as feeAmount, mr.penalty_charges_amount as penaltyAmount "); scheduleDetail.append("from m_loan ml INNER JOIN m_loan_repayment_schedule_history mr on mr.loan_id = ml.id "); scheduleDetail.append("where mr.duedate < " - + sqlGenerator.subDate(sqlGenerator.currentBusinessDate(), "COALESCE(ml.grace_on_arrears_aging, 0)", "day") + " and "); + + sqlGenerator.subDate(sqlGenerator.currentBusinessDate(), "COALESCE(ml.grace_on_arrears_ageing, 0)", "day") + " and "); scheduleDetail.append("ml.id IN(:loanIds)").append(" and mr.version = ("); scheduleDetail.append("select max(lrs.version) from m_loan_repayment_schedule_history lrs where mr.loan_id = lrs.loan_id"); scheduleDetail.append(") order by ml.id,mr.duedate"); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/updateloanarrearsaging/UpdateLoanArrearsAgingConfig.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/updateloanarrearsageing/UpdateLoanArrearsAgeingConfig.java similarity index 71% rename from fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/updateloanarrearsaging/UpdateLoanArrearsAgingConfig.java rename to fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/updateloanarrearsageing/UpdateLoanArrearsAgeingConfig.java index 7ae496562a7..063285c1826 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/updateloanarrearsaging/UpdateLoanArrearsAgingConfig.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/updateloanarrearsageing/UpdateLoanArrearsAgeingConfig.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.fineract.portfolio.loanaccount.jobs.updateloanarrearsaging; +package org.apache.fineract.portfolio.loanaccount.jobs.updateloanarrearsageing; import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.jobs.service.JobName; @@ -32,27 +32,27 @@ @Configuration @RequiredArgsConstructor -public class UpdateLoanArrearsAgingConfig { +public class UpdateLoanArrearsAgeingConfig { private final JobRepository jobRepository; private final PlatformTransactionManager transactionManager; - private final LoanArrearsAgingUpdateHandler updateLoanArrearsAgingService; + private final LoanArrearsAgeingUpdateHandler updateLoanArrearsAgingService; @Bean - protected Step updateLoanArrearsAgingStep() { - return new StepBuilder(JobName.UPDATE_LOAN_ARREARS_AGING.name(), jobRepository) - .tasklet(updateLoanArrearsAgingTasklet(), transactionManager).build(); + protected Step updateLoanArrearsAgeingStep() { + return new StepBuilder(JobName.UPDATE_LOAN_ARREARS_AGEING.name(), jobRepository) + .tasklet(updateLoanArrearsAgeingTasklet(), transactionManager).build(); } @Bean - public Job updateLoanArrearsAgingJob() { - return new JobBuilder(JobName.UPDATE_LOAN_ARREARS_AGING.name(), jobRepository).start(updateLoanArrearsAgingStep()) + public Job updateLoanArrearsAgeingJob() { + return new JobBuilder(JobName.UPDATE_LOAN_ARREARS_AGEING.name(), jobRepository).start(updateLoanArrearsAgeingStep()) .incrementer(new RunIdIncrementer()).build(); } @Bean - public UpdateLoanArrearsAgingTasklet updateLoanArrearsAgingTasklet() { - return new UpdateLoanArrearsAgingTasklet(updateLoanArrearsAgingService); + public UpdateLoanArrearsAgeingTasklet updateLoanArrearsAgeingTasklet() { + return new UpdateLoanArrearsAgeingTasklet(updateLoanArrearsAgingService); } } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/updateloanarrearsaging/UpdateLoanArrearsAgingTasklet.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/updateloanarrearsageing/UpdateLoanArrearsAgeingTasklet.java similarity index 84% rename from fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/updateloanarrearsaging/UpdateLoanArrearsAgingTasklet.java rename to fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/updateloanarrearsageing/UpdateLoanArrearsAgeingTasklet.java index ed10f0fa24e..ce8fb3d88b5 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/updateloanarrearsaging/UpdateLoanArrearsAgingTasklet.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/updateloanarrearsageing/UpdateLoanArrearsAgeingTasklet.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.fineract.portfolio.loanaccount.jobs.updateloanarrearsaging; +package org.apache.fineract.portfolio.loanaccount.jobs.updateloanarrearsageing; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -27,13 +27,13 @@ @Slf4j @RequiredArgsConstructor -public class UpdateLoanArrearsAgingTasklet implements Tasklet { +public class UpdateLoanArrearsAgeingTasklet implements Tasklet { - private final LoanArrearsAgingUpdateHandler loanArrearsAgingUpdateHandler; + private final LoanArrearsAgeingUpdateHandler loanArrearsAgeingUpdateHandler; @Override public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception { - loanArrearsAgingUpdateHandler.updateLoanArrearsAgingDetailsForAllLoans(); + loanArrearsAgeingUpdateHandler.updateLoanArrearsAgeingDetailsForAllLoans(); return RepeatStatus.FINISHED; } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanApplicationTerms.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanApplicationTerms.java index 1cd6a5d318c..fc85244e2fa 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanApplicationTerms.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanApplicationTerms.java @@ -134,7 +134,7 @@ public final class LoanApplicationTerms { private LocalDate interestChargedFromDate; private Money inArrearsTolerance; - private Integer graceOnArrearsAging; + private Integer graceOnArrearsAgeing; // added private LocalDate loanEndDate; @@ -556,7 +556,7 @@ public static LoanApplicationTerms assembleFrom(final CurrencyData currency, fin final Integer recurringMoratoriumOnPrincipalPeriods, final Integer graceOnInterestPayment, final Integer graceOnInterestCharged, final LocalDate interestChargedFromDate, final Money inArrearsTolerance, final boolean multiDisburseLoan, final BigDecimal emiAmount, final List disbursementDatas, final BigDecimal maxOutstandingBalance, - final Integer graceOnArrearsAging, final DaysInMonthType daysInMonthType, final DaysInYearType daysInYearType, + final Integer graceOnArrearsAgeing, final DaysInMonthType daysInMonthType, final DaysInYearType daysInYearType, final boolean isInterestRecalculationEnabled, final RecalculationFrequencyType recalculationFrequencyType, final CalendarInstance restCalendarInstance, final InterestRecalculationCompoundingMethod interestRecalculationCompoundingMethod, @@ -589,7 +589,7 @@ public static LoanApplicationTerms assembleFrom(final CurrencyData currency, fin allowPartialPeriodInterestCalculation, principalMoney, expectedDisbursementDate, repaymentsStartingFromDate, calculatedRepaymentsStartingFromDate, graceOnPrincipalPayment, recurringMoratoriumOnPrincipalPeriods, graceOnInterestPayment, graceOnInterestCharged, interestChargedFromDate, inArrearsTolerance, multiDisburseLoan, emiAmount, - disbursementDatas, maxOutstandingBalance, graceOnArrearsAging, daysInMonthType, daysInYearType, + disbursementDatas, maxOutstandingBalance, graceOnArrearsAgeing, daysInMonthType, daysInYearType, isInterestRecalculationEnabled, rescheduleStrategyMethod, interestRecalculationCompoundingMethod, restCalendarInstance, recalculationFrequencyType, compoundingCalendarInstance, compoundingFrequencyType, principalThresholdForLastInstalment, installmentAmountInMultiplesOf, preClosureInterestCalculationStrategy, loanCalendar, approvedAmount, loanTermVariations, @@ -664,7 +664,7 @@ public static LoanApplicationTerms assembleFrom(final CurrencyData currency, fin allowPartialPeriodInterestCalculation, principalMoney, expectedDisbursementDate, repaymentsStartingFromDate, calculatedRepaymentsStartingFromDate, graceOnPrincipalPayment, recurringMoratoriumOnPrincipalPeriods, graceOnInterestPayment, graceOnInterestCharged, interestChargedFromDate, inArrearsTolerance, multiDisburseLoan, emiAmount, - disbursementDatas, maxOutstandingBalance, loanProductRelatedDetail.getGraceOnArrearsAging(), daysInMonthType, + disbursementDatas, maxOutstandingBalance, loanProductRelatedDetail.getGraceOnArrearsAgeing(), daysInMonthType, daysInYearType, isInterestRecalculationEnabled, rescheduleStrategyMethod, compoundingMethod, restCalendarInstance, recalculationFrequencyType, compoundingCalendarInstance, compoundingFrequencyType, principalThresholdForLastInstalment, installmentAmountInMultiplesOf, loanPreClosureInterestCalculationStrategy, loanCalendar, approvedAmount, loanTermVariations, @@ -694,7 +694,7 @@ private LoanApplicationTerms(final CurrencyData currency, final Integer loanTerm final Integer recurringMoratoriumOnPrincipalPeriods, final Integer interestPaymentGrace, final Integer interestChargingGrace, final LocalDate interestChargedFromDate, final Money inArrearsTolerance, final boolean multiDisburseLoan, final BigDecimal emiAmount, final List disbursementDatas, final BigDecimal maxOutstandingBalance, - final Integer graceOnArrearsAging, final DaysInMonthType daysInMonthType, final DaysInYearType daysInYearType, + final Integer graceOnArrearsAgeing, final DaysInMonthType daysInMonthType, final DaysInYearType daysInYearType, final boolean isInterestRecalculationEnabled, final LoanRescheduleStrategyMethod rescheduleStrategyMethod, final InterestRecalculationCompoundingMethod interestRecalculationCompoundingMethod, final CalendarInstance restCalendarInstance, final RecalculationFrequencyType recalculationFrequencyType, @@ -753,7 +753,7 @@ private LoanApplicationTerms(final CurrencyData currency, final Integer loanTerm this.actualFixedEmiAmount = emiAmount; this.disbursementDatas = disbursementDatas; this.maxOutstandingBalance = maxOutstandingBalance; - this.graceOnArrearsAging = graceOnArrearsAging; + this.graceOnArrearsAgeing = graceOnArrearsAgeing; this.daysInMonthType = daysInMonthType; this.daysInYearType = daysInYearType; this.interestRecalculationEnabled = isInterestRecalculationEnabled; @@ -1684,7 +1684,7 @@ public LoanProductRelatedDetail toLoanProductRelatedDetail() { this.interestCalculationPeriodMethod, this.allowPartialPeriodInterestCalculation, this.repaymentEvery, this.repaymentPeriodFrequencyType, this.numberOfRepayments, this.principalGrace, this.recurringMoratoriumOnPrincipalPeriods, this.interestPaymentGrace, this.interestChargingGrace, this.amortizationMethod, this.inArrearsTolerance.getAmount(), - this.graceOnArrearsAging, this.daysInMonthType.getValue(), this.daysInYearType.getValue(), + this.graceOnArrearsAgeing, this.daysInMonthType.getValue(), this.daysInYearType.getValue(), this.interestRecalculationEnabled, this.isEqualAmortization, this.isDownPaymentEnabled, this.disbursedAmountPercentageForDownPayment, this.isAutoRepaymentForDownPaymentEnabled, this.loanScheduleType, this.loanScheduleProcessingType, this.fixedLength, this.enableAccrualActivityPosting, this.supportedInterestRefundTypes, diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanArrearsAgingService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanArrearsAgingService.java index 891fe66f072..0625fdaf550 100755 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanArrearsAgingService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanArrearsAgingService.java @@ -26,11 +26,11 @@ public interface LoanArrearsAgingService { - void updateLoanArrearsAgingDetailsWithOriginalSchedule(Loan loan); + void updateLoanArrearsAgeingDetailsWithOriginalSchedule(Loan loan); Map> getScheduleDate(String loanId); - void updateLoanArrearsAgingDetails(Loan loan); + void updateLoanArrearsAgeingDetails(Loan loan); void createInsertStatements(List insertStatement, Map> scheduleDate, boolean isInsertStatement); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanArrearsAgingServiceImpl.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanArrearsAgingServiceImpl.java index af8ddd9dd7a..7e126b3bb60 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanArrearsAgingServiceImpl.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanArrearsAgingServiceImpl.java @@ -98,7 +98,7 @@ public void registerForNotification() { } @Override - public void updateLoanArrearsAgingDetailsWithOriginalSchedule(final Loan loan) { + public void updateLoanArrearsAgeingDetailsWithOriginalSchedule(final Loan loan) { int count = this.jdbcTemplate.queryForObject("select count(mla.loan_id) from m_loan_arrears_aging mla where mla.loan_id =?", Integer.class, loan.getId()); List updateStatement = new ArrayList<>(); @@ -125,7 +125,7 @@ public Map> getScheduleDate(String loanId) { } @Override - public void updateLoanArrearsAgingDetails(final Loan loan) { + public void updateLoanArrearsAgeingDetails(final Loan loan) { if (loan != null) { int count = this.jdbcTemplate.queryForObject("select count(mla.loan_id) from m_loan_arrears_aging mla where mla.loan_id =?", Integer.class, loan.getId()); @@ -373,7 +373,7 @@ private static final class OriginalScheduleExtractor implements ResultSetExtract "mr.interest_amount as interestAmount, mr.fee_charges_amount as feeAmount, mr.penalty_charges_amount as penaltyAmount "); scheduleDetail.append("from m_loan ml INNER JOIN m_loan_repayment_schedule_history mr on mr.loan_id = ml.id "); scheduleDetail.append("where mr.duedate < " - + sqlGenerator.subDate(sqlGenerator.currentBusinessDate(), "COALESCE(ml.grace_on_arrears_aging, 0)", "day") + " and "); + + sqlGenerator.subDate(sqlGenerator.currentBusinessDate(), "COALESCE(ml.grace_on_arrears_ageing, 0)", "day") + " and "); scheduleDetail.append("ml.id IN(").append(loanIdsAsString).append(") and mr.version = ("); scheduleDetail.append("select max(lrs.version) from m_loan_repayment_schedule_history lrs where mr.loan_id = lrs.loan_id"); scheduleDetail.append(") order by ml.id,mr.duedate"); @@ -413,9 +413,9 @@ private LoanSchedulePeriodData fetchLoanSchedulePeriodData(ResultSet rs) throws private void handleArrearsForLoan(Loan loan) { if (loan != null && loan.isOpen() && loan.isInterestBearingAndInterestRecalculationEnabled() && loan.loanProduct().isArrearsBasedOnOriginalSchedule()) { - updateLoanArrearsAgingDetailsWithOriginalSchedule(loan); + updateLoanArrearsAgeingDetailsWithOriginalSchedule(loan); } else { - updateLoanArrearsAgingDetails(loan); + updateLoanArrearsAgeingDetails(loan); } } @@ -528,7 +528,7 @@ private final class DisbursementEventListener implements BusinessEventListener charges = null; final Collection principalVariations = new ArrayList<>(1); @@ -394,7 +394,7 @@ public static LoanProductData lookup(final Long id, final String name, final Boo includeInBorrowerCycle, useBorrowerCycle, startDate, closeDate, status, externalId, principalVariations, interestRateVariations, numberOfRepaymentVariations, multiDisburseLoan, maxTrancheCount, outstandingLoanBalance, disallowExpectedDisbursements, allowApprovedDisbursedAmountsOverApplied, overAppliedCalculationType, overAppliedNumber, - allowFullTermForTranche, graceOnArrearsAging, overdueDaysForNPA, daysInMonthType, daysInYearType, + allowFullTermForTranche, graceOnArrearsAgeing, overdueDaysForNPA, daysInMonthType, daysInYearType, isInterestRecalculationEnabled, interestRecalculationData, minimumDaysBetweenDisbursalAndFirstRepayment, holdGuaranteeFunds, productGuaranteeData, principalThresholdForLastInstallment, accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineInstallmentAmount, installmentAmountInMultiplesOf, loanProductConfigurableAttributes, @@ -453,7 +453,7 @@ public static LoanProductData lookupWithCurrency(final Long id, final String nam final Integer recurringMoratoriumOnPrincipalPeriods = null; final Integer graceOnInterestPayment = null; final Integer graceOnInterestCharged = null; - final Integer graceOnArrearsAging = null; + final Integer graceOnArrearsAgeing = null; final Integer overdueDaysForNPA = null; final Collection charges = null; @@ -535,7 +535,7 @@ public static LoanProductData lookupWithCurrency(final Long id, final String nam includeInBorrowerCycle, useBorrowerCycle, startDate, closeDate, status, externalId, principalVariations, interestRateVariations, numberOfRepaymentVariations, multiDisburseLoan, maxTrancheCount, outstandingLoanBalance, disallowExpectedDisbursements, allowApprovedDisbursedAmountsOverApplied, overAppliedCalculationType, overAppliedNumber, - allowFullTermForTranche, graceOnArrearsAging, overdueDaysForNPA, daysInMonthType, daysInYearType, + allowFullTermForTranche, graceOnArrearsAgeing, overdueDaysForNPA, daysInMonthType, daysInYearType, isInterestRecalculationEnabled, interestRecalculationData, minimumDaysBetweenDisbursalAndFirstRepayment, holdGuaranteeFunds, productGuaranteeData, principalThresholdForLastInstallment, accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineInstallmentAmount, installmentAmountInMultiplesOf, loanProductConfigurableAttributes, @@ -600,7 +600,7 @@ public static LoanProductData sensibleDefaultsForNewLoanProductCreation() { final Integer recurringMoratoriumOnPrincipalPeriods = null; final Integer graceOnInterestPayment = null; final Integer graceOnInterestCharged = null; - final Integer graceOnArrearsAging = null; + final Integer graceOnArrearsAgeing = null; final Integer overdueDaysForNPA = null; final Collection charges = null; @@ -683,7 +683,7 @@ public static LoanProductData sensibleDefaultsForNewLoanProductCreation() { includeInBorrowerCycle, useBorrowerCycle, startDate, closeDate, status, externalId, principalVariationsForBorrowerCycle, interestRateVariationsForBorrowerCycle, numberOfRepaymentVariationsForBorrowerCycle, multiDisburseLoan, maxTrancheCount, outstandingLoanBalance, disallowExpectedDisbursements, allowApprovedDisbursedAmountsOverApplied, overAppliedCalculationType, - overAppliedNumber, allowFullTermForTranche, graceOnArrearsAging, overdueDaysForNPA, daysInMonthType, daysInYearType, + overAppliedNumber, allowFullTermForTranche, graceOnArrearsAgeing, overdueDaysForNPA, daysInMonthType, daysInYearType, isInterestRecalculationEnabled, interestRecalculationData, minimumDaysBetweenDisbursalAndFirstRepayment, holdGuaranteeFunds, productGuaranteeData, principalThresholdForLastInstallment, accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineInstallmentAmount, installmentAmountInMultiplesOf, loanProductConfigurableAttributes, @@ -742,7 +742,7 @@ public static LoanProductData loanProductWithFloatingRates(final Long id, final final Integer recurringMoratoriumOnPrincipalPeriods = null; final Integer graceOnInterestPayment = null; final Integer graceOnInterestCharged = null; - final Integer graceOnArrearsAging = null; + final Integer graceOnArrearsAgeing = null; final Integer overdueDaysForNPA = null; final Collection charges = null; @@ -825,7 +825,7 @@ public static LoanProductData loanProductWithFloatingRates(final Long id, final includeInBorrowerCycle, useBorrowerCycle, startDate, closeDate, status, externalId, principalVariationsForBorrowerCycle, interestRateVariationsForBorrowerCycle, numberOfRepaymentVariationsForBorrowerCycle, multiDisburseLoan, maxTrancheCount, outstandingLoanBalance, disallowExpectedDisbursements, allowApprovedDisbursedAmountsOverApplied, overAppliedCalculationType, - overAppliedNumber, allowFullTermForTranche, graceOnArrearsAging, overdueDaysForNPA, daysInMonthType, daysInYearType, + overAppliedNumber, allowFullTermForTranche, graceOnArrearsAgeing, overdueDaysForNPA, daysInMonthType, daysInYearType, isInterestRecalculationEnabled, interestRecalculationData, minimumDaysBetweenDisbursalAndFirstRepayment, holdGuaranteeFunds, productGuaranteeData, principalThresholdForLastInstallment, accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineInstallmentAmount, installmentAmountInMultiplesOf, loanProductConfigurableAttributes, @@ -878,7 +878,7 @@ public LoanProductData(final Long id, final String name, final String shortName, Collection numberOfRepaymentVariations, Boolean multiDisburseLoan, Integer maxTrancheCount, BigDecimal outstandingLoanBalance, final Boolean disallowExpectedDisbursements, final Boolean allowApprovedDisbursedAmountsOverApplied, final String overAppliedCalculationType, - final Integer overAppliedNumber, final Boolean allowFullTermForTranche, final Integer graceOnArrearsAging, + final Integer overAppliedNumber, final Boolean allowFullTermForTranche, final Integer graceOnArrearsAgeing, final Integer overdueDaysForNPA, final EnumOptionData daysInMonthType, final EnumOptionData daysInYearType, final boolean isInterestRecalculationEnabled, final LoanProductInterestRecalculationData interestRecalculationData, final Integer minimumDaysBetweenDisbursalAndFirstRepayment, boolean holdGuaranteeFunds, @@ -1007,7 +1007,7 @@ public LoanProductData(final Long id, final String name, final String shortName, this.overAppliedNumber = overAppliedNumber; this.allowFullTermForTranche = allowFullTermForTranche; - this.graceOnArrearsAging = graceOnArrearsAging; + this.graceOnArrearsAgeing = graceOnArrearsAgeing; this.overdueDaysForNPA = overdueDaysForNPA; this.daysInMonthType = daysInMonthType; this.daysInYearType = daysInYearType; @@ -1210,7 +1210,7 @@ public LoanProductData(final LoanProductData productData, final Collection loanProductBorrowerCycleVariations, final boolean multiDisburseLoan, final Integer maxTrancheCount, final BigDecimal outstandingLoanBalance, - final Integer graceOnArrearsAging, final Integer overdueDaysForNPA, final DaysInMonthType daysInMonthType, + final Integer graceOnArrearsAgeing, final Integer overdueDaysForNPA, final DaysInMonthType daysInMonthType, final DaysInYearType daysInYearType, final boolean isInterestRecalculationEnabled, final LoanProductInterestRecalculationDetails productInterestRecalculationDetails, final Integer minimumDaysBetweenDisbursalAndFirstRepayment, final boolean holdGuarantorFunds, @@ -335,7 +335,7 @@ public LoanProduct(final Fund fund, final String transactionProcessingStrategyCo interestPeriodFrequencyType, defaultAnnualNominalInterestRate, interestMethod, interestCalculationPeriodMethod, considerPartialPeriodInterest, repayEvery, repaymentFrequencyType, defaultNumberOfInstallments, graceOnPrincipalPayment, recurringMoratoriumOnPrincipalPeriods, graceOnInterestPayment, graceOnInterestCharged, amortizationMethod, - inArrearsTolerance, graceOnArrearsAging, daysInMonthType.getValue(), daysInYearType.getValue(), + inArrearsTolerance, graceOnArrearsAgeing, daysInMonthType.getValue(), daysInYearType.getValue(), isInterestRecalculationEnabled, isEqualAmortization, enableDownPayment, disbursedAmountPercentageForDownPayment, enableAutoRepaymentForDownPayment, loanScheduleType, loanScheduleProcessingType, fixedLength, enableAccrualActivityPosting, supportedInterestRefundTypes, chargeOffBehaviour, isInterestRecognitionOnDisbursementDate, daysInYearCustomStrategy, diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductConfigurableAttributes.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductConfigurableAttributes.java index 583d71dbeca..ffde89ff12d 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductConfigurableAttributes.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductConfigurableAttributes.java @@ -58,14 +58,14 @@ public class LoanProductConfigurableAttributes extends AbstractPersistableCustom @Column(name = "moratorium") private Boolean graceOnPrincipalAndInterestPayment; - @Column(name = "grace_on_arrears_aging") - private Boolean graceOnArrearsAging; + @Column(name = "grace_on_arrears_ageing") + private Boolean graceOnArrearsAgeing; private static final String[] supportedLoanConfigurableAttributes = { LoanProductConstants.amortizationTypeParamName, LoanProductConstants.interestTypeParamName, LoanProductConstants.transactionProcessingStrategyCodeParamName, LoanProductConstants.interestCalculationPeriodTypeParamName, LoanProductConstants.inArrearsToleranceParamName, LoanProductConstants.repaymentEveryParamName, LoanProductConstants.graceOnPrincipalAndInterestPaymentParamName, - LoanProductConstants.GRACE_ON_ARREARS_AGING_PARAMETER_NAME }; + LoanProductConstants.GRACE_ON_ARREARS_AGEING_PARAMETER_NAME }; public static LoanProductConfigurableAttributes createFrom(JsonCommand command) { @@ -92,7 +92,7 @@ public static LoanProductConfigurableAttributes createFrom(JsonCommand command) .getAsJsonPrimitive(LoanProductConstants.graceOnPrincipalAndInterestPaymentParamName).getAsBoolean(); final Boolean graceOnArrearsAging = command.parsedJson().getAsJsonObject() .getAsJsonObject(LoanProductConstants.allowAttributeOverridesParamName) - .getAsJsonPrimitive(LoanProductConstants.GRACE_ON_ARREARS_AGING_PARAMETER_NAME).getAsBoolean(); + .getAsJsonPrimitive(LoanProductConstants.GRACE_ON_ARREARS_AGEING_PARAMETER_NAME).getAsBoolean(); return new LoanProductConfigurableAttributes(amortization, interestMethod, transactionProcessingStrategy, interestCalcPeriod, arrearsTolerance, repaymentEvery, graceOnPrincipalAndInterestPayment, graceOnArrearsAging); @@ -122,7 +122,7 @@ public LoanProductConfigurableAttributes(Boolean amortization, Boolean interestM this.amortizationType = amortization; this.interestType = interestMethod; this.inArrearsTolerance = arrearsTolerance; - this.graceOnArrearsAging = graceOnArrearsAging; + this.graceOnArrearsAgeing = graceOnArrearsAging; this.interestCalculationPeriodType = interestCalcPeriod; this.graceOnPrincipalAndInterestPayment = graceOnPrincipalAndInterestPayment; this.repaymentEvery = repaymentEvery; @@ -170,7 +170,7 @@ public Boolean getGraceOnPrincipalAndInterestPaymentBoolean() { } public Boolean getGraceOnArrearsAgingBoolean() { - return graceOnArrearsAging; + return graceOnArrearsAgeing; } public void setLoanProduct(LoanProduct loanProduct) { @@ -205,8 +205,8 @@ public void setGraceOnPrincipalAndInterestPayment(Boolean graceOnPrincipalAndInt this.graceOnPrincipalAndInterestPayment = graceOnPrincipalAndInterestPayment; } - public void setGraceOnArrearsAging(Boolean graceOnArrearsAging) { - this.graceOnArrearsAging = graceOnArrearsAging; + public void setGraceOnArrearsAgeing(Boolean graceOnArrearsAgeing) { + this.graceOnArrearsAgeing = graceOnArrearsAgeing; } @Override @@ -227,12 +227,12 @@ public boolean equals(Object o) { && Objects.equals(interestCalculationPeriodType, that.interestCalculationPeriodType) && Objects.equals(inArrearsTolerance, that.inArrearsTolerance) && Objects.equals(repaymentEvery, that.repaymentEvery) && Objects.equals(graceOnPrincipalAndInterestPayment, that.graceOnPrincipalAndInterestPayment) - && Objects.equals(graceOnArrearsAging, that.graceOnArrearsAging); + && Objects.equals(graceOnArrearsAgeing, that.graceOnArrearsAgeing); } @Override public int hashCode() { return Objects.hash(loanProduct, amortizationType, interestType, transactionProcessingStrategyCode, interestCalculationPeriodType, - inArrearsTolerance, repaymentEvery, graceOnPrincipalAndInterestPayment, graceOnArrearsAging); + inArrearsTolerance, repaymentEvery, graceOnPrincipalAndInterestPayment, graceOnArrearsAgeing); } } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductRelatedDetail.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductRelatedDetail.java index 354e1a8f772..5dc77092720 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductRelatedDetail.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductRelatedDetail.java @@ -124,8 +124,8 @@ public class LoanProductRelatedDetail { @Column(name = "arrearstolerance_amount", scale = 6, precision = 19) private BigDecimal inArrearsTolerance; - @Column(name = "grace_on_arrears_aging") - private Integer graceOnArrearsAging; + @Column(name = "grace_on_arrears_ageing") + private Integer graceOnArrearsAgeing; @Column(name = "days_in_month_enum", nullable = false) private Integer daysInMonthType; @@ -217,7 +217,7 @@ public static LoanProductRelatedDetail createFrom(final CurrencyData currencyDat final Integer repaymentEvery, final PeriodFrequencyType repaymentPeriodFrequencyType, final Integer numberOfRepayments, final Integer graceOnPrincipalPayment, final Integer recurringMoratoriumOnPrincipalPeriods, final Integer graceOnInterestPayment, final Integer graceOnInterestCharged, final AmortizationMethod amortizationMethod, - final BigDecimal inArrearsTolerance, final Integer graceOnArrearsAging, final Integer daysInMonthType, + final BigDecimal inArrearsTolerance, final Integer graceOnArrearsAgeing, final Integer daysInMonthType, final Integer daysInYearType, final boolean isInterestRecalculationEnabled, final boolean isEqualAmortization, final boolean enableDownPayment, final BigDecimal disbursedAmountPercentageForDownPayment, final boolean enableAutoRepaymentForDownPayment, final LoanScheduleType loanScheduleType, @@ -236,7 +236,7 @@ public static LoanProductRelatedDetail createFrom(final CurrencyData currencyDat nominalAnnualInterestRate, interestMethod, interestCalculationPeriodMethod, allowPartialPeriodInterestCalculation, repaymentEvery, repaymentPeriodFrequencyType, numberOfRepayments, graceOnPrincipalPayment, recurringMoratoriumOnPrincipalPeriods, graceOnInterestPayment, graceOnInterestCharged, amortizationMethod, - inArrearsTolerance, graceOnArrearsAging, daysInMonthType, daysInYearType, isInterestRecalculationEnabled, + inArrearsTolerance, graceOnArrearsAgeing, daysInMonthType, daysInYearType, isInterestRecalculationEnabled, isEqualAmortization, enableDownPayment, disbursedAmountPercentageForDownPayment, enableAutoRepaymentForDownPayment, loanScheduleType, loanScheduleProcessingType, fixedLength, enableAccrualActivityPosting, supportedInterestRefundTypes, chargeOffBehaviour, interestRecognitionOnDisbursementDate, daysInYearCustomStrategy, enableIncomeCapitalization, @@ -255,7 +255,7 @@ public LoanProductRelatedDetail(final MonetaryCurrency currency, final BigDecima final Integer repayEvery, final PeriodFrequencyType repaymentFrequencyType, final Integer defaultNumberOfRepayments, final Integer graceOnPrincipalPayment, final Integer recurringMoratoriumOnPrincipalPeriods, final Integer graceOnInterestPayment, final Integer graceOnInterestCharged, final AmortizationMethod amortizationMethod, - final BigDecimal inArrearsTolerance, final Integer graceOnArrearsAging, final Integer daysInMonthType, + final BigDecimal inArrearsTolerance, final Integer graceOnArrearsAgeing, final Integer daysInMonthType, final Integer daysInYearType, final boolean isInterestRecalculationEnabled, final boolean isEqualAmortization, final boolean enableDownPayment, final BigDecimal disbursedAmountPercentageForDownPayment, final boolean enableAutoRepaymentForDownPayment, final LoanScheduleType loanScheduleType, @@ -290,7 +290,7 @@ public LoanProductRelatedDetail(final MonetaryCurrency currency, final BigDecima } else { this.inArrearsTolerance = inArrearsTolerance; } - this.graceOnArrearsAging = graceOnArrearsAging; + this.graceOnArrearsAgeing = graceOnArrearsAgeing; this.daysInMonthType = daysInMonthType; this.daysInYearType = daysInYearType; this.isInterestRecalculationEnabled = isInterestRecalculationEnabled; diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/ProgressiveEMICalculator.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/ProgressiveEMICalculator.java index 7b96c5a53e4..041e7c97f7c 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/ProgressiveEMICalculator.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/ProgressiveEMICalculator.java @@ -872,7 +872,7 @@ private void mergeNewInterestScheduleModelWithExistingOne(final ProgressiveLoanI if (!paidBalancesFromTransactionDate.getOutstandingInterest().isZero() || !paidBalancesFromTransactionDate.getOutstandingPrincipal().isZero()) { - createRepaymentPeriodForEarlyRepaidAmountsDuringReAging(scheduleModel, + createRepaymentPeriodForEarlyRepaidAmountsDuringReAgeing(scheduleModel, paidBalancesFromTransactionDate.getOutstandingPrincipal(), paidBalancesFromTransactionDate.getOutstandingInterest(), false); } @@ -1827,7 +1827,7 @@ public void reAgeEqualAmortization(ProgressiveLoanInterestScheduleModel interest EqualAmortizationValues feesPenaltiesEqualAmortizationValues) { LocalDate originalMaturityDate = interestSchedule.getMaturityDate(); List reAgedRepaymentPeriods = new ArrayList<>(reageParameter.getNumberOfInstallments()); - OutstandingDetails reAgingAmounts = precalculateReAgeEqualAmortizationAmount(interestSchedule, transactionDate, reageParameter); + OutstandingDetails reAgeingAmounts = precalculateReAgeEqualAmortizationAmount(interestSchedule, transactionDate, reageParameter); Money zero = interestSchedule.zero(); // calculate already paid balances from transaction date @@ -1856,15 +1856,15 @@ public void reAgeEqualAmortization(ProgressiveLoanInterestScheduleModel interest interestSchedule.getLastRepaymentPeriod().setNoUnrecognisedInterest(true); if (!originalMaturityDate.isBefore(transactionDate)) { - createRepaymentPeriodForEarlyRepaidAmountsDuringReAging(interestSchedule, + createRepaymentPeriodForEarlyRepaidAmountsDuringReAgeing(interestSchedule, paidBalancesFromTransactionDate.getOutstandingPrincipal(), paidBalancesFromTransactionDate.getOutstandingInterest(), true); } updateModelForReageEqualAmortization(interestSchedule, reageParameter, reAgedRepaymentPeriods); - updateEMIForReAgeEqualAmortization(reAgedRepaymentPeriods, reAgingAmounts.getOutstandingPrincipal(), - reAgingAmounts.getOutstandingInterest(), feesPenaltiesOutstanding, feesPenaltiesEqualAmortizationValues, + updateEMIForReAgeEqualAmortization(reAgedRepaymentPeriods, reAgeingAmounts.getOutstandingPrincipal(), + reAgeingAmounts.getOutstandingInterest(), feesPenaltiesOutstanding, feesPenaltiesEqualAmortizationValues, zero.getCurrency()); calculateOutstandingBalance(interestSchedule); @@ -1898,7 +1898,7 @@ private void updateModelForReageEqualAmortization(ProgressiveLoanInterestSchedul } } - private void createRepaymentPeriodForEarlyRepaidAmountsDuringReAging(final ProgressiveLoanInterestScheduleModel interestSchedule, + private void createRepaymentPeriodForEarlyRepaidAmountsDuringReAgeing(final ProgressiveLoanInterestScheduleModel interestSchedule, final Money totalPaidPrincipal, final Money totalPaidInterest, final boolean isReAged) { final RepaymentPeriod targetPeriod = interestSchedule.getLastRepaymentPeriod(); diff --git a/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/calc/ProgressiveEMICalculatorTest.java b/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/calc/ProgressiveEMICalculatorTest.java index 007d4aa00ea..c67c5a8bd0f 100644 --- a/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/calc/ProgressiveEMICalculatorTest.java +++ b/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/calc/ProgressiveEMICalculatorTest.java @@ -4277,7 +4277,7 @@ private ProgressiveLoanInterestScheduleModel generateSchedule() { } @Test - public void test_chargeBackOn2ndRP_ReAgingOn1stRPsDueDate_EQUAL_AMORTIZATION_FULL_INTEREST() { + public void test_chargeBackOn2ndRP_ReAgeingOn1stRPsDueDate_EQUAL_AMORTIZATION_FULL_INTEREST() { ProgressiveLoanInterestScheduleModel interestSchedule = generateSchedule(); emiCalculator.payPrincipal(interestSchedule, LocalDate.of(2024, 1, 1), LocalDate.of(2024, 2, 1), LocalDate.of(2024, 2, 1), @@ -4312,7 +4312,7 @@ public void test_chargeBackOn2ndRP_ReAgingOn1stRPsDueDate_EQUAL_AMORTIZATION_FUL } @Test - public void test_chargeBackOn2ndRP_ReAgingOn2stRPsDueDate_EQUAL_AMORTIZATION_FULL_INTEREST() { + public void test_chargeBackOn2ndRP_ReAgeingOn2stRPsDueDate_EQUAL_AMORTIZATION_FULL_INTEREST() { ProgressiveLoanInterestScheduleModel interestSchedule = generateSchedule(); emiCalculator.payPrincipal(interestSchedule, LocalDate.of(2024, 1, 1), LocalDate.of(2024, 2, 1), LocalDate.of(2024, 2, 1), @@ -4347,7 +4347,7 @@ public void test_chargeBackOn2ndRP_ReAgingOn2stRPsDueDate_EQUAL_AMORTIZATION_FUL } @Test - public void test_chargeBackOn2ndRP_ReAgingDuring2stRP_EQUAL_AMORTIZATION_FULL_INTEREST() { + public void test_chargeBackOn2ndRP_ReAgeingDuring2stRP_EQUAL_AMORTIZATION_FULL_INTEREST() { ProgressiveLoanInterestScheduleModel interestSchedule = generateSchedule(); emiCalculator.payPrincipal(interestSchedule, LocalDate.of(2024, 1, 1), LocalDate.of(2024, 2, 1), LocalDate.of(2024, 2, 1), diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/UpdateLoanArrearsAgingBusinessStep.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/UpdateLoanArrearsAgingBusinessStep.java index 47ddf892f2b..47b05c39612 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/UpdateLoanArrearsAgingBusinessStep.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/UpdateLoanArrearsAgingBusinessStep.java @@ -21,19 +21,19 @@ import java.util.Arrays; import lombok.RequiredArgsConstructor; import org.apache.fineract.portfolio.loanaccount.domain.Loan; -import org.apache.fineract.portfolio.loanaccount.jobs.updateloanarrearsaging.LoanArrearsAgingUpdateHandler; +import org.apache.fineract.portfolio.loanaccount.jobs.updateloanarrearsageing.LoanArrearsAgeingUpdateHandler; import org.springframework.stereotype.Component; @Component @RequiredArgsConstructor public class UpdateLoanArrearsAgingBusinessStep implements LoanCOBBusinessStep { - private final LoanArrearsAgingUpdateHandler loanArrearsAgingUpdateHandler; + private final LoanArrearsAgeingUpdateHandler loanArrearsAgeingUpdateHandler; @Override public Loan execute(Loan loan) { Long loanId = loan.getId(); - loanArrearsAgingUpdateHandler.updateLoanArrearsAgingDetails(Arrays.asList(loanId)); + loanArrearsAgeingUpdateHandler.updateLoanArrearsAgeingDetails(Arrays.asList(loanId)); return loan; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResource.java index 6d0c71c3a3b..01d0e2eddee 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResource.java @@ -211,8 +211,8 @@ + "graceOnInterestPayment\n" + "Optional: Integer - represents the number of repayment periods that grace should apply to the interest component of a repayment period. Interest is still calculated but offset to later repayment periods.\n" + "graceOnInterestCharged\n" + "Optional: Integer - represents the number of repayment periods that should be interest-free.\n" - + "graceOnArrearsAging\n" - + "Optional: Integer - Used in Arrears calculation to only take into account loans that are more than graceOnArrearsAging days overdue.\n" + + "graceOnArrearsAgeing\n" + + "Optional: Integer - Used in Arrears calculation to only take into account loans that are more than graceOnArrearsAgeing days overdue.\n" + "interestChargedFromDate\n" + "Optional: Date - The date from with interest is to start being charged.\n" + "expectedDisbursementDate\n" + "The proposed disbursement date of the loan so a proposed repayment schedule can be provided.\n" + "submittedOnDate\n" + "The date the loan application was submitted by applicant.\n" + "linkAccountId\n" @@ -552,7 +552,7 @@ public String retrieveAll(@Context final UriInfo uriInfo, @Operation(summary = "Calculate loan repayment schedule | Submit a new Loan Application", description = "It calculates the loan repayment Schedule\n" + "Submits a new loan application\n" + "Mandatory Fields: clientId, productId, principal, loanTermFrequency, loanTermFrequencyType, loanType, numberOfRepayments, repaymentEvery, repaymentFrequencyType, interestRatePerPeriod, amortizationType, interestType, interestCalculationPeriodType, transactionProcessingStrategyCode, expectedDisbursementDate, submittedOnDate, loanType\n" - + "Optional Fields: graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, linkAccountId, allowPartialPeriodInterestCalculation, fixedEmiAmount, maxOutstandingLoanBalance, disbursementData, graceOnArrearsAging, createStandingInstructionAtDisbursement (requires linkedAccountId if set to true)\n" + + "Optional Fields: graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, linkAccountId, allowPartialPeriodInterestCalculation, fixedEmiAmount, maxOutstandingLoanBalance, disbursementData, graceOnArrearsAgeing, createStandingInstructionAtDisbursement (requires linkedAccountId if set to true)\n" + "Additional Mandatory Fields if interest recalculation is enabled for product and Rest frequency not same as repayment period: recalculationRestFrequencyDate\n" + "Additional Mandatory Fields if interest recalculation with interest/fee compounding is enabled for product and compounding frequency not same as repayment period: recalculationCompoundingFrequencyDate\n" + "Additional Mandatory Field if Entity-Datatable Check is enabled for the entity of type loan: datatables") diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResourceSwagger.java index 6050796bc9c..8d97966ca6e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResourceSwagger.java @@ -1227,7 +1227,7 @@ private GetLoansLoanIdLoanTermEnumData() {} @Schema(example = "0") public Integer graceOnInterestCharged; @Schema(example = "3") - public Integer graceOnArrearsAging; + public Integer graceOnArrearsAgeing; @Schema(example = "false") public Boolean enableDownPayment; @Schema(example = "0.000000") @@ -1361,7 +1361,7 @@ private PostLoansRequest() {} @Schema(example = "1") public Integer graceOnInterestPayment; @Schema(example = "1") - public Integer graceOnArrearsAging; + public Integer graceOnArrearsAgeing; @Schema(example = "10") public BigDecimal inArrearsTolerance; @Schema(example = "HORIZONTAL") @@ -1542,7 +1542,7 @@ private PutLoansLoanIdRequest() {} @Schema(example = "true") public Boolean fraud; @Schema(example = "1") - public Integer graceOnArrearsAging; + public Integer graceOnArrearsAgeing; @Schema(example = "1") public Long loanIdToClose; @Schema(example = "true") diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleAssembler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleAssembler.java index 546d8627d00..768a38a64be 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleAssembler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleAssembler.java @@ -365,10 +365,10 @@ private LoanApplicationTerms assembleLoanApplicationTermsFrom(final JsonElement final Boolean isInterestChargedFromDateSameAsDisbursalDateEnabled = this.configurationDomainService .isInterestChargedFromDateSameAsDisbursementDate(); - Integer graceOnArrearsAging = this.fromApiJsonHelper - .extractIntegerWithLocaleNamed(LoanProductConstants.GRACE_ON_ARREARS_AGING_PARAMETER_NAME, element); - if (!allowOverridingGraceOnArrearsAging || graceOnArrearsAging == null) { - graceOnArrearsAging = loanProduct.getLoanProductRelatedDetail().getGraceOnArrearsAging(); + Integer graceOnArrearsAgeing = this.fromApiJsonHelper + .extractIntegerWithLocaleNamed(LoanProductConstants.GRACE_ON_ARREARS_AGEING_PARAMETER_NAME, element); + if (!allowOverridingGraceOnArrearsAging || graceOnArrearsAgeing == null) { + graceOnArrearsAgeing = loanProduct.getLoanProductRelatedDetail().getGraceOnArrearsAgeing(); } // other @@ -539,7 +539,7 @@ private LoanApplicationTerms assembleLoanApplicationTermsFrom(final JsonElement allowPartialPeriodInterestCalculation, principalMoney, expectedDisbursementDate, repaymentsStartingFromDate, calculatedRepaymentsStartingFromDate, graceOnPrincipalPayment, recurringMoratoriumOnPrincipalPeriods, graceOnInterestPayment, graceOnInterestCharged, interestChargedFromDate, inArrearsToleranceMoney, - loanProduct.isMultiDisburseLoan(), emiAmount, disbursementDatas, maxOutstandingBalance, graceOnArrearsAging, + loanProduct.isMultiDisburseLoan(), emiAmount, disbursementDatas, maxOutstandingBalance, graceOnArrearsAgeing, daysInMonthType, daysInYearType, isInterestRecalculationEnabled, recalculationFrequencyType, restCalendarInstance, compoundingMethod, compoundingCalendarInstance, compoundingFrequencyType, principalThresholdForLastInstalment, loanProduct.getLoanProductRelatedDetail().getInstallmentAmountInMultiplesOf(), @@ -1243,7 +1243,7 @@ public void updateProductRelatedDetails(LoanProductRelatedDetail productRelatedD .setInArrearsTolerance(loan.loanProduct().getLoanProductRelatedDetail().getInArrearsTolerance().getAmount()); } if (!graceOnArrearsAging) { - productRelatedDetail.setGraceOnArrearsAging(loan.loanProduct().getLoanProductRelatedDetail().getGraceOnArrearsAging()); + productRelatedDetail.setGraceOnArrearsAgeing(loan.loanProduct().getLoanProductRelatedDetail().getGraceOnArrearsAgeing()); } if (!interestCalcPeriod) { productRelatedDetail.setInterestCalculationPeriodMethod( @@ -1413,12 +1413,12 @@ public void updateLoanApplicationAttributes(JsonCommand command, Loan loan, Map< loanProductRelatedDetail.setGraceOnInterestCharged(newValue); } - if (command.isChangeInIntegerParameterNamed(LoanProductConstants.GRACE_ON_ARREARS_AGING_PARAMETER_NAME, - loanProductRelatedDetail.getGraceOnArrearsAging())) { - final Integer newValue = command.integerValueOfParameterNamed(LoanProductConstants.GRACE_ON_ARREARS_AGING_PARAMETER_NAME); - changes.put(LoanProductConstants.GRACE_ON_ARREARS_AGING_PARAMETER_NAME, newValue); + if (command.isChangeInIntegerParameterNamed(LoanProductConstants.GRACE_ON_ARREARS_AGEING_PARAMETER_NAME, + loanProductRelatedDetail.getGraceOnArrearsAgeing())) { + final Integer newValue = command.integerValueOfParameterNamed(LoanProductConstants.GRACE_ON_ARREARS_AGEING_PARAMETER_NAME); + changes.put(LoanProductConstants.GRACE_ON_ARREARS_AGEING_PARAMETER_NAME, newValue); changes.put("locale", localeAsInput); - loanProductRelatedDetail.setGraceOnArrearsAging(newValue); + loanProductRelatedDetail.setGraceOnArrearsAgeing(newValue); } if (command.isChangeInIntegerParameterNamed(LoanProductConstants.DAYS_IN_MONTH_TYPE_PARAMETER_NAME, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanApplicationValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanApplicationValidator.java index e374ceec6f8..6401f9957f2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanApplicationValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanApplicationValidator.java @@ -165,7 +165,7 @@ public final class LoanApplicationValidator { LoanApiConstants.syncDisbursementWithMeetingParameterName, // optional LoanApiConstants.linkAccountIdParameterName, LoanApiConstants.disbursementDataParameterName, LoanApiConstants.fixedEmiAmountParameterName, LoanApiConstants.maxOutstandingBalanceParameterName, - LoanProductConstants.GRACE_ON_ARREARS_AGING_PARAMETER_NAME, + LoanProductConstants.GRACE_ON_ARREARS_AGEING_PARAMETER_NAME, LoanApiConstants.createStandingInstructionAtDisbursementParameterName, LoanApiConstants.isTopup, LoanApiConstants.loanIdToClose, LoanApiConstants.datatables, LoanApiConstants.isEqualAmortizationParam, LoanProductConstants.RATES_PARAM_NAME, LoanApiConstants.applicationId, // glim specific @@ -500,9 +500,9 @@ private void validateForCreate(final JsonElement element) { baseDataValidator.reset().parameter(LoanApiConstants.graceOnInterestChargedParameterName).value(graceOnInterestCharged) .zeroOrPositiveAmount(); - final Integer graceOnArrearsAging = this.fromApiJsonHelper - .extractIntegerWithLocaleNamed(LoanProductConstants.GRACE_ON_ARREARS_AGING_PARAMETER_NAME, element); - baseDataValidator.reset().parameter(LoanProductConstants.GRACE_ON_ARREARS_AGING_PARAMETER_NAME).value(graceOnArrearsAging) + final Integer graceOnArrearsAgeing = this.fromApiJsonHelper + .extractIntegerWithLocaleNamed(LoanProductConstants.GRACE_ON_ARREARS_AGEING_PARAMETER_NAME, element); + baseDataValidator.reset().parameter(LoanProductConstants.GRACE_ON_ARREARS_AGEING_PARAMETER_NAME).value(graceOnArrearsAgeing) .zeroOrPositiveAmount(); if (this.fromApiJsonHelper.parameterExists(LoanApiConstants.interestChargedFromDateParameterName, element)) { @@ -1219,10 +1219,10 @@ public void validateForModify(final JsonCommand command, final Loan loan) { .zeroOrPositiveAmount(); } - if (this.fromApiJsonHelper.parameterExists(LoanProductConstants.GRACE_ON_ARREARS_AGING_PARAMETER_NAME, element)) { - final Integer graceOnArrearsAging = this.fromApiJsonHelper - .extractIntegerWithLocaleNamed(LoanProductConstants.GRACE_ON_ARREARS_AGING_PARAMETER_NAME, element); - baseDataValidator.reset().parameter(LoanProductConstants.GRACE_ON_ARREARS_AGING_PARAMETER_NAME).value(graceOnArrearsAging) + if (this.fromApiJsonHelper.parameterExists(LoanProductConstants.GRACE_ON_ARREARS_AGEING_PARAMETER_NAME, element)) { + final Integer graceOnArrearsAgeing = this.fromApiJsonHelper + .extractIntegerWithLocaleNamed(LoanProductConstants.GRACE_ON_ARREARS_AGEING_PARAMETER_NAME, element); + baseDataValidator.reset().parameter(LoanProductConstants.GRACE_ON_ARREARS_AGEING_PARAMETER_NAME).value(graceOnArrearsAgeing) .zeroOrPositiveAmount(); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanScheduleValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanScheduleValidator.java index 5c38020ee0a..344acdc7d6c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanScheduleValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanScheduleValidator.java @@ -67,7 +67,7 @@ public final class LoanScheduleValidator { LoanApiConstants.chargesParameterName, LoanApiConstants.collateralParameterName, LoanApiConstants.syncDisbursementWithMeetingParameterName, LoanApiConstants.linkAccountIdParameterName, LoanApiConstants.disbursementDataParameterName, LoanApiConstants.fixedEmiAmountParameterName, - LoanApiConstants.maxOutstandingBalanceParameterName, LoanProductConstants.GRACE_ON_ARREARS_AGING_PARAMETER_NAME, + LoanApiConstants.maxOutstandingBalanceParameterName, LoanProductConstants.GRACE_ON_ARREARS_AGEING_PARAMETER_NAME, LoanApiConstants.createStandingInstructionAtDisbursementParameterName, LoanApiConstants.isFloatingInterestRateParameterName, LoanApiConstants.interestRateDifferentialParameterName, LoanApiConstants.repaymentFrequencyNthDayTypeParameterName, LoanApiConstants.repaymentFrequencyDayOfWeekTypeParameterName, LoanApiConstants.isTopup, LoanApiConstants.loanIdToClose, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductAssembler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductAssembler.java index 7411839baa9..170dd1e4b7a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductAssembler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductAssembler.java @@ -197,8 +197,8 @@ public LoanProduct assembleFromJson(final Fund fund, final String loanTransactio maxTrancheCount = command.integerValueOfParameterNamed(LoanProductConstants.MAX_TRANCHE_COUNT_PARAMETER_NAME); } - final Integer graceOnArrearsAging = command - .integerValueOfParameterNamed(LoanProductConstants.GRACE_ON_ARREARS_AGING_PARAMETER_NAME); + final Integer graceOnArrearsAgeing = command + .integerValueOfParameterNamed(LoanProductConstants.GRACE_ON_ARREARS_AGEING_PARAMETER_NAME); final Integer overdueDaysForNPA = command.integerValueOfParameterNamed(LoanProductConstants.OVERDUE_DAYS_FOR_NPA_PARAMETER_NAME); @@ -342,7 +342,7 @@ public LoanProduct assembleFromJson(final Fund fund, final String loanTransactio recurringMoratoriumOnPrincipalPeriods, graceOnInterestPayment, graceOnInterestCharged, amortizationMethod, inArrearsTolerance, productCharges, accountingRuleType, includeInBorrowerCycle, startDate, closeDate, externalId, useBorrowerCycle, loanProductBorrowerCycleVariations, multiDisburseLoan, maxTrancheCount, outstandingLoanBalance, - graceOnArrearsAging, overdueDaysForNPA, daysInMonthType, daysInYearType, isInterestRecalculationEnabled, + graceOnArrearsAgeing, overdueDaysForNPA, daysInMonthType, daysInYearType, isInterestRecalculationEnabled, interestRecalculationSettings, minimumDaysBetweenDisbursalAndFirstRepayment, holdGuarantorFunds, loanProductGuaranteeDetails, principalThresholdForLastInstallment, accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineEmiAmount, installmentAmountInMultiplesOf, loanConfigurableAttributes, isLinkedToFloatingInterestRates, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductRelatedDetailUpdateUtil.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductRelatedDetailUpdateUtil.java index a2bf4424bf2..3133bf0077b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductRelatedDetailUpdateUtil.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductRelatedDetailUpdateUtil.java @@ -248,12 +248,12 @@ public Map updateLoanRepaymentSchedule(final LoanProductRelatedD loanRepaymentScheduleDetail.setGraceOnInterestCharged(newValue); } - if (command.isChangeInIntegerParameterNamed(LoanProductConstants.GRACE_ON_ARREARS_AGING_PARAMETER_NAME, - loanRepaymentScheduleDetail.getGraceOnArrearsAging())) { - final Integer newValue = command.integerValueOfParameterNamed(LoanProductConstants.GRACE_ON_ARREARS_AGING_PARAMETER_NAME); - actualChanges.put(LoanProductConstants.GRACE_ON_ARREARS_AGING_PARAMETER_NAME, newValue); + if (command.isChangeInIntegerParameterNamed(LoanProductConstants.GRACE_ON_ARREARS_AGEING_PARAMETER_NAME, + loanRepaymentScheduleDetail.getGraceOnArrearsAgeing())) { + final Integer newValue = command.integerValueOfParameterNamed(LoanProductConstants.GRACE_ON_ARREARS_AGEING_PARAMETER_NAME); + actualChanges.put(LoanProductConstants.GRACE_ON_ARREARS_AGEING_PARAMETER_NAME, newValue); actualChanges.put("locale", localeAsInput); - loanRepaymentScheduleDetail.setGraceOnArrearsAging(newValue); + loanRepaymentScheduleDetail.setGraceOnArrearsAgeing(newValue); } if (command.isChangeInIntegerParameterNamed(LoanProductConstants.DAYS_IN_MONTH_TYPE_PARAMETER_NAME, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductUpdateUtil.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductUpdateUtil.java index 0c16cb5729a..ac28a3ea2fb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductUpdateUtil.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductUpdateUtil.java @@ -357,12 +357,12 @@ public Map update(final LoanProduct loanProduct, final JsonComma } if (command.parsedJson().getAsJsonObject().getAsJsonObject(LoanProductConstants.allowAttributeOverridesParamName) - .getAsJsonPrimitive(LoanProductConstants.GRACE_ON_ARREARS_AGING_PARAMETER_NAME) + .getAsJsonPrimitive(LoanProductConstants.GRACE_ON_ARREARS_AGEING_PARAMETER_NAME) .getAsBoolean() != loanProduct.getLoanConfigurableAttributes().getGraceOnArrearsAgingBoolean()) { loanProduct.getLoanConfigurableAttributes() - .setGraceOnArrearsAging(command.parsedJson().getAsJsonObject() + .setGraceOnArrearsAgeing(command.parsedJson().getAsJsonObject() .getAsJsonObject(LoanProductConstants.allowAttributeOverridesParamName) - .getAsJsonPrimitive(LoanProductConstants.GRACE_ON_ARREARS_AGING_PARAMETER_NAME).getAsBoolean()); + .getAsJsonPrimitive(LoanProductConstants.GRACE_ON_ARREARS_AGEING_PARAMETER_NAME).getAsBoolean()); } } else { loanProduct.setLoanConfigurableAttributes(LoanProductConfigurableAttributes.populateDefaultsForConfigurableAttributes()); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java index f630d90bc3c..7003b0b73e5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java @@ -793,7 +793,7 @@ public String loanSchema() { + " l.closedon_date as closedOnDate, cbu.username as closedByUsername, cbu.firstname as closedByFirstname, cbu.lastname as closedByLastname, l.writtenoffon_date as writtenOffOnDate, " + " l.expected_firstrepaymenton_date as expectedFirstRepaymentOnDate, l.interest_calculated_from_date as interestChargedFromDate, l.maturedon_date as actualMaturityDate, l.expected_maturedon_date as expectedMaturityDate, " + " l.principal_amount_proposed as proposedPrincipal, l.principal_amount as principal, l.total_principal_derived as totalPrincipal, l.approved_principal as approvedPrincipal, l.net_disbursal_amount as netDisbursalAmount, l.arrearstolerance_amount as inArrearsTolerance, l.number_of_repayments as numberOfRepayments, l.repay_every as repaymentEvery," - + " 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_aging as graceOnArrearsAging," + + " 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, " @@ -1019,7 +1019,7 @@ public LoanAccountData mapRow(final ResultSet rs, @SuppressWarnings("unused") fi "recurringMoratoriumOnPrincipalPeriods"); final Integer graceOnInterestPayment = JdbcSupport.getIntegerDefaultToNullIfZero(rs, "graceOnInterestPayment"); final Integer graceOnInterestCharged = JdbcSupport.getIntegerDefaultToNullIfZero(rs, "graceOnInterestCharged"); - final Integer graceOnArrearsAging = JdbcSupport.getIntegerDefaultToNullIfZero(rs, "graceOnArrearsAging"); + final Integer graceOnArrearsAgeing = JdbcSupport.getIntegerDefaultToNullIfZero(rs, "graceOnArrearsAgeing"); final Integer termFrequency = JdbcSupport.getInteger(rs, "termFrequency"); final Integer termPeriodFrequencyTypeInt = JdbcSupport.getInteger(rs, "termPeriodFrequencyType"); @@ -1267,7 +1267,7 @@ public LoanAccountData mapRow(final ResultSet rs, @SuppressWarnings("unused") fi allowPartialPeriodInterestCalculation, expectedFirstRepaymentOnDate, graceOnPrincipalPayment, recurringMoratoriumOnPrincipalPeriods, graceOnInterestPayment, graceOnInterestCharged, interestChargedFromDate, timeline, loanSummary, feeChargesDueAtDisbursementCharged, syncDisbursementWithMeeting, loanCounter, loanProductCounter, - multiDisburseLoan, canDefineInstallmentAmount, fixedEmiAmount, outstandingLoanBalance, inArrears, graceOnArrearsAging, + multiDisburseLoan, canDefineInstallmentAmount, fixedEmiAmount, outstandingLoanBalance, inArrears, graceOnArrearsAgeing, isNPA, daysInMonthType, daysInYearType, isInterestRecalculationEnabled, interestRecalculationData, createStandingInstructionAtDisbursement, isvariableInstallmentsAllowed, minimumGap, maximumGap, loanSubStatus, canUseForTopup, isTopup, closureLoanId, closureLoanAccountNo, topupAmount, isEqualAmortization, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/api/LoanProductsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/api/LoanProductsApiResource.java index afca0e54884..15d8cfb4cbd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/api/LoanProductsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/api/LoanProductsApiResource.java @@ -178,7 +178,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, graceOnArrearsAging, charges, paymentChannelToFundSourceMappings, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, chargeOffReasonToExpenseAccountMappings, includeInBorrowerCycle, useBorrowerCycle,principalVariationsForBorrowerCycle, numberOfRepaymentVariationsForBorrowerCycle, interestRateVariationsForBorrowerCycle, multiDisburseLoan,maxTrancheCount, outstandingLoanBalance,overdueDaysForNPA,holdGuaranteeFunds, principalThresholdForLastInstalment, accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineInstallmentAmount, installmentAmountInMultiplesOf, allowAttributeOverrides, allowPartialPeriodInterestCalculation,dueDaysForRepaymentEvent,overDueDaysForRepaymentEvent,enableDownPayment,disbursedAmountPercentageDownPayment,enableAutoRepaymentForDownPayment,repaymentStartDateType,enableBuyDownFee\n\n" + + "Optional Fields: inArrearsTolerance, graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, graceOnArrearsAgeing, charges, paymentChannelToFundSourceMappings, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, chargeOffReasonToExpenseAccountMappings, includeInBorrowerCycle, useBorrowerCycle,principalVariationsForBorrowerCycle, numberOfRepaymentVariationsForBorrowerCycle, interestRateVariationsForBorrowerCycle, multiDisburseLoan,maxTrancheCount, outstandingLoanBalance,overdueDaysForNPA,holdGuaranteeFunds, principalThresholdForLastInstalment, accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineInstallmentAmount, installmentAmountInMultiplesOf, allowAttributeOverrides, allowPartialPeriodInterestCalculation,dueDaysForRepaymentEvent,overDueDaysForRepaymentEvent,enableDownPayment,disbursedAmountPercentageDownPayment,enableAutoRepaymentForDownPayment,repaymentStartDateType,enableBuyDownFee\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" diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/serialization/LoanProductDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/serialization/LoanProductDataValidator.java index 37662214348..49242644d48 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/serialization/LoanProductDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/serialization/LoanProductDataValidator.java @@ -164,7 +164,7 @@ public final class LoanProductDataValidator { LoanProductConstants.INTEREST_RATE_VARIATIONS_FOR_BORROWER_CYCLE_PARAMETER_NAME, LoanProductConstants.NUMBER_OF_REPAYMENT_VARIATIONS_FOR_BORROWER_CYCLE_PARAMETER_NAME, LoanProductConstants.SHORT_NAME, LoanProductConstants.MULTI_DISBURSE_LOAN_PARAMETER_NAME, LoanProductConstants.OUTSTANDING_LOAN_BALANCE_PARAMETER_NAME, - LoanProductConstants.MAX_TRANCHE_COUNT_PARAMETER_NAME, LoanProductConstants.GRACE_ON_ARREARS_AGING_PARAMETER_NAME, + LoanProductConstants.MAX_TRANCHE_COUNT_PARAMETER_NAME, LoanProductConstants.GRACE_ON_ARREARS_AGEING_PARAMETER_NAME, LoanProductConstants.OVERDUE_DAYS_FOR_NPA_PARAMETER_NAME, LoanProductConstants.IS_INTEREST_RECALCULATION_ENABLED_PARAMETER_NAME, LoanProductConstants.DAYS_IN_YEAR_TYPE_PARAMETER_NAME, LoanProductConstants.DAYS_IN_MONTH_TYPE_PARAMETER_NAME, LoanProductConstants.rescheduleStrategyMethodParameterName, @@ -216,7 +216,7 @@ public final class LoanProductDataValidator { LoanProductConstants.interestTypeParamName, LoanProductConstants.transactionProcessingStrategyCodeParamName, LoanProductConstants.interestCalculationPeriodTypeParamName, LoanProductConstants.inArrearsToleranceParamName, LoanProductConstants.repaymentEveryParamName, LoanProductConstants.graceOnPrincipalAndInterestPaymentParamName, - LoanProductConstants.GRACE_ON_ARREARS_AGING_PARAMETER_NAME }; + LoanProductConstants.GRACE_ON_ARREARS_AGEING_PARAMETER_NAME }; public static final String LOANPRODUCT = "loanproduct"; public static final String OVER_APPLIED_CALCULATION_TYPE = "overAppliedCalculationType"; public static final String OPENING_SQUARE_BRACKET = "["; @@ -397,9 +397,9 @@ public void validateForCreate(final JsonCommand command) { final Integer graceOnInterestCharged = this.fromApiJsonHelper.extractIntegerWithLocaleNamed(GRACE_ON_INTEREST_CHARGED, element); baseDataValidator.reset().parameter(GRACE_ON_INTEREST_CHARGED).value(graceOnInterestCharged).zeroOrPositiveAmount(); - final Integer graceOnArrearsAging = this.fromApiJsonHelper - .extractIntegerWithLocaleNamed(LoanProductConstants.GRACE_ON_ARREARS_AGING_PARAMETER_NAME, element); - baseDataValidator.reset().parameter(LoanProductConstants.GRACE_ON_ARREARS_AGING_PARAMETER_NAME).value(graceOnArrearsAging) + final Integer graceOnArrearsAgeing = this.fromApiJsonHelper + .extractIntegerWithLocaleNamed(LoanProductConstants.GRACE_ON_ARREARS_AGEING_PARAMETER_NAME, element); + baseDataValidator.reset().parameter(LoanProductConstants.GRACE_ON_ARREARS_AGEING_PARAMETER_NAME).value(graceOnArrearsAgeing) .integerZeroOrGreater(); final Integer overdueDaysForNPA = this.fromApiJsonHelper @@ -1472,10 +1472,10 @@ public void validateForUpdate(final JsonCommand command, final LoanProduct loanP baseDataValidator.reset().parameter(GRACE_ON_INTEREST_CHARGED).value(graceOnInterestCharged).zeroOrPositiveAmount(); } - if (this.fromApiJsonHelper.parameterExists(LoanProductConstants.GRACE_ON_ARREARS_AGING_PARAMETER_NAME, element)) { - final Integer graceOnArrearsAging = this.fromApiJsonHelper - .extractIntegerWithLocaleNamed(LoanProductConstants.GRACE_ON_ARREARS_AGING_PARAMETER_NAME, element); - baseDataValidator.reset().parameter(LoanProductConstants.GRACE_ON_ARREARS_AGING_PARAMETER_NAME).value(graceOnArrearsAging) + if (this.fromApiJsonHelper.parameterExists(LoanProductConstants.GRACE_ON_ARREARS_AGEING_PARAMETER_NAME, element)) { + final Integer graceOnArrearsAgeing = this.fromApiJsonHelper + .extractIntegerWithLocaleNamed(LoanProductConstants.GRACE_ON_ARREARS_AGEING_PARAMETER_NAME, element); + baseDataValidator.reset().parameter(LoanProductConstants.GRACE_ON_ARREARS_AGEING_PARAMETER_NAME).value(graceOnArrearsAgeing) .integerZeroOrGreater(); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductReadPlatformServiceImpl.java index 801211fa1f2..895221d578a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductReadPlatformServiceImpl.java @@ -250,7 +250,7 @@ public String loanProductSchema() { + "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 allowPartialPeriodInterestCalculation, " + "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.enable_accrual_activity_posting as enableAccrualActivityPosting, " - + "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_aging as graceOnArrearsAging,lp.overdue_days_for_npa as overdueDaysForNPA, " + + "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, " + "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, " @@ -284,7 +284,7 @@ public String loanProductSchema() { + "curr.name as currencyName, curr.internationalized_name_code as currencyNameCode, curr.display_symbol as currencyDisplaySymbol, lp.external_id as externalId, " + "lca.id as lcaId, lca.amortization_method_enum as amortizationBoolean, lca.interest_method_enum as interestMethodConfigBoolean, " + "lca.loan_transaction_strategy_code as transactionProcessingStrategyBoolean,lca.interest_calculated_in_period_enum as interestCalcPeriodBoolean, lca.arrearstolerance_amount as arrearsToleranceBoolean, " - + "lca.repay_every as repaymentFrequencyBoolean, lca.moratorium as graceOnPrincipalAndInterestBoolean, lca.grace_on_arrears_aging as graceOnArrearsAgingBoolean, " + + "lca.repay_every as repaymentFrequencyBoolean, lca.moratorium as graceOnPrincipalAndInterestBoolean, lca.grace_on_arrears_ageing as graceOnArrearsAgingBoolean, " + "lp.is_linked_to_floating_interest_rates as isLinkedToFloatingInterestRates, " + "lfr.floating_rates_id as floatingRateId, " + "fr.name as floatingRateName, " + "lfr.interest_rate_differential as interestRateDifferential, " @@ -352,7 +352,7 @@ public LoanProductData mapRow(@NonNull final ResultSet rs, @SuppressWarnings("un "recurringMoratoriumOnPrincipalPeriods"); final Integer graceOnInterestPayment = JdbcSupport.getIntegerDefaultToNullIfZero(rs, "graceOnInterestPayment"); final Integer graceOnInterestCharged = JdbcSupport.getIntegerDefaultToNullIfZero(rs, "graceOnInterestCharged"); - final Integer graceOnArrearsAging = JdbcSupport.getIntegerDefaultToNullIfZero(rs, "graceOnArrearsAging"); + final Integer graceOnArrearsAgeing = JdbcSupport.getIntegerDefaultToNullIfZero(rs, "graceOnArrearsAgeing"); final Integer overdueDaysForNPA = JdbcSupport.getIntegerDefaultToNullIfZero(rs, "overdueDaysForNPA"); final Integer minimumDaysBetweenDisbursalAndFirstRepayment = JdbcSupport.getInteger(rs, "minimumDaysBetweenDisbursalAndFirstRepayment"); @@ -518,12 +518,12 @@ public LoanProductData mapRow(@NonNull final ResultSet rs, @SuppressWarnings("un final boolean arrearsTolerance = rs.getBoolean("arrearsToleranceBoolean"); final boolean repaymentFrequency = rs.getBoolean("repaymentFrequencyBoolean"); final boolean graceOnPrincipalAndInterest = rs.getBoolean("graceOnPrincipalAndInterestBoolean"); - final boolean graceOnArrearsAgingValue = rs.getBoolean("graceOnArrearsAgingBoolean"); + final boolean graceOnArrearsAging = rs.getBoolean("graceOnArrearsAgingBoolean"); LoanProductConfigurableAttributes allowAttributeOverrides = null; allowAttributeOverrides = new LoanProductConfigurableAttributes(amortization, interestMethod, transactionProcessingStrategy, - interestCalcPeriod, arrearsTolerance, repaymentFrequency, graceOnPrincipalAndInterest, graceOnArrearsAgingValue); + interestCalcPeriod, arrearsTolerance, repaymentFrequency, graceOnPrincipalAndInterest, graceOnArrearsAging); final boolean holdGuaranteeFunds = rs.getBoolean("holdGuaranteeFunds"); LoanProductGuaranteeData loanProductGuaranteeData = null; @@ -592,7 +592,7 @@ public LoanProductData mapRow(@NonNull final ResultSet rs, @SuppressWarnings("un principalVariationsForBorrowerCycle, interestRateVariationsForBorrowerCycle, numberOfRepaymentVariationsForBorrowerCycle, multiDisburseLoan, maxTrancheCount, outstandingLoanBalance, disallowExpectedDisbursements, allowApprovedDisbursedAmountsOverApplied, overAppliedCalculationType, overAppliedNumber, - allowFullTermForTranche, graceOnArrearsAging, overdueDaysForNPA, daysInMonthType, daysInYearType, + allowFullTermForTranche, graceOnArrearsAgeing, overdueDaysForNPA, daysInMonthType, daysInYearType, isInterestRecalculationEnabled, interestRecalculationData, minimumDaysBetweenDisbursalAndFirstRepayment, holdGuaranteeFunds, loanProductGuaranteeData, principalThresholdForLastInstallment, accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineInstallmentAmount, installmentAmountInMultiplesOf, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/loanaccount/api/SelfLoansApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/loanaccount/api/SelfLoansApiResource.java index 4369f0ef156..0454621ac7c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/loanaccount/api/SelfLoansApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/loanaccount/api/SelfLoansApiResource.java @@ -198,7 +198,7 @@ public String template(@QueryParam("clientId") @Parameter(description = "clientI + "Additional Mandatory Fields if interest recalculation is enabled for product and Rest frequency not same as repayment period: recalculationRestFrequencyDate\n\n" + "Additional Mandatory Fields if interest recalculation with interest/fee compounding is enabled for product and compounding frequency not same as repayment period: recalculationCompoundingFrequencyDate\n\n" + "Additional Mandatory Field if Entity-Datatable Check is enabled for the entity of type loan: datatables\n\n" - + "Optional Fields: graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, linkAccountId, allowPartialPeriodInterestCalculation, fixedEmiAmount, maxOutstandingLoanBalance, disbursementData, graceOnArrearsAging, createStandingInstructionAtDisbursement (requires linkedAccountId if set to true)\n\n" + + "Optional Fields: graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, linkAccountId, allowPartialPeriodInterestCalculation, fixedEmiAmount, maxOutstandingLoanBalance, disbursementData, graceOnArrearsAgeing, createStandingInstructionAtDisbursement (requires linkedAccountId if set to true)\n\n" + "Showing request/response for 'Submit a new Loan Application'") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = SelfLoansApiResourceSwagger.PostSelfLoansRequest.class))) @ApiResponses({ diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/products/api/SelfLoanProductsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/products/api/SelfLoanProductsApiResource.java index 6612064671d..63f2e842870 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/products/api/SelfLoanProductsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/products/api/SelfLoanProductsApiResource.java @@ -84,8 +84,8 @@ + "graceOnInterestPayment\n" + "Optional: Integer - represents the number of repayment periods that grace should apply to the interest component of a repayment period. Interest is still calculated but offset to later repayment periods.\n" + "graceOnInterestCharged\n" + "Optional: Integer - represents the number of repayment periods that should be interest-free.\n" - + "graceOnArrearsAging\n" - + "Optional: Integer - Used in Arrears calculation to only take into account loans that are more than graceOnArrearsAging days overdue.\n" + + "graceOnArrearsAgeing\n" + + "Optional: Integer - Used in Arrears calculation to only take into account loans that are more than graceOnArrearsAgeing days overdue.\n" + "overdueDaysForNPA\n" + "Optional: Integer - represents the maximum number of days a Loan may be overdue before being classified as a NPA (non performing asset)\n" + "accountMovesOutOfNPAOnlyOnArrearsCompletion\n" diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0001_initial_schema.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0001_initial_schema.xml index f16b8e88ba2..97c96088b18 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0001_initial_schema.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0001_initial_schema.xml @@ -2177,7 +2177,7 @@ - + @@ -3166,7 +3166,7 @@ - + @@ -3240,7 +3240,7 @@ - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0002_initial_data.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0002_initial_data.xml index 80c2ca066e0..a4037a9faee 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0002_initial_data.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0002_initial_data.xml @@ -554,14 +554,14 @@ - - + + - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0145_job_short_name.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0145_job_short_name.xml index 81463c66abb..5f1f87472b4 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0145_job_short_name.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0145_job_short_name.xml @@ -36,7 +36,7 @@ - name='Update Loan Arrears Aging' + name='Update Loan Arrears Ageing' diff --git a/fineract-provider/src/main/resources/sql/migrations/sample_data/barebones_db.sql b/fineract-provider/src/main/resources/sql/migrations/sample_data/barebones_db.sql index c7d32993407..e39c0014010 100644 --- a/fineract-provider/src/main/resources/sql/migrations/sample_data/barebones_db.sql +++ b/fineract-provider/src/main/resources/sql/migrations/sample_data/barebones_db.sql @@ -376,7 +376,7 @@ CREATE TABLE IF NOT EXISTS `job` ( /*!40000 ALTER TABLE `job` DISABLE KEYS */; INSERT INTO `job` (`id`, `name`, `display_name`, `cron_expression`, `create_time`, `task_priority`, `group_name`, `previous_run_start_time`, `next_run_time`, `job_key`, `initializing_errorlog`, `is_active`, `currently_running`, `updates_allowed`, `scheduler_group`, `is_misfired`) VALUES (1, 'Update loan Summary', 'Update loan Summary', '0 0 22 1/1 * ? *', '2015-06-03 02:56:57', 5, NULL, NULL, '2017-02-24 22:00:00', 'Update loan SummaryJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), - (2, 'Update Loan Arrears Aging', 'Update Loan Arrears Aging', '0 1 0 1/1 * ? *', '2015-06-03 02:56:57', 5, NULL, NULL, '2017-02-25 00:01:00', 'Update Loan Arrears AgingJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), + (2, 'Update Loan Arrears Ageing', 'Update Loan Arrears Ageing', '0 1 0 1/1 * ? *', '2015-06-03 02:56:57', 5, NULL, NULL, '2017-02-25 00:01:00', 'Update Loan Arrears AgeingJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), (3, 'Update Loan Paid In Advance', 'Update Loan Paid In Advance', '0 5 0 1/1 * ? *', '2015-06-03 02:56:57', 5, NULL, NULL, '2017-02-25 00:05:00', 'Update Loan Paid In AdvanceJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), (4, 'Apply Annual Fee For Savings', 'Apply Annual Fee For Savings', '0 20 22 1/1 * ? *', '2015-06-03 02:56:57', 5, NULL, NULL, '2017-02-24 22:20:00', 'Apply Annual Fee For SavingsJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), (5, 'Apply Holidays To Loans', 'Apply Holidays To Loans', '0 0 12 * * ?', '2015-06-03 02:56:57', 5, NULL, NULL, '2017-02-25 12:00:00', 'Apply Holidays To LoansJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), @@ -2246,7 +2246,7 @@ CREATE TABLE IF NOT EXISTS `m_loan` ( `loan_product_counter` SMALLINT DEFAULT NULL, `fixed_emi_amount` decimal(19,6) DEFAULT NULL, `max_outstanding_loan_balance` decimal(19,6) DEFAULT NULL, - `grace_on_arrears_aging` SMALLINT DEFAULT NULL, + `grace_on_arrears_ageing` SMALLINT DEFAULT NULL, `is_npa` tinyint NOT NULL DEFAULT '0', `total_recovered_derived` decimal(19,6) DEFAULT NULL, `accrued_till` date DEFAULT NULL, @@ -3951,7 +3951,7 @@ CREATE TABLE IF NOT EXISTS `m_product_loan` ( `allow_multiple_disbursals` tinyint NOT NULL DEFAULT '0', `max_disbursals` INT DEFAULT NULL, `max_outstanding_loan_balance` decimal(19,6) DEFAULT NULL, - `grace_on_arrears_aging` SMALLINT DEFAULT NULL, + `grace_on_arrears_ageing` SMALLINT DEFAULT NULL, `overdue_days_for_npa` SMALLINT DEFAULT NULL, `days_in_month_enum` SMALLINT NOT NULL DEFAULT '1', `days_in_year_enum` SMALLINT NOT NULL DEFAULT '1', @@ -4005,7 +4005,7 @@ CREATE TABLE IF NOT EXISTS `m_product_loan_configurable_attributes` ( `arrearstolerance_amount` TINYINT NOT NULL DEFAULT '1', `repay_every` TINYINT NOT NULL DEFAULT '1', `moratorium` TINYINT NOT NULL DEFAULT '1', - `grace_on_arrears_aging` TINYINT NOT NULL DEFAULT '1', + `grace_on_arrears_ageing` TINYINT NOT NULL DEFAULT '1', PRIMARY KEY (`id`), KEY `fk_m_product_loan_configurable_attributes_0001` (`loan_product_id`), CONSTRAINT `fk_m_product_loan_configurable_attributes_0001` FOREIGN KEY (`loan_product_id`) REFERENCES `m_product_loan` (`id`) diff --git a/fineract-provider/src/main/resources/sql/migrations/sample_data/load_sample_data.sql b/fineract-provider/src/main/resources/sql/migrations/sample_data/load_sample_data.sql index 58407f7a810..a5d1c7f294a 100644 --- a/fineract-provider/src/main/resources/sql/migrations/sample_data/load_sample_data.sql +++ b/fineract-provider/src/main/resources/sql/migrations/sample_data/load_sample_data.sql @@ -453,7 +453,7 @@ CREATE TABLE IF NOT EXISTS `job` ( /*!40000 ALTER TABLE `job` DISABLE KEYS */; INSERT INTO `job` (`id`, `name`, `display_name`, `cron_expression`, `create_time`, `task_priority`, `group_name`, `previous_run_start_time`, `next_run_time`, `job_key`, `initializing_errorlog`, `is_active`, `currently_running`, `updates_allowed`, `scheduler_group`, `is_misfired`) VALUES (1, 'Update loan Summary', 'Update loan Summary', '0 0 22 1/1 * ? *', '2014-03-07 18:29:14', 5, NULL, '2014-06-11 09:30:00', '2017-02-24 22:00:00', 'Update loan SummaryJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, 0), - (2, 'Update Loan Arrears Aging', 'Update Loan Arrears Aging', '0 1 0 1/1 * ? *', '2014-03-07 18:29:14', 5, NULL, NULL, '2017-02-25 00:01:00', 'Update Loan Arrears AgingJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, 0), + (2, 'Update Loan Arrears Ageing', 'Update Loan Arrears Ageing', '0 1 0 1/1 * ? *', '2014-03-07 18:29:14', 5, NULL, NULL, '2017-02-25 00:01:00', 'Update Loan Arrears AgeingJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, 0), (3, 'Update Loan Paid In Advance', 'Update Loan Paid In Advance', '0 5 0 1/1 * ? *', '2014-03-07 18:29:14', 5, NULL, NULL, '2017-02-25 00:05:00', 'Update Loan Paid In AdvanceJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, 0), (4, 'Apply Annual Fee For Savings', 'Apply Annual Fee For Savings', '0 20 22 1/1 * ? *', '2014-03-07 18:29:14', 5, NULL, '2014-06-11 09:50:00', '2017-02-24 22:20:00', 'Apply Annual Fee For SavingsJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, 0), (5, 'Apply Holidays To Loans', 'Apply Holidays To Loans', '0 0 12 * * ?', '2014-03-07 18:29:14', 5, NULL, '2014-03-24 12:00:04', '2017-02-25 12:00:00', 'Apply Holidays To LoansJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, 0), @@ -2386,7 +2386,7 @@ CREATE TABLE IF NOT EXISTS `m_loan` ( `loan_product_counter` SMALLINT DEFAULT NULL, `fixed_emi_amount` decimal(19,6) DEFAULT NULL, `max_outstanding_loan_balance` decimal(19,6) DEFAULT NULL, - `grace_on_arrears_aging` SMALLINT DEFAULT NULL, + `grace_on_arrears_ageing` SMALLINT DEFAULT NULL, `is_npa` tinyint NOT NULL DEFAULT '0', `total_recovered_derived` decimal(19,6) DEFAULT NULL, `accrued_till` date DEFAULT NULL, @@ -2434,7 +2434,7 @@ CREATE TABLE IF NOT EXISTS `m_loan` ( -- Dumping data for table mifostenant-reference.m_loan: ~1 rows (approximately) /*!40000 ALTER TABLE `m_loan` DISABLE KEYS */; -INSERT INTO `m_loan` (`id`, `account_no`, `external_id`, `client_id`, `group_id`, `product_id`, `fund_id`, `loan_officer_id`, `loanpurpose_cv_id`, `loan_status_id`, `loan_type_enum`, `currency_code`, `currency_digits`, `currency_multiplesof`, `principal_amount_proposed`, `principal_amount`, `approved_principal`, `arrearstolerance_amount`, `is_floating_interest_rate`, `interest_rate_differential`, `nominal_interest_rate_per_period`, `interest_period_frequency_enum`, `annual_nominal_interest_rate`, `interest_method_enum`, `interest_calculated_in_period_enum`, `allow_partial_period_interest_calcualtion`, `term_frequency`, `term_period_frequency_enum`, `repay_every`, `repayment_period_frequency_enum`, `number_of_repayments`, `grace_on_principal_periods`, `recurring_moratorium_principal_periods`, `grace_on_interest_periods`, `grace_interest_free_periods`, `amortization_method_enum`, `submittedon_date`, `submittedon_userid`, `approvedon_date`, `approvedon_userid`, `expected_disbursedon_date`, `expected_firstrepaymenton_date`, `interest_calculated_from_date`, `disbursedon_date`, `disbursedon_userid`, `expected_maturedon_date`, `maturedon_date`, `closedon_date`, `closedon_userid`, `total_charges_due_at_disbursement_derived`, `principal_disbursed_derived`, `principal_repaid_derived`, `principal_writtenoff_derived`, `principal_outstanding_derived`, `interest_charged_derived`, `interest_repaid_derived`, `interest_waived_derived`, `interest_writtenoff_derived`, `interest_outstanding_derived`, `fee_charges_charged_derived`, `fee_charges_repaid_derived`, `fee_charges_waived_derived`, `fee_charges_writtenoff_derived`, `fee_charges_outstanding_derived`, `penalty_charges_charged_derived`, `penalty_charges_repaid_derived`, `penalty_charges_waived_derived`, `penalty_charges_writtenoff_derived`, `penalty_charges_outstanding_derived`, `total_expected_repayment_derived`, `total_repayment_derived`, `total_expected_costofloan_derived`, `total_costofloan_derived`, `total_waived_derived`, `total_writtenoff_derived`, `total_outstanding_derived`, `total_overpaid_derived`, `rejectedon_date`, `rejectedon_userid`, `rescheduledon_date`, `rescheduledon_userid`, `withdrawnon_date`, `withdrawnon_userid`, `writtenoffon_date`, `loan_transaction_strategy_id`, `sync_disbursement_with_meeting`, `loan_counter`, `loan_product_counter`, `fixed_emi_amount`, `max_outstanding_loan_balance`, `grace_on_arrears_aging`, `is_npa`, `total_recovered_derived`, `accrued_till`, `interest_recalcualated_on`, `days_in_month_enum`, `days_in_year_enum`, `interest_recalculation_enabled`, `guarantee_amount_derived`, `create_standing_instruction_at_disbursement`, `version`, `writeoff_reason_cv_id`, `loan_sub_status_id`, `is_topup`) VALUES +INSERT INTO `m_loan` (`id`, `account_no`, `external_id`, `client_id`, `group_id`, `product_id`, `fund_id`, `loan_officer_id`, `loanpurpose_cv_id`, `loan_status_id`, `loan_type_enum`, `currency_code`, `currency_digits`, `currency_multiplesof`, `principal_amount_proposed`, `principal_amount`, `approved_principal`, `arrearstolerance_amount`, `is_floating_interest_rate`, `interest_rate_differential`, `nominal_interest_rate_per_period`, `interest_period_frequency_enum`, `annual_nominal_interest_rate`, `interest_method_enum`, `interest_calculated_in_period_enum`, `allow_partial_period_interest_calcualtion`, `term_frequency`, `term_period_frequency_enum`, `repay_every`, `repayment_period_frequency_enum`, `number_of_repayments`, `grace_on_principal_periods`, `recurring_moratorium_principal_periods`, `grace_on_interest_periods`, `grace_interest_free_periods`, `amortization_method_enum`, `submittedon_date`, `submittedon_userid`, `approvedon_date`, `approvedon_userid`, `expected_disbursedon_date`, `expected_firstrepaymenton_date`, `interest_calculated_from_date`, `disbursedon_date`, `disbursedon_userid`, `expected_maturedon_date`, `maturedon_date`, `closedon_date`, `closedon_userid`, `total_charges_due_at_disbursement_derived`, `principal_disbursed_derived`, `principal_repaid_derived`, `principal_writtenoff_derived`, `principal_outstanding_derived`, `interest_charged_derived`, `interest_repaid_derived`, `interest_waived_derived`, `interest_writtenoff_derived`, `interest_outstanding_derived`, `fee_charges_charged_derived`, `fee_charges_repaid_derived`, `fee_charges_waived_derived`, `fee_charges_writtenoff_derived`, `fee_charges_outstanding_derived`, `penalty_charges_charged_derived`, `penalty_charges_repaid_derived`, `penalty_charges_waived_derived`, `penalty_charges_writtenoff_derived`, `penalty_charges_outstanding_derived`, `total_expected_repayment_derived`, `total_repayment_derived`, `total_expected_costofloan_derived`, `total_costofloan_derived`, `total_waived_derived`, `total_writtenoff_derived`, `total_outstanding_derived`, `total_overpaid_derived`, `rejectedon_date`, `rejectedon_userid`, `rescheduledon_date`, `rescheduledon_userid`, `withdrawnon_date`, `withdrawnon_userid`, `writtenoffon_date`, `loan_transaction_strategy_id`, `sync_disbursement_with_meeting`, `loan_counter`, `loan_product_counter`, `fixed_emi_amount`, `max_outstanding_loan_balance`, `grace_on_arrears_ageing`, `is_npa`, `total_recovered_derived`, `accrued_till`, `interest_recalcualated_on`, `days_in_month_enum`, `days_in_year_enum`, `interest_recalculation_enabled`, `guarantee_amount_derived`, `create_standing_instruction_at_disbursement`, `version`, `writeoff_reason_cv_id`, `loan_sub_status_id`, `is_topup`) VALUES (1, '000000001', NULL, 8, NULL, 1, 1, NULL, NULL, 200, 1, 'USD', 2, 0, 10000.000000, 10000.000000, 10000.000000, NULL, b'0', 0.000000, 26.000000, 3, 26.000000, 1, 1, 0, 25, 1, 1, 1, 25, NULL, NULL, NULL, NULL, 1, '2014-06-02', 1, '2014-06-11', 1, '2014-06-16', NULL, NULL, NULL, NULL, '2014-12-08', '2014-12-08', NULL, NULL, 500.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 1, 1, 0, NULL, NULL, 1, NULL, NULL, 0); /*!40000 ALTER TABLE `m_loan` ENABLE KEYS */; @@ -4196,7 +4196,7 @@ CREATE TABLE IF NOT EXISTS `m_product_loan` ( `allow_multiple_disbursals` tinyint NOT NULL DEFAULT '0', `max_disbursals` INT DEFAULT NULL, `max_outstanding_loan_balance` decimal(19,6) DEFAULT NULL, - `grace_on_arrears_aging` SMALLINT DEFAULT NULL, + `grace_on_arrears_ageing` SMALLINT DEFAULT NULL, `overdue_days_for_npa` SMALLINT DEFAULT NULL, `days_in_month_enum` SMALLINT NOT NULL DEFAULT '1', `days_in_year_enum` SMALLINT NOT NULL DEFAULT '1', @@ -4219,7 +4219,7 @@ CREATE TABLE IF NOT EXISTS `m_product_loan` ( -- Dumping data for table mifostenant-reference.m_product_loan: ~1 rows (approximately) /*!40000 ALTER TABLE `m_product_loan` DISABLE KEYS */; -INSERT INTO `m_product_loan` (`id`, `short_name`, `currency_code`, `currency_digits`, `currency_multiplesof`, `principal_amount`, `min_principal_amount`, `max_principal_amount`, `arrearstolerance_amount`, `name`, `description`, `fund_id`, `is_linked_to_floating_interest_rates`, `allow_variabe_installments`, `nominal_interest_rate_per_period`, `min_nominal_interest_rate_per_period`, `max_nominal_interest_rate_per_period`, `interest_period_frequency_enum`, `annual_nominal_interest_rate`, `interest_method_enum`, `interest_calculated_in_period_enum`, `allow_partial_period_interest_calcualtion`, `repay_every`, `repayment_period_frequency_enum`, `number_of_repayments`, `min_number_of_repayments`, `max_number_of_repayments`, `grace_on_principal_periods`, `recurring_moratorium_principal_periods`, `grace_on_interest_periods`, `grace_interest_free_periods`, `amortization_method_enum`, `accounting_type`, `loan_transaction_strategy_id`, `external_id`, `include_in_borrower_cycle`, `use_borrower_cycle`, `start_date`, `close_date`, `allow_multiple_disbursals`, `max_disbursals`, `max_outstanding_loan_balance`, `grace_on_arrears_aging`, `overdue_days_for_npa`, `days_in_month_enum`, `days_in_year_enum`, `interest_recalculation_enabled`, `min_days_between_disbursal_and_first_repayment`, `hold_guarantee_funds`, `principal_threshold_for_last_installment`, `account_moves_out_of_npa_only_on_arrears_completion`, `can_define_fixed_emi_amount`, `instalment_amount_in_multiples_of`, `can_use_for_topup`, `sync_expected_with_disbursement_date`) VALUES +INSERT INTO `m_product_loan` (`id`, `short_name`, `currency_code`, `currency_digits`, `currency_multiplesof`, `principal_amount`, `min_principal_amount`, `max_principal_amount`, `arrearstolerance_amount`, `name`, `description`, `fund_id`, `is_linked_to_floating_interest_rates`, `allow_variabe_installments`, `nominal_interest_rate_per_period`, `min_nominal_interest_rate_per_period`, `max_nominal_interest_rate_per_period`, `interest_period_frequency_enum`, `annual_nominal_interest_rate`, `interest_method_enum`, `interest_calculated_in_period_enum`, `allow_partial_period_interest_calcualtion`, `repay_every`, `repayment_period_frequency_enum`, `number_of_repayments`, `min_number_of_repayments`, `max_number_of_repayments`, `grace_on_principal_periods`, `recurring_moratorium_principal_periods`, `grace_on_interest_periods`, `grace_interest_free_periods`, `amortization_method_enum`, `accounting_type`, `loan_transaction_strategy_id`, `external_id`, `include_in_borrower_cycle`, `use_borrower_cycle`, `start_date`, `close_date`, `allow_multiple_disbursals`, `max_disbursals`, `max_outstanding_loan_balance`, `grace_on_arrears_ageing`, `overdue_days_for_npa`, `days_in_month_enum`, `days_in_year_enum`, `interest_recalculation_enabled`, `min_days_between_disbursal_and_first_repayment`, `hold_guarantee_funds`, `principal_threshold_for_last_installment`, `account_moves_out_of_npa_only_on_arrears_completion`, `can_define_fixed_emi_amount`, `instalment_amount_in_multiples_of`, `can_use_for_topup`, `sync_expected_with_disbursement_date`) VALUES (1, 'IGL', 'USD', 2, 0, 10000.000000, 10000.000000, 10000.000000, NULL, 'Income Generating Loan', NULL, 1, b'0', b'0', 26.000000, 26.000000, 26.000000, 3, 26.000000, 1, 1, 0, 1, 1, 25, 25, 25, NULL, NULL, NULL, NULL, 1, 2, 1, NULL, 0, 0, '2010-01-01', NULL, 0, NULL, NULL, NULL, NULL, 1, 1, 0, NULL, 0, 0.00, 0, 0, NULL, 0, 0); /*!40000 ALTER TABLE `m_product_loan` ENABLE KEYS */; @@ -4254,7 +4254,7 @@ CREATE TABLE IF NOT EXISTS `m_product_loan_configurable_attributes` ( `arrearstolerance_amount` TINYINT NOT NULL DEFAULT '1', `repay_every` TINYINT NOT NULL DEFAULT '1', `moratorium` TINYINT NOT NULL DEFAULT '1', - `grace_on_arrears_aging` TINYINT NOT NULL DEFAULT '1', + `grace_on_arrears_ageing` TINYINT NOT NULL DEFAULT '1', PRIMARY KEY (`id`), KEY `fk_m_product_loan_configurable_attributes_0001` (`loan_product_id`), CONSTRAINT `fk_m_product_loan_configurable_attributes_0001` FOREIGN KEY (`loan_product_id`) REFERENCES `m_product_loan` (`id`) @@ -4262,7 +4262,7 @@ CREATE TABLE IF NOT EXISTS `m_product_loan_configurable_attributes` ( -- Dumping data for table mifostenant-reference.m_product_loan_configurable_attributes: ~0 rows (approximately) /*!40000 ALTER TABLE `m_product_loan_configurable_attributes` DISABLE KEYS */; -INSERT INTO `m_product_loan_configurable_attributes` (`id`, `loan_product_id`, `amortization_method_enum`, `interest_method_enum`, `loan_transaction_strategy_id`, `interest_calculated_in_period_enum`, `arrearstolerance_amount`, `repay_every`, `moratorium`, `grace_on_arrears_aging`) VALUES +INSERT INTO `m_product_loan_configurable_attributes` (`id`, `loan_product_id`, `amortization_method_enum`, `interest_method_enum`, `loan_transaction_strategy_id`, `interest_calculated_in_period_enum`, `arrearstolerance_amount`, `repay_every`, `moratorium`, `grace_on_arrears_ageing`) VALUES (1, 1, 1, 1, 1, 1, 1, 1, 1, 1); /*!40000 ALTER TABLE `m_product_loan_configurable_attributes` ENABLE KEYS */; diff --git a/fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm b/fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm index 932675da100..4b1921016bb 100644 --- a/fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm +++ b/fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm @@ -10248,10 +10248,10 @@

Loans

- graceOnArrearsAging + graceOnArrearsAgeing - Optional: Integer - Used in Arrears calculation to only take into account loans that are more than graceOnArrearsAging days overdue. + Optional: Integer - Used in Arrears calculation to only take into account loans that are more than graceOnArrearsAgeing days overdue. @@ -11630,7 +11630,7 @@

Submit a new Loan Application

graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, linkAccountId, allowPartialPeriodInterestCalculation, - fixedEmiAmount, maxOutstandingLoanBalance, disbursementData, graceOnArrearsAging, createStandingInstructionAtDisbursement (requires linkedAccountId if set to true), daysInYearType + fixedEmiAmount, maxOutstandingLoanBalance, disbursementData, graceOnArrearsAgeing, createStandingInstructionAtDisbursement (requires linkedAccountId if set to true), daysInYearType @@ -15780,10 +15780,10 @@

Loan Products

- graceOnArrearsAging + graceOnArrearsAgeing - Optional: Integer - Used in Arrears calculation to only take into account loans that are more than graceOnArrearsAging days overdue. + Optional: Integer - Used in Arrears calculation to only take into account loans that are more than graceOnArrearsAgeing days overdue. @@ -17167,7 +17167,7 @@

Create a Loan Product

Optional Fields
- inArrearsTolerance, graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, graceOnArrearsAging, charges, paymentChannelToFundSourceMappings, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, includeInBorrowerCycle, + inArrearsTolerance, graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, graceOnArrearsAgeing, charges, paymentChannelToFundSourceMappings, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, includeInBorrowerCycle, useBorrowerCycle,principalVariationsForBorrowerCycle, numberOfRepaymentVariationsForBorrowerCycle, interestRateVariationsForBorrowerCycle, @@ -17300,7 +17300,7 @@

Create a Loan Product

inArrearsTolerance : false, repaymentEvery : true, graceOnPrincipalAndInterestPayment : true, - graceOnArrearsAging : true}, + graceOnArrearsAgeing : true}, "accountingRule":"2", "name":"product 5", @@ -20395,7 +20395,7 @@

Retrieve Scheduler Jobs

}, { "jobId": 2, - "displayName": "Update Loan Arrears Aging", + "displayName": "Update Loan Arrears Ageing", "nextRunTime": "Jul 27, 2013 12:01:00 AM", "cronExpression": "0 1 0 1/1 * ? *", "active": true, @@ -48400,7 +48400,7 @@

Submit a new Loan Application

graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, linkAccountId, allowPartialPeriodInterestCalculation, - fixedEmiAmount, maxOutstandingLoanBalance, disbursementData, graceOnArrearsAging, createStandingInstructionAtDisbursement (requires linkedAccountId if set to true) + fixedEmiAmount, maxOutstandingLoanBalance, disbursementData, graceOnArrearsAgeing, createStandingInstructionAtDisbursement (requires linkedAccountId if set to true) @@ -51708,10 +51708,10 @@

Loan Products

- graceOnArrearsAging + graceOnArrearsAgeing - Optional: Integer - Used in Arrears calculation to only take into account loans that are more than graceOnArrearsAging days overdue. + Optional: Integer - Used in Arrears calculation to only take into account loans that are more than graceOnArrearsAgeing days overdue. @@ -51885,7 +51885,7 @@

List Loan Products

"accountMovesOutOfNPAOnlyOnArrearsCompletion":false, "allowAttributeOverrides":{ "graceOnPrincipalAndInterestPayment":true, - "graceOnArrearsAging":true + "graceOnArrearsAgeing":true }, "syncExpectedWithDisbursementDate":false } diff --git a/fineract-provider/src/test/java/org/apache/fineract/portfolio/deliquency/LoanDelinquencyDomainServiceTest.java b/fineract-provider/src/test/java/org/apache/fineract/portfolio/deliquency/LoanDelinquencyDomainServiceTest.java index ed47e5c9a4f..cd213cbf469 100644 --- a/fineract-provider/src/test/java/org/apache/fineract/portfolio/deliquency/LoanDelinquencyDomainServiceTest.java +++ b/fineract-provider/src/test/java/org/apache/fineract/portfolio/deliquency/LoanDelinquencyDomainServiceTest.java @@ -128,7 +128,7 @@ public void givenLoanAccountWithoutOverdueThenCalculateDelinquentData() { fromDate, dueDate, principal, zeroAmount, zeroAmount, zeroAmount, false, new HashSet<>(), zeroAmount)); // when - when(loanProductRelatedDetail.getGraceOnArrearsAging()).thenReturn(0); + when(loanProductRelatedDetail.getGraceOnArrearsAgeing()).thenReturn(0); when(loan.getLoanProductRelatedDetail()).thenReturn(loanProductRelatedDetail); when(loan.getRepaymentScheduleInstallments()).thenReturn(repaymentScheduleInstallments); when(loan.getCurrency()).thenReturn(currency); @@ -154,7 +154,7 @@ public void givenLoanAccountWithOverdueThenCalculateDelinquentData() { fromDate, dueDate, principal, zeroAmount, zeroAmount, zeroAmount, false, new HashSet<>(), zeroAmount)); // when - when(loanProductRelatedDetail.getGraceOnArrearsAging()).thenReturn(0); + when(loanProductRelatedDetail.getGraceOnArrearsAgeing()).thenReturn(0); when(loan.getLoanProductRelatedDetail()).thenReturn(loanProductRelatedDetail); when(loan.getRepaymentScheduleInstallments()).thenReturn(repaymentScheduleInstallments); when(loanTransactionReadService.fetchLoanTransactionsByType(loan.getId(), null, LoanTransactionType.CHARGEBACK)) @@ -195,7 +195,7 @@ public void givenLoanAccountWithoutOverdueWithChargebackThenCalculateDelinquentD List repaymentScheduleInstallments = Arrays.asList(installment); // when - when(loanProductRelatedDetail.getGraceOnArrearsAging()).thenReturn(0); + when(loanProductRelatedDetail.getGraceOnArrearsAgeing()).thenReturn(0); when(loan.getLoanProductRelatedDetail()).thenReturn(loanProductRelatedDetail); when(loan.getRepaymentScheduleInstallments()).thenReturn(repaymentScheduleInstallments); when(loan.getCurrency()).thenReturn(currency); @@ -224,7 +224,7 @@ public void givenLoanInstallmentWithOverdueEnableInstallmentDelinquencyThenCalcu List repaymentScheduleInstallments = Arrays.asList(installment); // when - when(loanProductRelatedDetail.getGraceOnArrearsAging()).thenReturn(0); + when(loanProductRelatedDetail.getGraceOnArrearsAgeing()).thenReturn(0); when(loan.getLoanProductRelatedDetail()).thenReturn(loanProductRelatedDetail); when(loan.getRepaymentScheduleInstallments()).thenReturn(repaymentScheduleInstallments); when(loanTransactionReadService.fetchLoanTransactionsByType(loan.getId(), null, LoanTransactionType.CHARGEBACK)) @@ -278,7 +278,7 @@ public void givenLoanInstallmentWithoutOverdueWithChargebackAndEnableInstallment List repaymentScheduleInstallments = Arrays.asList(installment); // when - when(loanProductRelatedDetail.getGraceOnArrearsAging()).thenReturn(0); + when(loanProductRelatedDetail.getGraceOnArrearsAgeing()).thenReturn(0); when(loan.getLoanProductRelatedDetail()).thenReturn(loanProductRelatedDetail); when(loan.getRepaymentScheduleInstallments()).thenReturn(repaymentScheduleInstallments); when(loan.isEnableInstallmentLevelDelinquency()).thenReturn(true); @@ -329,7 +329,7 @@ public void givenPausePeriodThenInstallmentDelinquentDaysOnlyIncludeOverlap() { List repaymentScheduleInstallments = Arrays.asList(installmentOne, installmentTwo, installmentThree); - when(loanProductRelatedDetail.getGraceOnArrearsAging()).thenReturn(0); + when(loanProductRelatedDetail.getGraceOnArrearsAgeing()).thenReturn(0); when(loan.getLoanProductRelatedDetail()).thenReturn(loanProductRelatedDetail); when(loan.getRepaymentScheduleInstallments()).thenReturn(repaymentScheduleInstallments); when(loanTransactionReadService.fetchLoanTransactionsByType(loan.getId(), null, LoanTransactionType.CHARGEBACK)) @@ -385,7 +385,7 @@ public void givenMultipleInstallmentsAndPauseThenDelinquencyDaysDistributePerIns when(localLoan.getId()).thenReturn(42L); when(localLoan.getLoanProductRelatedDetail()).thenReturn(localDetails); - when(localDetails.getGraceOnArrearsAging()).thenReturn(0); + when(localDetails.getGraceOnArrearsAgeing()).thenReturn(0); when(localLoan.getRepaymentScheduleInstallments()).thenReturn(installments); when(localLoan.getLastLoanRepaymentScheduleInstallment()).thenReturn(installmentThree); when(localLoan.getCurrency()).thenReturn(currency); diff --git a/gradle.properties b/gradle.properties index a19cc5c0bfb..84dd6ec6aca 100644 --- a/gradle.properties +++ b/gradle.properties @@ -16,7 +16,7 @@ # specific language governing permissions and limitations # under the License. # -org.gradle.jvmargs=-Xmx8g --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-exports=java.naming/com.sun.jndi.ldap=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.management/javax.management=ALL-UNNAMED --add-opens=java.naming/javax.naming=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=null +org.gradle.jvmargs=-Xmx12g --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-exports=java.naming/com.sun.jndi.ldap=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.management/javax.management=ALL-UNNAMED --add-opens=java.naming/javax.naming=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=null buildType=BUILD org.gradle.caching=true org.gradle.parallel=true diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/BaseLoanIntegrationTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/BaseLoanIntegrationTest.java index 4be870883b9..25cc3ea5eda 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/BaseLoanIntegrationTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/BaseLoanIntegrationTest.java @@ -498,7 +498,7 @@ protected PostLoanProductsRequest create4ICumulative() { .inArrearsTolerance(true)// .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// - .graceOnArrearsAging(true)// + .graceOnArrearsAgeing(true)// ).isEqualAmortization(false)// .delinquencyBucketId(delinquencyBucketId.longValue())// .enableDownPayment(false)// @@ -596,7 +596,7 @@ protected PutLoanProductsProductIdRequest update4IProgressive(String name, Strin .inArrearsTolerance(true)// .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// - .graceOnArrearsAging(true)// + .graceOnArrearsAgeing(true)// ).isEqualAmortization(false)// .delinquencyBucketId(delinquencyBucketId)// .enableDownPayment(false)// @@ -698,7 +698,7 @@ protected PostLoanProductsRequest create4IProgressive() { .inArrearsTolerance(true)// .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// - .graceOnArrearsAging(true)// + .graceOnArrearsAgeing(true)// ).isEqualAmortization(false)// .delinquencyBucketId(delinquencyBucketId.longValue())// .enableDownPayment(false)// @@ -750,7 +750,7 @@ protected PostLoanProductsRequest createOnePeriod30DaysPeriodicAccrualProduct(do .daysInYearType(1)// .daysInMonthType(1)// .canDefineInstallmentAmount(true)// - .graceOnArrearsAging(3)// + .graceOnArrearsAgeing(3)// .overdueDaysForNPA(179)// .accountMovesOutOfNPAOnlyOnArrearsCompletion(false)// .principalThresholdForLastInstallment(50)// @@ -767,7 +767,7 @@ protected PostLoanProductsRequest createOnePeriod30DaysPeriodicAccrualProduct(do .inArrearsTolerance(true)// .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// - .graceOnArrearsAging(true))// + .graceOnArrearsAgeing(true))// .allowPartialPeriodInterestCalculation(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// @@ -887,7 +887,7 @@ protected PostLoanProductsRequest create1InstallmentAmountInMultiplesOf4Period1M .repaymentFrequencyType(RepaymentFrequencyType.MONTHS.longValue())// .interestType(interestType)// .amortizationType(amortizationType)// - .graceOnArrearsAging(0); + .graceOnArrearsAgeing(0); } private RequestSpecification createRequestSpecification(String authKey) { @@ -1381,7 +1381,7 @@ protected PostLoansRequest applyLoanRequest(Long clientId, Long loanProductId, S .maxOutstandingLoanBalance(BigDecimal.valueOf(amount)) // .principal(BigDecimal.valueOf(amount)) // .loanType("individual") // - .graceOnArrearsAging(0); + .graceOnArrearsAgeing(0); if (customizer != null) { customizer.accept(postLoansRequest); } diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/ClientLoanIntegrationTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/ClientLoanIntegrationTest.java index 51769a50d6a..71319a97470 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/ClientLoanIntegrationTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/ClientLoanIntegrationTest.java @@ -3979,7 +3979,7 @@ public void testLoanScheduleWithInterestRecalculation_WITH_PERIODIC_ACCOUNTING() } @Test - public void testLoanScheduleWithInterestRecalculation_WITH_CURRENT_REPAYMENT_BASED_ARREARS_AGING() { + public void testLoanScheduleWithInterestRecalculation_WITH_CURRENT_REPAYMENT_BASED_ARREARS_AGEING() { DateFormat dateFormat = new SimpleDateFormat(DATETIME_PATTERN, Locale.US); dateFormat.setTimeZone(Utils.getTimeZoneOfTenant()); @@ -4060,7 +4060,7 @@ LoanProductTestBuilder.INTEREST_APPLICABLE_STRATEGY_ON_PRE_CLOSE_DATE, null, get } @Test - public void testLoanScheduleWithInterestRecalculation_WITH_ORIGINAL_REPAYMENT_BASED_ARREARS_AGING() { + public void testLoanScheduleWithInterestRecalculation_WITH_ORIGINAL_REPAYMENT_BASED_ARREARS_AGEING() { DateFormat dateFormat = new SimpleDateFormat(DATETIME_PATTERN, Locale.US); dateFormat.setTimeZone(Utils.getTimeZoneOfTenant()); @@ -7169,7 +7169,7 @@ private void validateIfValuesAreNotOverridden(Integer loanID, Integer loanProduc String loanDetails = LOAN_TRANSACTION_HELPER.getLoanDetails(REQUEST_SPEC, RESPONSE_SPEC, loanID); List comparisonAttributes = Arrays.asList("amortizationType", "interestType", "transactionProcessingStrategyCode", "interestCalculationPeriodType", "repaymentFrequencyType", "graceOnPrincipalPayment", "graceOnInterestPayment", - "inArrearsTolerance", "graceOnArrearsAging"); + "inArrearsTolerance", "graceOnArrearsAgeing"); for (String comparisonAttribute : comparisonAttributes) { Object val1 = JsonPath.from(loanProductDetails).get(comparisonAttribute); @@ -7186,7 +7186,7 @@ private JsonObject createLoanProductConfigurationDetail(JsonObject loanProductCo loanProductConfiguration.addProperty("inArrearsTolerance", bool); loanProductConfiguration.addProperty("repaymentEvery", bool); loanProductConfiguration.addProperty("graceOnPrincipalAndInterestPayment", bool); - loanProductConfiguration.addProperty("graceOnArrearsAging", bool); + loanProductConfiguration.addProperty("graceOnArrearsAgeing", bool); return loanProductConfiguration; } @@ -8306,7 +8306,7 @@ protected PostLoanProductsRequest createOnePeriod30DaysLongNoInterestPeriodicAcc .daysInYearType(1)// .daysInMonthType(1)// .canDefineInstallmentAmount(true)// - .graceOnArrearsAging(3)// + .graceOnArrearsAgeing(3)// .overdueDaysForNPA(179)// .accountMovesOutOfNPAOnlyOnArrearsCompletion(false)// .principalThresholdForLastInstallment(50)// @@ -8323,7 +8323,7 @@ protected PostLoanProductsRequest createOnePeriod30DaysLongNoInterestPeriodicAcc .inArrearsTolerance(true)// .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// - .graceOnArrearsAging(true))// + .graceOnArrearsAgeing(true))// .allowPartialPeriodInterestCalculation(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/DelinquencyActionIntegrationTests.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/DelinquencyActionIntegrationTests.java index e12a1c66f6e..12be1252a11 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/DelinquencyActionIntegrationTests.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/DelinquencyActionIntegrationTests.java @@ -342,7 +342,7 @@ public void testLoanAndInstallmentDelinquencyCalculationForCOBAfterPausePeriodEn req.submittedOnDate("01 November 2023"); req.setLoanTermFrequency(45); req.setRepaymentEvery(15); - req.setGraceOnArrearsAging(0); + req.setGraceOnArrearsAgeing(0); }); // Partial Loan amount Disbursement @@ -448,7 +448,7 @@ private Long createLoanProductWith25PctDownPaymentAndDelinquencyBucket(boolean a product.setDelinquencyBucketId(delinquencyBucketId.longValue()); product.setMultiDisburseLoan(multiDisburseEnabled); product.setEnableDownPayment(true); - product.setGraceOnArrearsAging(graceOnArrearsAging); + product.setGraceOnArrearsAgeing(graceOnArrearsAging); product.setDisbursedAmountPercentageForDownPayment(DOWN_PAYMENT_PERCENTAGE); product.setEnableAutoRepaymentForDownPayment(autoDownPaymentEnabled); @@ -481,7 +481,7 @@ private Long createLoanProductWithDelinquencyBucketNoDownPayment(boolean multiDi product.setDelinquencyBucketId(delinquencyBucketId.longValue()); product.setMultiDisburseLoan(multiDisburseEnabled); product.setEnableDownPayment(false); - product.setGraceOnArrearsAging(graceOnArrearsAging); + product.setGraceOnArrearsAgeing(graceOnArrearsAging); product.setEnableInstallmentLevelDelinquency(installmentLevelDelinquencyEnabled); PostLoanProductsResponse loanProductResponse = loanProductHelper.createLoanProduct(product); @@ -498,7 +498,7 @@ public void testDelinquentDaysAndDateAfterPastDelinquencyPause() { Long loanId = applyAndApproveLoan(clientId, loanProductId, "01 January 2022", 1000.0, 2, req -> { req.setLoanTermFrequency(30); req.setRepaymentEvery(15); - req.setGraceOnArrearsAging(0); + req.setGraceOnArrearsAgeing(0); }); disburseLoan(loanId, BigDecimal.valueOf(1000.00), "01 January 2022"); loanIdHolder[0] = loanId; @@ -548,7 +548,7 @@ public void testInstallmentLevelDelinquencyWithMultipleOverdueInstallments() { Long loanId = applyAndApproveLoan(clientId, loanProductId, "01 January 2022", 1000.0, 3, req -> { req.setLoanTermFrequency(45); req.setRepaymentEvery(15); - req.setGraceOnArrearsAging(0); + req.setGraceOnArrearsAgeing(0); }); disburseLoan(loanId, BigDecimal.valueOf(100.00), "01 January 2022"); loanIdHolder[0] = loanId; @@ -595,7 +595,7 @@ public void testInstallmentDelinquencyWithSinglePauseAffectingMultipleInstallmen Long loanId = applyAndApproveLoan(clientId, loanProductId, "10 January 2022", 1000.0, 3, req -> { req.setLoanTermFrequency(30); req.setRepaymentEvery(10); - req.setGraceOnArrearsAging(0); + req.setGraceOnArrearsAgeing(0); }); disburseLoan(loanId, BigDecimal.valueOf(100.00), "10 January 2022"); loanIdHolder[0] = loanId; @@ -642,7 +642,7 @@ public void testInstallmentDelinquencyWithMultiplePausesAffectingSameInstallment Long loanId = applyAndApproveLoan(clientId, loanProductId, "01 January 2022", 1000.0, 1, req -> { req.setLoanTermFrequency(30); req.setRepaymentEvery(30); - req.setGraceOnArrearsAging(0); + req.setGraceOnArrearsAgeing(0); }); disburseLoan(loanId, BigDecimal.valueOf(100.00), "01 January 2022"); loanIdHolder[0] = loanId; @@ -708,7 +708,7 @@ public void testInstallmentDelinquencyWithPauseBetweenSequentialInstallments() { Long loanId = applyAndApproveLoan(clientId, loanProductId, "01 January 2022", 1000.0, 2, req -> { req.setLoanTermFrequency(20); req.setRepaymentEvery(10); - req.setGraceOnArrearsAging(0); + req.setGraceOnArrearsAgeing(0); }); disburseLoan(loanId, BigDecimal.valueOf(100.00), "01 January 2022"); loanIdHolder[0] = loanId; @@ -743,7 +743,7 @@ public void testInstallmentDelinquencyWithFourInstallmentsAndPausePeriod() { Long loanId = applyAndApproveLoan(clientId, loanProductId, "01 January 2022", 1000.0, 4, req -> { req.setLoanTermFrequency(60); req.setRepaymentEvery(15); - req.setGraceOnArrearsAging(0); + req.setGraceOnArrearsAgeing(0); }); disburseLoan(loanId, BigDecimal.valueOf(1000.00), "01 January 2022"); loanIdHolder[0] = loanId; @@ -778,7 +778,7 @@ public void testPauseUsesBusinessDateNotCOBDate() { Long loanId = applyAndApproveLoan(clientId, loanProductId, "28 May 2025", 1000.0, 7, req -> { req.setLoanTermFrequency(210); req.setRepaymentEvery(30); - req.setGraceOnArrearsAging(3); + req.setGraceOnArrearsAgeing(3); }); disburseLoan(loanId, BigDecimal.valueOf(1000.00), "28 May 2025"); loanIdHolder[0] = loanId; diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/DelinquencyBucketsIntegrationTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/DelinquencyBucketsIntegrationTest.java index b2e52069024..f8853b9925e 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/DelinquencyBucketsIntegrationTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/DelinquencyBucketsIntegrationTest.java @@ -987,7 +987,7 @@ public void testLoanClassificationToValidateNegatives() { } @Test - public void testLoanClassificationUsingAgingArrears() { + public void testLoanClassificationUsingAgeingArrears() { try { globalConfigurationHelper.updateGlobalConfiguration(GlobalConfigurationConstants.ENABLE_BUSINESS_DATE, new PutGlobalConfigurationsRequest().enabled(true)); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountArrearsAgingCOBBusinessStepTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountArrearsAgeingCOBBusinessStepTest.java similarity index 98% rename from integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountArrearsAgingCOBBusinessStepTest.java rename to integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountArrearsAgeingCOBBusinessStepTest.java index 139bae040e3..47d0418030c 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountArrearsAgingCOBBusinessStepTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountArrearsAgeingCOBBusinessStepTest.java @@ -50,7 +50,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -public class LoanAccountArrearsAgingCOBBusinessStepTest extends BaseLoanIntegrationTest { +public class LoanAccountArrearsAgeingCOBBusinessStepTest extends BaseLoanIntegrationTest { private ResponseSpecification responseSpec; private RequestSpecification requestSpec; @@ -69,7 +69,7 @@ public void setup() { } @Test - public void loanArrearsAgingCOBBusinessStepTest() { + public void loanArrearsAgeingCOBBusinessStepTest() { // Set Business Date try { globalConfigurationHelper.updateGlobalConfiguration(GlobalConfigurationConstants.ENABLE_BUSINESS_DATE, @@ -105,7 +105,7 @@ public void loanArrearsAgingCOBBusinessStepTest() { String loan2ExternalIdStr = UUID.randomUUID().toString(); final Integer loanId_2 = createLoanAccount(loanOperationDate, clientId, loanProductId, loan2ExternalIdStr); - // Run Loan cob with verfying business step for Update Arrears aging details + // Run Loan cob with verfying business step for Update Arrears ageing details final SchedulerJobHelper schedulerJobHelper = new SchedulerJobHelper(requestSpec); // COB Step Validation diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountChargeOffWithAdvancedPaymentAllocationTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountChargeOffWithAdvancedPaymentAllocationTest.java index 82050a7e6e9..fedb1983a6f 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountChargeOffWithAdvancedPaymentAllocationTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountChargeOffWithAdvancedPaymentAllocationTest.java @@ -733,7 +733,7 @@ private Integer createLoanProductWithPeriodicAccrualAccountingAndAdvancedPayment .daysInYearType(1)// .daysInMonthType(1)// .canDefineInstallmentAmount(true)// - .graceOnArrearsAging(3)// + .graceOnArrearsAgeing(3)// .overdueDaysForNPA(179)// .accountMovesOutOfNPAOnlyOnArrearsCompletion(false)// .principalThresholdForLastInstallment(50)// @@ -750,7 +750,7 @@ private Integer createLoanProductWithPeriodicAccrualAccountingAndAdvancedPayment .inArrearsTolerance(true)// .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// - .graceOnArrearsAging(true))// + .graceOnArrearsAgeing(true))// .allowPartialPeriodInterestCalculation(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountChargeReveseReplayWithAdvancedPaymentAllocationTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountChargeReveseReplayWithAdvancedPaymentAllocationTest.java index 48aa851352d..acacd8c1725 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountChargeReveseReplayWithAdvancedPaymentAllocationTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountChargeReveseReplayWithAdvancedPaymentAllocationTest.java @@ -425,7 +425,7 @@ private Integer createLoanProductWithPeriodicAccrualAccounting(boolean advancedP .daysInYearType(1)// .daysInMonthType(1)// .canDefineInstallmentAmount(true)// - .graceOnArrearsAging(3)// + .graceOnArrearsAgeing(3)// .overdueDaysForNPA(179)// .accountMovesOutOfNPAOnlyOnArrearsCompletion(false)// .principalThresholdForLastInstallment(50)// @@ -442,7 +442,7 @@ private Integer createLoanProductWithPeriodicAccrualAccounting(boolean advancedP .inArrearsTolerance(true)// .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// - .graceOnArrearsAging(true))// + .graceOnArrearsAgeing(true))// .allowPartialPeriodInterestCalculation(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanChargeOffAccountingTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanChargeOffAccountingTest.java index f9370bd0702..ba955ec013d 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanChargeOffAccountingTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanChargeOffAccountingTest.java @@ -927,7 +927,7 @@ private PostLoanProductsResponse createLoanProductWithAdvancedChargeOffAccountin .daysInYearType(1)// .daysInMonthType(1)// .canDefineInstallmentAmount(true)// - .graceOnArrearsAging(3)// + .graceOnArrearsAgeing(3)// .overdueDaysForNPA(179)// .accountMovesOutOfNPAOnlyOnArrearsCompletion(false)// .principalThresholdForLastInstallment(50)// @@ -944,7 +944,7 @@ private PostLoanProductsResponse createLoanProductWithAdvancedChargeOffAccountin .inArrearsTolerance(true)// .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// - .graceOnArrearsAging(true))// + .graceOnArrearsAgeing(true))// .allowPartialPeriodInterestCalculation(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanDelinquencyDetailsNextPaymentDateConfigurationTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanDelinquencyDetailsNextPaymentDateConfigurationTest.java index 255a4b1c5e8..85fcaae9b4e 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanDelinquencyDetailsNextPaymentDateConfigurationTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanDelinquencyDetailsNextPaymentDateConfigurationTest.java @@ -60,7 +60,7 @@ public void testNextPaymentDateForUnpaidInstallmentsWithNPlusOneTest() { req.submittedOnDate("01 November 2023"); req.setLoanTermFrequency(45); req.setRepaymentEvery(15); - req.setGraceOnArrearsAging(0); + req.setGraceOnArrearsAgeing(0); }); // Loan amount Disbursement @@ -146,7 +146,7 @@ public void testNextPaymentDateFor2Paid1PartiallyPaidInstallmentsWithNPlusOneTes req.submittedOnDate("01 November 2023"); req.setLoanTermFrequency(45); req.setRepaymentEvery(15); - req.setGraceOnArrearsAging(0); + req.setGraceOnArrearsAgeing(0); }); // Loan amount Disbursement @@ -268,7 +268,7 @@ private Long createLoanProductWith25PctDownPaymentAndDelinquencyBucket(boolean a product.setDelinquencyBucketId(delinquencyBucketId.longValue()); product.setMultiDisburseLoan(multiDisburseEnabled); product.setEnableDownPayment(true); - product.setGraceOnArrearsAging(graceOnArrearsAging); + product.setGraceOnArrearsAgeing(graceOnArrearsAging); product.setDisbursedAmountPercentageForDownPayment(DOWN_PAYMENT_PERCENTAGE); product.setEnableAutoRepaymentForDownPayment(autoDownPaymentEnabled); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanInterestRecalculationCOBTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanInterestRecalculationCOBTest.java index 788358322f9..c25bcf43ab5 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanInterestRecalculationCOBTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanInterestRecalculationCOBTest.java @@ -1022,7 +1022,7 @@ public void verifyLoanInstallmentRecalculatedIfThereIsOverdueInstallmentOnProgre runAt("1 February 2023", () -> { Long loanId = loanIdRef.get(); - schedulerJobHelper.executeAndAwaitJob("Update Loan Arrears Aging"); + schedulerJobHelper.executeAndAwaitJob("Update Loan Arrears Ageing"); schedulerJobHelper.executeAndAwaitJob("Recalculate Interest For Loans"); GetLoansLoanIdResponse loanDetails = loanTransactionHelper.getLoanDetails(loanId); @@ -1036,7 +1036,7 @@ public void verifyLoanInstallmentRecalculatedIfThereIsOverdueInstallmentOnProgre runAt("2 February 2023", () -> { Long loanId = loanIdRef.get(); - schedulerJobHelper.executeAndAwaitJob("Update Loan Arrears Aging"); + schedulerJobHelper.executeAndAwaitJob("Update Loan Arrears Ageing"); schedulerJobHelper.executeAndAwaitJob("Recalculate Interest For Loans"); GetLoansLoanIdResponse loanDetails = loanTransactionHelper.getLoanDetails(loanId); @@ -1050,7 +1050,7 @@ public void verifyLoanInstallmentRecalculatedIfThereIsOverdueInstallmentOnProgre runAt("20 February 2023", () -> { Long loanId = loanIdRef.get(); - schedulerJobHelper.executeAndAwaitJob("Update Loan Arrears Aging"); + schedulerJobHelper.executeAndAwaitJob("Update Loan Arrears Ageing"); schedulerJobHelper.executeAndAwaitJob("Recalculate Interest For Loans"); GetLoansLoanIdResponse loanDetails = loanTransactionHelper.getLoanDetails(loanId); @@ -1064,7 +1064,7 @@ public void verifyLoanInstallmentRecalculatedIfThereIsOverdueInstallmentOnProgre runAt("2 March 2023", () -> { Long loanId = loanIdRef.get(); - schedulerJobHelper.executeAndAwaitJob("Update Loan Arrears Aging"); + schedulerJobHelper.executeAndAwaitJob("Update Loan Arrears Ageing"); schedulerJobHelper.executeAndAwaitJob("Recalculate Interest For Loans"); GetLoansLoanIdResponse loanDetails = loanTransactionHelper.getLoanDetails(loanId); @@ -1114,7 +1114,7 @@ public void verifyLoanInstallmentRecalculatedIfThereIsOverdueInstallmentOnCumula runAt("2 February 2023", () -> { Long loanId = loanIdRef.get(); - schedulerJobHelper.executeAndAwaitJob("Update Loan Arrears Aging"); + schedulerJobHelper.executeAndAwaitJob("Update Loan Arrears Ageing"); schedulerJobHelper.executeAndAwaitJob("Recalculate Interest For Loans"); GetLoansLoanIdResponse loanDetails = loanTransactionHelper.getLoanDetails(loanId); @@ -1206,7 +1206,7 @@ public void verifyLoanInstallmentRecalculatedIfThereIsOverdueInstallmentOnCumula runAt("8 February 2023", () -> { Long loanId = loanIdRef.get(); - schedulerJobHelper.executeAndAwaitJob("Update Loan Arrears Aging"); + schedulerJobHelper.executeAndAwaitJob("Update Loan Arrears Ageing"); schedulerJobHelper.executeAndAwaitJob("Recalculate Interest For Loans"); GetLoansLoanIdResponse loanDetails = loanTransactionHelper.getLoanDetails(loanId); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanPostChargeOffScenariosTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanPostChargeOffScenariosTest.java index ddf4e0a3f07..f94f20ae7fe 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanPostChargeOffScenariosTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanPostChargeOffScenariosTest.java @@ -1194,7 +1194,7 @@ private Integer createLoanProductWithPeriodicAccrualAccounting() { .daysInYearType(1)// .daysInMonthType(1)// .canDefineInstallmentAmount(true)// - .graceOnArrearsAging(3)// + .graceOnArrearsAgeing(3)// .overdueDaysForNPA(179)// .accountMovesOutOfNPAOnlyOnArrearsCompletion(false)// .principalThresholdForLastInstallment(50)// @@ -1211,7 +1211,7 @@ private Integer createLoanProductWithPeriodicAccrualAccounting() { .inArrearsTolerance(true)// .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// - .graceOnArrearsAging(true))// + .graceOnArrearsAgeing(true))// .allowPartialPeriodInterestCalculation(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanProductChargeOffReasonMappingsTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanProductChargeOffReasonMappingsTest.java index 84b45770490..52aeb6a863b 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanProductChargeOffReasonMappingsTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanProductChargeOffReasonMappingsTest.java @@ -164,7 +164,7 @@ private PostLoanProductsRequest loanProductsRequest(Long chargeOffReasonId, Long .daysInYearType(1)// .daysInMonthType(1)// .canDefineInstallmentAmount(true)// - .graceOnArrearsAging(3)// + .graceOnArrearsAgeing(3)// .overdueDaysForNPA(179)// .accountMovesOutOfNPAOnlyOnArrearsCompletion(false)// .principalThresholdForLastInstallment(50)// @@ -180,7 +180,7 @@ private PostLoanProductsRequest loanProductsRequest(Long chargeOffReasonId, Long .inArrearsTolerance(true)// .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// - .graceOnArrearsAging(true)) + .graceOnArrearsAgeing(true)) .outstandingLoanBalance(10000.0)// .charges(charges)// .accountingRule(3)// diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanTransactionAccrualActivityPostingTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanTransactionAccrualActivityPostingTest.java index 83f53ca0a1a..b3281aa4f41 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanTransactionAccrualActivityPostingTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanTransactionAccrualActivityPostingTest.java @@ -1485,7 +1485,7 @@ private PostLoanProductsRequest loanProductsRequestInterestDecliningBalanceDaily .daysInYearType(1)// .daysInMonthType(1)// .canDefineInstallmentAmount(true)// - .graceOnArrearsAging(3)// + .graceOnArrearsAgeing(3)// .overdueDaysForNPA(179)// .accountMovesOutOfNPAOnlyOnArrearsCompletion(false)// .principalThresholdForLastInstallment(50)// @@ -1501,7 +1501,7 @@ private PostLoanProductsRequest loanProductsRequestInterestDecliningBalanceDaily .inArrearsTolerance(true)// .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// - .graceOnArrearsAging(true)) + .graceOnArrearsAgeing(true)) .outstandingLoanBalance(10000.0)// .charges(charges)// .accountingRule(3)// diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/RepaymentReverseExternalIdTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/RepaymentReverseExternalIdTest.java index 85433acf795..2eaa1cef5fb 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/RepaymentReverseExternalIdTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/RepaymentReverseExternalIdTest.java @@ -194,7 +194,7 @@ private PostLoanProductsRequest loanProductsRequest() { .daysInYearType(1)// .daysInMonthType(1)// .canDefineInstallmentAmount(true)// - .graceOnArrearsAging(3)// + .graceOnArrearsAgeing(3)// .overdueDaysForNPA(179)// .accountMovesOutOfNPAOnlyOnArrearsCompletion(false)// .principalThresholdForLastInstallment(50)// @@ -210,7 +210,7 @@ private PostLoanProductsRequest loanProductsRequest() { .inArrearsTolerance(true)// .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// - .graceOnArrearsAging(true)) + .graceOnArrearsAgeing(true)) .outstandingLoanBalance(10000.0)// .charges(charges)// .accountingRule(3)// diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/SchedulerJobsTestResults.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/SchedulerJobsTestResults.java index e9135ffaa82..1428ee892f9 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/SchedulerJobsTestResults.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/SchedulerJobsTestResults.java @@ -659,7 +659,7 @@ public void testUpdateLoanArrearsAgingJobOutcome() { JsonPath.from(loanDetails).get("netDisbursalAmount").toString()); LoanStatusChecker.verifyLoanIsActive(loanStatusHashMap); - String JobName = "Update Loan Arrears Aging"; + String JobName = "Update Loan Arrears Ageing"; schedulerJobHelper.executeAndAwaitJob(JobName); HashMap loanSummaryData = loanTransactionHelper.getLoanSummary(requestSpec, responseSpec, loanID); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/UndoRepaymentWithDownPaymentIntegrationTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/UndoRepaymentWithDownPaymentIntegrationTest.java index 943df136f62..4cf24b9677f 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/UndoRepaymentWithDownPaymentIntegrationTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/UndoRepaymentWithDownPaymentIntegrationTest.java @@ -275,7 +275,7 @@ private Integer createLoanProductWithPeriodicAccrualAccountingAndAdvancedPayment .daysInYearType(1)// .daysInMonthType(1)// .canDefineInstallmentAmount(true)// - .graceOnArrearsAging(3)// + .graceOnArrearsAgeing(3)// .overdueDaysForNPA(179)// .accountMovesOutOfNPAOnlyOnArrearsCompletion(false)// .principalThresholdForLastInstallment(50)// @@ -293,7 +293,7 @@ private Integer createLoanProductWithPeriodicAccrualAccountingAndAdvancedPayment .inArrearsTolerance(true)// .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// - .graceOnArrearsAging(true))// + .graceOnArrearsAgeing(true))// .allowPartialPeriodInterestCalculation(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/client/feign/modules/LoanProductTemplates.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/client/feign/modules/LoanProductTemplates.java index c3977b65b52..5b95f82d2f4 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/client/feign/modules/LoanProductTemplates.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/client/feign/modules/LoanProductTemplates.java @@ -78,7 +78,7 @@ default PostLoanProductsRequest onePeriod30DaysNoInterest() { .daysInYearType(DaysInYearType.ACTUAL)// .daysInMonthType(DaysInMonthType.ACTUAL)// .canDefineInstallmentAmount(true)// - .graceOnArrearsAging(3)// + .graceOnArrearsAgeing(3)// .overdueDaysForNPA(179)// .accountMovesOutOfNPAOnlyOnArrearsCompletion(false)// .principalThresholdForLastInstallment(50)// @@ -95,7 +95,7 @@ default PostLoanProductsRequest onePeriod30DaysNoInterest() { .inArrearsTolerance(true)// .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// - .graceOnArrearsAging(true))// + .graceOnArrearsAgeing(true))// .allowPartialPeriodInterestCalculation(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// @@ -225,7 +225,7 @@ default PostLoanProductsRequest fourInstallmentsCumulativeTemplate() { .inArrearsTolerance(true)// .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// - .graceOnArrearsAging(true))// + .graceOnArrearsAgeing(true))// .isEqualAmortization(false)// .enableDownPayment(false)// .enableInstallmentLevelDelinquency(false)// diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/loan/penalty/LoanPenaltyBackdatedTransactionTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/loan/penalty/LoanPenaltyBackdatedTransactionTest.java index 19695387110..50221eda2f0 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/loan/penalty/LoanPenaltyBackdatedTransactionTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/loan/penalty/LoanPenaltyBackdatedTransactionTest.java @@ -68,7 +68,7 @@ public void test_PenaltyRecalculationWorksForBackdatedTx_WhenCumulative_1() { // Create Loan Product PostLoanProductsRequest product = createOnePeriod30DaysLongNoInterestPeriodicAccrualProduct() // - .graceOnArrearsAging(0).numberOfRepayments(numberOfRepayments) // + .graceOnArrearsAgeing(0).numberOfRepayments(numberOfRepayments) // .repaymentEvery(repaymentEvery) // .installmentAmountInMultiplesOf(null) // .repaymentFrequencyType(RepaymentFrequencyType.DAYS.longValue()) // @@ -181,7 +181,7 @@ public void test_PenaltyRecalculationWorksForBackdatedTx_WhenCumulative_2() { // Create Loan Product PostLoanProductsRequest product = createOnePeriod30DaysLongNoInterestPeriodicAccrualProduct() // - .graceOnArrearsAging(0).numberOfRepayments(numberOfRepayments) // + .graceOnArrearsAgeing(0).numberOfRepayments(numberOfRepayments) // .repaymentEvery(repaymentEvery) // .installmentAmountInMultiplesOf(null) // .repaymentFrequencyType(RepaymentFrequencyType.DAYS.longValue()) // @@ -295,7 +295,7 @@ public void test_PenaltyRecalculationWorksForBackdatedTx_WhenCumulative_3() { // Create Loan Product PostLoanProductsRequest product = createOnePeriod30DaysLongNoInterestPeriodicAccrualProduct() // - .graceOnArrearsAging(0).numberOfRepayments(numberOfRepayments) // + .graceOnArrearsAgeing(0).numberOfRepayments(numberOfRepayments) // .repaymentEvery(repaymentEvery) // .installmentAmountInMultiplesOf(null) // .repaymentFrequencyType(RepaymentFrequencyType.DAYS.longValue()) //