This is an automated email from the ASF dual-hosted git repository. adamsaghy pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/fineract.git
commit 9c37ef437d44c122d37118abe70b42d402a52220 Author: MarianaDmytrivBinariks <[email protected]> AuthorDate: Wed Aug 6 12:05:11 2025 +0300 FINERACT-2322: added e2e test with next payment data check --- .../test/stepdef/loan/LoanDelinquencyStepDef.java | 27 + .../resources/features/LoanDelinquency.feature | 786 +++++++++++++++++++++ 2 files changed, 813 insertions(+) diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanDelinquencyStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanDelinquencyStepDef.java index 2f83359e22..504633f829 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanDelinquencyStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanDelinquencyStepDef.java @@ -549,6 +549,33 @@ public class LoanDelinquencyStepDef extends AbstractStepDef { .isEqualTo(expectedValuesList); } + @Then("Loan has the following LOAN level next payment due data:") + public void loanNextPaymentDataCheck(DataTable table) throws IOException { + Response<PostLoansResponse> loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); + long loanId = loanResponse.body().getLoanId(); + + List<String> expectedValuesList = table.asLists().get(1); + DelinquencyRange expectedDelinquencyRange = DelinquencyRange.valueOf(expectedValuesList.get(0)); + String expectedDelinquencyRangeValue = expectedDelinquencyRange.getValue(); + expectedValuesList.set(0, expectedDelinquencyRangeValue); + + Response<GetLoansLoanIdResponse> loanDetails = loansApi.retrieveLoan(loanId, false, "", "", "").execute(); + ErrorHelper.checkSuccessfulApiCall(loanDetails); + + String actualDelinquencyRangeValue = loanDetails.body().getDelinquencyRange() == null ? "NO_DELINQUENCY" + : loanDetails.body().getDelinquencyRange().getClassification(); + GetLoansLoanIdDelinquencySummary delinquent = loanDetails.body().getDelinquent(); + + String delinquentAmount = delinquent.getNextPaymentAmount() == null ? null + : new Utils.DoubleFormatter(delinquent.getNextPaymentAmount().doubleValue()).format(); + List<String> actualValuesList = List.of(actualDelinquencyRangeValue, + delinquent.getNextPaymentDueDate() == null ? "null" : FORMATTER.format(delinquent.getNextPaymentDueDate()), + delinquentAmount); + + assertThat(actualValuesList).as(ErrorMessageHelper.wrongValueInLoanLevelDelinquencyData(actualValuesList, expectedValuesList)) + .isEqualTo(expectedValuesList); + } + @Then("Loan has the following INSTALLMENT level delinquency data:") public void loanDelinquencyInstallmentLevelDataCheck(DataTable table) throws IOException { Response<PostLoansResponse> loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); 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 f870f35b55..5967ea805c 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/LoanDelinquency.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/LoanDelinquency.feature @@ -1320,3 +1320,789 @@ Feature: LoanDelinquency | 3 | RANGE_30 | 500.00 | | 4 | RANGE_60 | 500.00 | Then Installment level delinquency event has correct data + + @TestRailId:C3930 + Scenario: Verify nextPaymentAmount value with repayment on first installment - progressive loan, no interest recalculation, zero interest rate - UC1 + When Admin sets the business date to "01 June 2024" + And Admin creates a client with random data + When Admin creates a fully customized loan with the 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 | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30 | 1 June 2024 | 1000 | 0 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 June 2024" with "1000" amount and expected disbursement date on "01 June 2024" + And Admin successfully disburse the loan on "01 June 2024" with "1000" EUR transaction amount + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 750.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | + | 2 | 31 | 01 August 2024 | | 500.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | + | 3 | 31 | 01 September 2024 | | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | + | 4 | 30 | 01 October 2024 | | 0.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 0.0 | 0.0 | 0.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 June 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | NO_DELINQUENCY | 01 July 2024 | 250.0 | + + When Admin sets the business date to "15 June 2024" + When Admin runs inline COB job for Loan + And Customer makes "AUTOPAY" repayment on "15 June 2024" with 50 EUR transaction amount + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 750.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 50.0 | 50.0 | 0.0 | 200.0 | + | 2 | 31 | 01 August 2024 | | 500.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | + | 3 | 31 | 01 September 2024 | | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | + | 4 | 30 | 01 October 2024 | | 0.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 0.0 | 0.0 | 0.0 | 1000.0 | 50.0 | 50.0 | 0.0 | 950.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 June 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + | 15 June 2024 | Repayment | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 950.0 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | NO_DELINQUENCY | 01 July 2024 | 200.0 | + + When Admin sets the business date to "01 August 2024" + When Admin runs inline COB job for Loan + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 750.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 50.0 | 50.0 | 0.0 | 200.0 | + | 2 | 31 | 01 August 2024 | | 500.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | + | 3 | 31 | 01 September 2024 | | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | + | 4 | 30 | 01 October 2024 | | 0.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 0.0 | 0.0 | 0.0 | 1000.0 | 50.0 | 50.0 | 0.0 | 950.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 June 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + | 15 June 2024 | Repayment | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 950.0 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | RANGE_3 | 01 July 2024 | 200.0 | + + When Loan Pay-off is made on "1 August 2024" + Then Loan's all installments have obligations met + + @TestRailId:C3931 + Scenario: Verify nextPaymentAmount value with penalty on first installment - progressive loan, no interest recalculation, non-zero interest rate - UC2 + When Admin sets the business date to "01 June 2024" + And Admin creates a client with random data + When Admin creates a fully customized loan with the 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 | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30 | 1 June 2024 | 1000 | 12 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 June 2024" with "1000" amount and expected disbursement date on "01 June 2024" + And Admin successfully disburse the loan on "01 June 2024" with "1000" EUR transaction amount + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 753.72 | 246.28 | 10.0 | 0.0 | 0.0 | 256.28 | 0.0 | 0.0 | 0.0 | 256.28 | + | 2 | 31 | 01 August 2024 | | 504.98 | 248.74 | 7.54 | 0.0 | 0.0 | 256.28 | 0.0 | 0.0 | 0.0 | 256.28 | + | 3 | 31 | 01 September 2024 | | 253.75 | 251.23 | 5.05 | 0.0 | 0.0 | 256.28 | 0.0 | 0.0 | 0.0 | 256.28 | + | 4 | 30 | 01 October 2024 | | 0.0 | 253.75 | 2.54 | 0.0 | 0.0 | 256.29 | 0.0 | 0.0 | 0.0 | 256.29 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 25.13 | 0.0 | 0.0 | 1025.13 | 0.0 | 0.0 | 0.0 | 1025.13 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 June 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | NO_DELINQUENCY | 01 July 2024 | 256.28 | + + When Admin sets the business date to "20 June 2024" + When Admin runs inline COB job for Loan + And Admin adds "LOAN_NSF_FEE" due date charge with "20 June 2024" due date and 20 EUR transaction amount + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 753.72 | 246.28 | 10.0 | 0.0 | 20.0 | 276.28 | 0.0 | 0.0 | 0.0 | 276.28 | + | 2 | 31 | 01 August 2024 | | 504.98 | 248.74 | 7.54 | 0.0 | 0.0 | 256.28 | 0.0 | 0.0 | 0.0 | 256.28 | + | 3 | 31 | 01 September 2024 | | 253.75 | 251.23 | 5.05 | 0.0 | 0.0 | 256.28 | 0.0 | 0.0 | 0.0 | 256.28 | + | 4 | 30 | 01 October 2024 | | 0.0 | 253.75 | 2.54 | 0.0 | 0.0 | 256.29 | 0.0 | 0.0 | 0.0 | 256.29 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 25.13 | 0.0 | 20.0 | 1045.13 | 0.0 | 0.0 | 0.0 | 1045.13 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 June 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + | 19 June 2024 | Accrual | 6.0 | 0.0 | 6.0 | 0.0 | 0.0 | 0.0 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | NO_DELINQUENCY | 01 July 2024 | 276.28 | + + When Admin sets the business date to "01 August 2024" + When Admin runs inline COB job for Loan + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 753.72 | 246.28 | 10.0 | 0.0 | 20.0 | 276.28 | 0.0 | 0.0 | 0.0 | 276.28 | + | 2 | 31 | 01 August 2024 | | 504.98 | 248.74 | 7.54 | 0.0 | 0.0 | 256.28 | 0.0 | 0.0 | 0.0 | 256.28 | + | 3 | 31 | 01 September 2024 | | 253.75 | 251.23 | 5.05 | 0.0 | 0.0 | 256.28 | 0.0 | 0.0 | 0.0 | 256.28 | + | 4 | 30 | 01 October 2024 | | 0.0 | 253.75 | 2.54 | 0.0 | 0.0 | 256.29 | 0.0 | 0.0 | 0.0 | 256.29 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 25.13 | 0.0 | 20.0 | 1045.13 | 0.0 | 0.0 | 0.0 | 1045.13 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | RANGE_3 | 01 July 2024 | 276.28 | + + When Loan Pay-off is made on "1 August 2024" + Then Loan's all installments have obligations met + + @TestRailId:C3932 + Scenario: Verify nextPaymentAmount value with repayment at 2nd installment - progressive loan, no interest recalculation, the same as repayment period - UC3 + When Admin sets the business date to "01 June 2024" + And Admin creates a client with random data + When Admin creates a fully customized loan with the 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 | + | LP2_INTEREST_FLAT_ADV_PMT_ALLOC_MULTIDISBURSE | 01 June 2024 | 1000 | 12 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 June 2024" with "1000" amount and expected disbursement date on "01 June 2024" + And Admin successfully disburse the loan on "01 June 2024" with "1000" EUR transaction amount + Then Loan Repayment schedule has 3 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 666.67 | 333.33 | 10.0 | 0.0 | 0.0 | 343.33 | 0.0 | 0.0 | 0.0 | 343.33 | + | 2 | 31 | 01 August 2024 | | 333.34 | 333.33 | 10.0 | 0.0 | 0.0 | 343.33 | 0.0 | 0.0 | 0.0 | 343.33 | + | 3 | 31 | 01 September 2024 | | 0.0 | 333.34 | 10.0 | 0.0 | 0.0 | 343.34 | 0.0 | 0.0 | 0.0 | 343.34 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 30.0 | 0.0 | 0.0 | 1030.0 | 0.0 | 0.0 | 0.0 | 1030.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 June 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | NO_DELINQUENCY | 01 July 2024 | 343.33 | + + When Admin sets the business date to "15 July 2024" + When Admin runs inline COB job for Loan + And Customer makes "AUTOPAY" repayment on "15 July 2024" with 343.33 EUR transaction amount + Then Loan Repayment schedule has 3 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | 15 July 2024 | 666.67 | 333.33 | 10.0 | 0.0 | 0.0 | 343.33 | 343.33 | 0.0 | 343.33 | 0.0 | + | 2 | 31 | 01 August 2024 | | 333.34 | 333.33 | 10.0 | 0.0 | 0.0 | 343.33 | 0.0 | 0.0 | 0.0 | 343.33 | + | 3 | 31 | 01 September 2024 | | 0.0 | 333.34 | 10.0 | 0.0 | 0.0 | 343.34 | 0.0 | 0.0 | 0.0 | 343.34 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 30.0 | 0.0 | 0.0 | 1030.0 | 343.33 | 0.0 | 343.33 | 686.67 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 June 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + | 14 July 2024 | Accrual | 10.0 | 0.0 | 10.0 | 0.0 | 0.0 | 0.0 | + | 15 July 2024 | Repayment | 343.33 | 333.33 | 10.0 | 0.0 | 0.0 | 666.67 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | NO_DELINQUENCY | 01 August 2024 | 343.33 | + + When Admin sets the business date to "01 August 2024" + When Admin runs inline COB job for Loan + Then Loan Repayment schedule has 3 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | 15 July 2024 | 666.67 | 333.33 | 10.0 | 0.0 | 0.0 | 343.33 | 343.33 | 0.0 | 343.33 | 0.0 | + | 2 | 31 | 01 August 2024 | | 333.34 | 333.33 | 10.0 | 0.0 | 0.0 | 343.33 | 0.0 | 0.0 | 0.0 | 343.33 | + | 3 | 31 | 01 September 2024 | | 0.0 | 333.34 | 10.0 | 0.0 | 0.0 | 343.34 | 0.0 | 0.0 | 0.0 | 343.34 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 30.0 | 0.0 | 0.0 | 1030.0 | 343.33 | 0.0 | 343.33 | 686.67 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | NO_DELINQUENCY | 01 August 2024 | 343.33 | + + When Loan Pay-off is made on "1 August 2024" + Then Loan's all installments have obligations met + + @TestRailId:C3933 + Scenario: Verify nextPaymentAmount value - progressive loan, interest recalculation daily - UC4 + When Admin sets the business date to "01 June 2024" + And Admin creates a client with random data + When Admin creates a fully customized loan with the 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 | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 June 2024 | 1000 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 June 2024" with "1000" amount and expected disbursement date on "01 June 2024" + And Admin successfully disburse the loan on "01 June 2024" with "1000" EUR transaction amount + Then Loan Repayment schedule has 3 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 668.6 | 331.4 | 5.83 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + | 2 | 31 | 01 August 2024 | | 335.27 | 333.33 | 3.9 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + | 3 | 31 | 01 September 2024 | | 0.0 | 335.27 | 1.96 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 11.69 | 0.0 | 0.0 | 1011.69 | 0.0 | 0.0 | 0.0 | 1011.69 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 June 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | NO_DELINQUENCY | 01 July 2024 | 337.23 | + + When Admin sets the business date to "01 August 2024" + When Admin runs inline COB job for Loan + Then Loan Repayment schedule has 3 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 668.6 | 331.4 | 5.83 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + | 2 | 31 | 01 August 2024 | | 337.2 | 331.4 | 5.83 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + | 3 | 31 | 01 September 2024 | | 0.0 | 337.2 | 1.97 | 0.0 | 0.0 | 339.17 | 0.0 | 0.0 | 0.0 | 339.17 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 13.63 | 0.0 | 0.0 | 1013.63 | 0.0 | 0.0 | 0.0 | 1013.63 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 June 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + | 31 July 2024 | Accrual | 11.48 | 0.0 | 11.48 | 0.0 | 0.0 | 0.0 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | RANGE_3 | 01 July 2024 | 337.23 | + + When Admin sets the business date to "05 August 2024" + When Admin runs inline COB job for Loan + Then Loan Repayment schedule has 3 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 668.6 | 331.4 | 5.83 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + | 2 | 31 | 01 August 2024 | | 337.2 | 331.4 | 5.83 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + | 3 | 31 | 01 September 2024 | | 0.0 | 337.2 | 2.47 | 0.0 | 0.0 | 339.67 | 0.0 | 0.0 | 0.0 | 339.67 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 14.13 | 0.0 | 0.0 | 1014.13 | 0.0 | 0.0 | 0.0 | 1014.13 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | RANGE_30 | 01 July 2024 | 337.23 | + + When Loan Pay-off is made on "5 August 2024" + Then Loan's all installments have obligations met + + @TestRailId:C3934 + Scenario: Verify nextPaymentAmount value with chargeback - progressive loan, interest recalculation daily - UC5 + When Admin sets the business date to "01 June 2024" + And Admin creates a client with random data + When Admin creates a fully customized loan with the 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 | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 June 2024 | 1000 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 June 2024" with "1000" amount and expected disbursement date on "01 June 2024" + And Admin successfully disburse the loan on "01 June 2024" with "1000" EUR transaction amount + Then Loan Repayment schedule has 3 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 668.6 | 331.4 | 5.83 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + | 2 | 31 | 01 August 2024 | | 335.27 | 333.33 | 3.9 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + | 3 | 31 | 01 September 2024 | | 0.0 | 335.27 | 1.96 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 11.69 | 0.0 | 0.0 | 1011.69 | 0.0 | 0.0 | 0.0 | 1011.69 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 June 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | NO_DELINQUENCY | 01 July 2024 | 337.23 | + + When Admin sets the business date to "25 June 2024" + When Admin runs inline COB job for Loan + And Customer makes "AUTOPAY" repayment on "25 June 2024" with 55 EUR transaction amount + And Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 12 EUR transaction amount for Payment nr. 1 + Then Loan Repayment schedule has 3 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 668.55 | 343.45 | 5.78 | 0.0 | 0.0 | 349.23 | 55.0 | 55.0 | 0.0 | 294.23 | + | 2 | 31 | 01 August 2024 | | 335.22 | 333.33 | 3.9 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + | 3 | 31 | 01 September 2024 | | 0.0 | 335.22 | 1.96 | 0.0 | 0.0 | 337.18 | 0.0 | 0.0 | 0.0 | 337.18 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1012.0 | 11.64 | 0.0 | 0.0 | 1023.64 | 55.0 | 55.0 | 0.0 | 968.64 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 June 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + | 24 June 2024 | Accrual | 4.47 | 0.0 | 4.47 | 0.0 | 0.0 | 0.0 | + | 25 June 2024 | Repayment | 55.0 | 55.0 | 0.0 | 0.0 | 0.0 | 945.0 | + | 25 June 2024 | Chargeback | 12.0 | 12.0 | 0.0 | 0.0 | 0.0 | 957.0 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | NO_DELINQUENCY | 01 July 2024 | 294.23 | + + When Admin sets the business date to "01 August 2024" + When Admin runs inline COB job for Loan + Then Loan Repayment schedule has 3 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 668.55 | 343.45 | 5.78 | 0.0 | 0.0 | 349.23 | 55.0 | 55.0 | 0.0 | 294.23 | + | 2 | 31 | 01 August 2024 | | 336.9 | 331.65 | 5.58 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + | 3 | 31 | 01 September 2024 | | 0.0 | 336.9 | 1.97 | 0.0 | 0.0 | 338.87 | 0.0 | 0.0 | 0.0 | 338.87 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1012.0 | 13.33 | 0.0 | 0.0 | 1025.33 | 55.0 | 55.0 | 0.0 | 970.33 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | RANGE_3 | 01 July 2024 | 294.23 | + + When Admin sets the business date to "05 August 2024" + When Admin runs inline COB job for Loan + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | RANGE_30 | 01 July 2024 | 294.23 | + + When Loan Pay-off is made on "5 August 2024" + Then Loan's all installments have obligations met + + @TestRailId:C3935 + Scenario: Verify nextPaymentAmount value with full repayment on first installment - progressive loan, interest recalculation daily - UC6 + When Admin sets the business date to "01 June 2024" + And Admin creates a client with random data + When Admin creates a fully customized loan with the 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 | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 June 2024 | 1000 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 June 2024" with "1000" amount and expected disbursement date on "01 June 2024" + And Admin successfully disburse the loan on "01 June 2024" with "1000" EUR transaction amount + Then Loan Repayment schedule has 3 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 668.6 | 331.4 | 5.83 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + | 2 | 31 | 01 August 2024 | | 335.27 | 333.33 | 3.9 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + | 3 | 31 | 01 September 2024 | | 0.0 | 335.27 | 1.96 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 11.69 | 0.0 | 0.0 | 1011.69 | 0.0 | 0.0 | 0.0 | 1011.69 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 June 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | NO_DELINQUENCY | 01 July 2024 | 337.23 | + + When Admin sets the business date to "25 June 2024" + When Admin runs inline COB job for Loan + And Customer makes "AUTOPAY" repayment on "25 June 2024" with 337.23 EUR transaction amount + Then Loan Repayment schedule has 3 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | 25 June 2024 | 667.44 | 332.56 | 4.67 | 0.0 | 0.0 | 337.23 | 337.23 | 337.23 | 0.0 | 0.0 | + | 2 | 31 | 01 August 2024 | | 334.88 | 332.56 | 4.67 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + | 3 | 31 | 01 September 2024 | | 0.0 | 334.88 | 1.95 | 0.0 | 0.0 | 336.83 | 0.0 | 0.0 | 0.0 | 336.83 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 11.29 | 0.0 | 0.0 | 1011.29 | 337.23 | 337.23 | 0.0 | 674.06 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 June 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + | 24 June 2024 | Accrual | 4.47 | 0.0 | 4.47 | 0.0 | 0.0 | 0.0 | + | 25 June 2024 | Repayment | 337.23 | 332.56 | 4.67 | 0.0 | 0.0 | 667.44 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | NO_DELINQUENCY | 01 August 2024 | 337.23 | + + When Admin sets the business date to "01 July 2024" + When Admin runs inline COB job for Loan + Then Loan Repayment schedule has 3 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | 25 June 2024 | 667.44 | 332.56 | 4.67 | 0.0 | 0.0 | 337.23 | 337.23 | 337.23 | 0.0 | 0.0 | + | 2 | 31 | 01 August 2024 | | 334.88 | 332.56 | 4.67 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + | 3 | 31 | 01 September 2024 | | 0.0 | 334.88 | 1.95 | 0.0 | 0.0 | 336.83 | 0.0 | 0.0 | 0.0 | 336.83 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 11.29 | 0.0 | 0.0 | 1011.29 | 337.23 | 337.23 | 0.0 | 674.06 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | NO_DELINQUENCY | 01 August 2024 | 337.23 | + + When Admin sets the business date to "03 July 2024" + When Admin runs inline COB job for Loan + Then Loan Repayment schedule has 3 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | 25 June 2024 | 667.44 | 332.56 | 4.67 | 0.0 | 0.0 | 337.23 | 337.23 | 337.23 | 0.0 | 0.0 | + | 2 | 31 | 01 August 2024 | | 334.88 | 332.56 | 4.67 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + | 3 | 31 | 01 September 2024 | | 0.0 | 334.88 | 1.95 | 0.0 | 0.0 | 336.83 | 0.0 | 0.0 | 0.0 | 336.83 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 11.29 | 0.0 | 0.0 | 1011.29 | 337.23 | 337.23 | 0.0 | 674.06 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | NO_DELINQUENCY | 01 August 2024 | 337.23 | + + When Loan Pay-off is made on "1 July 2024" + Then Loan's all installments have obligations met + + @TestRailId:C3936 + Scenario: Verify nextPaymentAmount value overpayment first installment - progressive loan, interest recalculation daily - UC7 + When Admin sets the business date to "01 June 2024" + And Admin creates a client with random data + When Admin creates a fully customized loan with the 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 | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 June 2024 | 1000 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 June 2024" with "1000" amount and expected disbursement date on "01 June 2024" + And Admin successfully disburse the loan on "01 June 2024" with "1000" EUR transaction amount + Then Loan Repayment schedule has 3 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 668.6 | 331.4 | 5.83 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + | 2 | 31 | 01 August 2024 | | 335.27 | 333.33 | 3.9 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + | 3 | 31 | 01 September 2024 | | 0.0 | 335.27 | 1.96 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 11.69 | 0.0 | 0.0 | 1011.69 | 0.0 | 0.0 | 0.0 | 1011.69 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 June 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | NO_DELINQUENCY | 01 July 2024 | 337.23 | + + When Admin sets the business date to "25 June 2024" + When Admin runs inline COB job for Loan + And Customer makes "AUTOPAY" repayment on "25 June 2024" with 400 EUR transaction amount + Then Loan Repayment schedule has 3 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | 25 June 2024 | 667.44 | 332.56 | 4.67 | 0.0 | 0.0 | 337.23 | 337.23 | 337.23 | 0.0 | 0.0 | + | 2 | 31 | 01 August 2024 | | 334.44 | 333.0 | 4.23 | 0.0 | 0.0 | 337.23 | 62.77 | 62.77 | 0.0 | 274.46 | + | 3 | 31 | 01 September 2024 | | 0.0 | 334.44 | 1.95 | 0.0 | 0.0 | 336.39 | 0.0 | 0.0 | 0.0 | 336.39 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 10.85 | 0.0 | 0.0 | 1010.85 | 400.0 | 400.0 | 0.0 | 610.85 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 June 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + | 24 June 2024 | Accrual | 4.47 | 0.0 | 4.47 | 0.0 | 0.0 | 0.0 | + | 25 June 2024 | Repayment | 400.0 | 395.33 | 4.67 | 0.0 | 0.0 | 604.67 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | NO_DELINQUENCY | 01 August 2024 | 274.46 | + + When Admin sets the business date to "01 August 2024" + When Admin runs inline COB job for Loan + Then Loan Repayment schedule has 3 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | 25 June 2024 | 667.44 | 332.56 | 4.67 | 0.0 | 0.0 | 337.23 | 337.23 | 337.23 | 0.0 | 0.0 | + | 2 | 31 | 01 August 2024 | | 334.44 | 333.0 | 4.23 | 0.0 | 0.0 | 337.23 | 62.77 | 62.77 | 0.0 | 274.46 | + | 3 | 31 | 01 September 2024 | | 0.0 | 334.44 | 1.95 | 0.0 | 0.0 | 336.39 | 0.0 | 0.0 | 0.0 | 336.39 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 10.85 | 0.0 | 0.0 | 1010.85 | 400.0 | 400.0 | 0.0 | 610.85 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | NO_DELINQUENCY | 01 August 2024 | 274.46 | + + When Admin sets the business date to "03 August 2024" + When Admin runs inline COB job for Loan + Then Loan Repayment schedule has 3 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | 25 June 2024 | 667.44 | 332.56 | 4.67 | 0.0 | 0.0 | 337.23 | 337.23 | 337.23 | 0.0 | 0.0 | + | 2 | 31 | 01 August 2024 | | 334.44 | 333.0 | 4.23 | 0.0 | 0.0 | 337.23 | 62.77 | 62.77 | 0.0 | 274.46 | + | 3 | 31 | 01 September 2024 | | 0.0 | 334.44 | 2.05 | 0.0 | 0.0 | 336.49 | 0.0 | 0.0 | 0.0 | 336.49 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 10.95 | 0.0 | 0.0 | 1010.95 | 400.0 | 400.0 | 0.0 | 610.95 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | NO_DELINQUENCY | 01 August 2024 | 274.46 | + + When Loan Pay-off is made on "3 August 2024" + Then Loan's all installments have obligations met + + @TestRailId:C3937 + Scenario: Verify nextPaymentAmount value for the last installment - progressive loan, interest recalculation daily, next installment - UC8 + When Admin sets the business date to "01 June 2024" + And Admin creates a client with random data + When Admin creates a fully customized loan with the 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 | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 June 2024 | 1000 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 June 2024" with "1000" amount and expected disbursement date on "01 June 2024" + And Admin successfully disburse the loan on "01 June 2024" with "1000" EUR transaction amount + Then Loan Repayment schedule has 3 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 668.6 | 331.4 | 5.83 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + | 2 | 31 | 01 August 2024 | | 335.27 | 333.33 | 3.9 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + | 3 | 31 | 01 September 2024 | | 0.0 | 335.27 | 1.96 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 11.69 | 0.0 | 0.0 | 1011.69 | 0.0 | 0.0 | 0.0 | 1011.69 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 June 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | NO_DELINQUENCY | 01 July 2024 | 337.23 | + + When Admin sets the business date to "15 August 2024" + When Admin runs inline COB job for Loan + And Customer makes "AUTOPAY" repayment on "15 August 2024" with 337.23 EUR transaction amount + Then Loan Repayment schedule has 3 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | 15 August 2024 | 668.6 | 331.4 | 5.83 | 0.0 | 0.0 | 337.23 | 337.23 | 0.0 | 337.23 | 0.0 | + | 2 | 31 | 01 August 2024 | | 337.2 | 331.4 | 5.83 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + | 3 | 31 | 01 September 2024 | | 0.0 | 337.2 | 3.71 | 0.0 | 0.0 | 340.91 | 0.0 | 0.0 | 0.0 | 340.91 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 15.37 | 0.0 | 0.0 | 1015.37 | 337.23 | 0.0 | 337.23 | 678.14 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 June 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + | 14 August 2024 | Accrual | 12.18 | 0.0 | 12.18 | 0.0 | 0.0 | 0.0 | + | 15 August 2024 | Repayment | 337.23 | 331.4 | 5.83 | 0.0 | 0.0 | 668.6 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | RANGE_3 | 15 August 2024 | 340.91 | + + When Admin sets the business date to "01 September 2024" + When Admin runs inline COB job for Loan + Then Loan Repayment schedule has 3 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | 15 August 2024 | 668.6 | 331.4 | 5.83 | 0.0 | 0.0 | 337.23 | 337.23 | 0.0 | 337.23 | 0.0 | + | 2 | 31 | 01 August 2024 | | 337.2 | 331.4 | 5.83 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + | 3 | 31 | 01 September 2024 | | 0.0 | 337.2 | 4.77 | 0.0 | 0.0 | 341.97 | 0.0 | 0.0 | 0.0 | 341.97 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 16.43 | 0.0 | 0.0 | 1016.43 | 337.23 | 0.0 | 337.23 | 679.2 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | RANGE_3 | 15 August 2024 | 341.97 | + + When Admin sets the business date to "03 September 2024" + When Admin runs inline COB job for Loan + Then Loan Repayment schedule has 3 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | 15 August 2024 | 668.6 | 331.4 | 5.83 | 0.0 | 0.0 | 337.23 | 337.23 | 0.0 | 337.23 | 0.0 | + | 2 | 31 | 01 August 2024 | | 337.2 | 331.4 | 5.83 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + | 3 | 31 | 01 September 2024 | | 0.0 | 337.2 | 4.77 | 0.0 | 0.0 | 341.97 | 0.0 | 0.0 | 0.0 | 341.97 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 16.43 | 0.0 | 0.0 | 1016.43 | 337.23 | 0.0 | 337.23 | 679.2 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | RANGE_3 | 15 August 2024 | 341.97 | + + When Loan Pay-off is made on "3 September 2024" + Then Loan's all installments have obligations met + + @TestRailId:C3938 + Scenario: Verify nextPaymentAmount value for the last installment - progressive loan, interest recalculation daily, last installment - UC9 + When Admin sets the business date to "01 June 2024" + And Admin creates a client with random data + When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "LAST_INSTALLMENT" future installment allocation rule + When Admin creates a fully customized loan with the 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 | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 June 2024 | 1000 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 June 2024" with "1000" amount and expected disbursement date on "01 June 2024" + And Admin successfully disburse the loan on "01 June 2024" with "1000" EUR transaction amount + Then Loan Repayment schedule has 3 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 668.6 | 331.4 | 5.83 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + | 2 | 31 | 01 August 2024 | | 335.27 | 333.33 | 3.9 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + | 3 | 31 | 01 September 2024 | | 0.0 | 335.27 | 1.96 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 11.69 | 0.0 | 0.0 | 1011.69 | 0.0 | 0.0 | 0.0 | 1011.69 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 June 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | NO_DELINQUENCY | 01 July 2024 | 337.23 | + + When Admin sets the business date to "15 June 2024" + When Admin runs inline COB job for Loan + And Customer makes "AUTOPAY" repayment on "15 June 2024" with 337.23 EUR transaction amount + Then Loan Repayment schedule has 3 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 667.55 | 332.45 | 4.78 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + | 2 | 31 | 01 August 2024 | | 337.23 | 330.32 | 1.93 | 0.0 | 0.0 | 332.25 | 0.0 | 0.0 | 0.0 | 332.25 | + | 3 | 31 | 01 September 2024 | 15 June 2024 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | 337.23 | 337.23 | 0.0 | 0.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 6.71 | 0.0 | 0.0 | 1006.71 | 337.23 | 337.23 | 0.0 | 669.48 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 June 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + | 14 June 2024 | Accrual | 2.53 | 0.0 | 2.53 | 0.0 | 0.0 | 0.0 | + | 15 June 2024 | Repayment | 337.23 | 337.23 | 0.0 | 0.0 | 0.0 | 662.77 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | NO_DELINQUENCY | 01 July 2024 | 337.23 | + + When Admin sets the business date to "15 July 2024" + When Admin runs inline COB job for Loan + Then Loan Repayment schedule has 3 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 667.55 | 332.45 | 4.78 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + | 2 | 31 | 01 August 2024 | | 337.23 | 330.32 | 2.8 | 0.0 | 0.0 | 333.12 | 0.0 | 0.0 | 0.0 | 333.12 | + | 3 | 31 | 01 September 2024 | 15 June 2024 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | 337.23 | 337.23 | 0.0 | 0.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 7.58 | 0.0 | 0.0 | 1007.58 | 337.23 | 337.23 | 0.0 | 670.35 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | RANGE_3 | 01 July 2024 | 337.23 | + + When Admin sets the business date to "01 August 2024" + When Admin runs inline COB job for Loan + Then Loan Repayment schedule has 3 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 667.55 | 332.45 | 4.78 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + | 2 | 31 | 01 August 2024 | | 337.23 | 330.32 | 3.87 | 0.0 | 0.0 | 334.19 | 0.0 | 0.0 | 0.0 | 334.19 | + | 3 | 31 | 01 September 2024 | 15 June 2024 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | 337.23 | 337.23 | 0.0 | 0.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 8.65 | 0.0 | 0.0 | 1008.65 | 337.23 | 337.23 | 0.0 | 671.42 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | RANGE_3 | 01 July 2024 | 337.23 | + When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + + When Loan Pay-off is made on "1 August 2024" + Then Loan's all installments have obligations met + + @TestRailId:C3939 + Scenario: Verify nextPaymentAmount value with loan pay-off on first installment - progressive loan, interest recalculation daily - UC10 + When Admin sets the business date to "01 June 2024" + And Admin creates a client with random data + When Admin creates a fully customized loan with the 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 | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 June 2024 | 1000 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 June 2024" with "1000" amount and expected disbursement date on "01 June 2024" + And Admin successfully disburse the loan on "01 June 2024" with "1000" EUR transaction amount + Then Loan Repayment schedule has 3 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 668.6 | 331.4 | 5.83 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + | 2 | 31 | 01 August 2024 | | 335.27 | 333.33 | 3.9 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + | 3 | 31 | 01 September 2024 | | 0.0 | 335.27 | 1.96 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 11.69 | 0.0 | 0.0 | 1011.69 | 0.0 | 0.0 | 0.0 | 1011.69 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 June 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | NO_DELINQUENCY | 01 July 2024 | 337.23 | + + When Admin sets the business date to "25 June 2024" + When Admin runs inline COB job for Loan + When Loan Pay-off is made on "25 June 2024" + Then Loan Repayment schedule has 3 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | 25 June 2024 | 667.44 | 332.56 | 4.67 | 0.0 | 0.0 | 337.23 | 337.23 | 337.23 | 0.0 | 0.0 | + | 2 | 31 | 01 August 2024 | 25 June 2024 | 330.21 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | 337.23 | 337.23 | 0.0 | 0.0 | + | 3 | 31 | 01 September 2024 | 25 June 2024 | 0.0 | 330.21 | 0.0 | 0.0 | 0.0 | 330.21 | 330.21 | 330.21 | 0.0 | 0.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 4.67 | 0.0 | 0.0 | 1004.67 | 1004.67 | 1004.67 | 0.0 | 0.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 June 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + | 24 June 2024 | Accrual | 4.47 | 0.0 | 4.47 | 0.0 | 0.0 | 0.0 | + | 25 June 2024 | Repayment | 1004.67 | 1000.0 | 4.67 | 0.0 | 0.0 | 0.0 | + | 25 June 2024 | Accrual | 0.2 | 0.0 | 0.2 | 0.0 | 0.0 | 0.0 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | NO_DELINQUENCY | 25 June 2024 | 0.0 | + + When Admin sets the business date to "01 August 2024" + When Admin runs inline COB job for Loan + Then Loan Repayment schedule has 3 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | 25 June 2024 | 667.44 | 332.56 | 4.67 | 0.0 | 0.0 | 337.23 | 337.23 | 337.23 | 0.0 | 0.0 | + | 2 | 31 | 01 August 2024 | 25 June 2024 | 330.21 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | 337.23 | 337.23 | 0.0 | 0.0 | + | 3 | 31 | 01 September 2024 | 25 June 2024 | 0.0 | 330.21 | 0.0 | 0.0 | 0.0 | 330.21 | 330.21 | 330.21 | 0.0 | 0.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 4.67 | 0.0 | 0.0 | 1004.67 | 1004.67 | 1004.67 | 0.0 | 0.0 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | NO_DELINQUENCY | 01 August 2024 | 0.0 | + + @TestRailId:C3940 + Scenario: Verify nextPaymentAmount value with downpayment and interest refund - progressive loan, interest recalculation daily - UC11 + When Admin sets the business date to "01 June 2024" + And Admin creates a client with random data + When Admin creates a fully customized loan with the 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 | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_REFUND_INTEREST_RECALC_DOWNPAYMENT_ACCRUAL_ACTIVITY | 01 June 2024 | 1000 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 June 2024" with "1000" amount and expected disbursement date on "01 June 2024" + And Admin successfully disburse the loan on "01 June 2024" with "1000" EUR transaction amount + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 June 2024 | 01 June 2024 | 750.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | + | 2 | 30 | 01 July 2024 | | 501.45 | 248.55 | 4.37 | 0.0 | 0.0 | 252.92 | 0.0 | 0.0 | 0.0 | 252.92 | + | 3 | 31 | 01 August 2024 | | 251.46 | 249.99 | 2.93 | 0.0 | 0.0 | 252.92 | 0.0 | 0.0 | 0.0 | 252.92 | + | 4 | 31 | 01 September 2024 | | 0.0 | 251.46 | 1.47 | 0.0 | 0.0 | 252.93 | 0.0 | 0.0 | 0.0 | 252.93 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 8.77 | 0.0 | 0.0 | 1008.77 | 250.0 | 0.0 | 0.0 | 758.77 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 June 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + | 01 June 2024 | Down Payment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 750.0 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | NO_DELINQUENCY | 01 July 2024 | 252.92 | + + When Admin sets the business date to "01 August 2024" + When Admin runs inline COB job for Loan + When Customer makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "01 August 2024" with 200 EUR transaction amount and self-generated Idempotency key + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 June 2024 | 01 June 2024 | 750.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | + | 2 | 30 | 01 July 2024 | | 501.45 | 248.55 | 4.37 | 0.0 | 0.0 | 252.92 | 202.32 | 0.0 | 202.32 | 50.6 | + | 3 | 31 | 01 August 2024 | | 252.9 | 248.55 | 4.37 | 0.0 | 0.0 | 252.92 | 0.0 | 0.0 | 0.0 | 252.92 | + | 4 | 31 | 01 September 2024 | | 0.0 | 252.9 | 1.48 | 0.0 | 0.0 | 254.38 | 0.0 | 0.0 | 0.0 | 254.38 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 10.22 | 0.0 | 0.0 | 1010.22 | 452.32 | 0.0 | 202.32 | 557.9 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 June 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + | 01 June 2024 | Down Payment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 750.0 | + | 01 July 2024 | Accrual Activity | 4.37 | 0.0 | 4.37 | 0.0 | 0.0 | 0.0 | + | 31 July 2024 | Accrual | 8.6 | 0.0 | 8.6 | 0.0 | 0.0 | 0.0 | + | 01 August 2024 | Merchant Issued Refund | 200.0 | 200.0 | 0.0 | 0.0 | 0.0 | 550.0 | + | 01 August 2024 | Interest Refund | 2.32 | 2.32 | 0.0 | 0.0 | 0.0 | 547.68 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | RANGE_3 | 01 August 2024 | 252.92 | + + When Admin sets the business date to "01 September 2024" + When Admin runs inline COB job for Loan + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 June 2024 | 01 June 2024 | 750.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | + | 2 | 30 | 01 July 2024 | | 501.45 | 248.55 | 4.37 | 0.0 | 0.0 | 252.92 | 202.32 | 0.0 | 202.32 | 50.6 | + | 3 | 31 | 01 August 2024 | | 252.9 | 248.55 | 4.37 | 0.0 | 0.0 | 252.92 | 0.0 | 0.0 | 0.0 | 252.92 | + | 4 | 31 | 01 September 2024 | | 0.0 | 252.9 | 3.19 | 0.0 | 0.0 | 256.09 | 0.0 | 0.0 | 0.0 | 256.09 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 11.93 | 0.0 | 0.0 | 1011.93 | 452.32 | 0.0 | 202.32 | 559.61 | + Then Loan has the following LOAN level next payment due data: + | classification | nextPaymentDueDate | nextPaymentAmount | + | RANGE_30 | 01 August 2024 | 252.92 | + + When Loan Pay-off is made on "1 September 2024" + Then Loan's all installments have obligations met
