From 87ad93216e7b04e5e30cc9553d309abef19127f6 Mon Sep 17 00:00:00 2001 From: Peter Kovacs Date: Fri, 8 Nov 2024 08:42:52 +0100 Subject: [PATCH] FINERACT-2070: E2E testcase migration - feature files - pt4 --- .../test/stepdef/loan/LoanStepDef.java | 296 +++++++ .../resources/features/LoanChargeOff.feature | 107 ++- .../resources/features/LoanChargeback.feature | 801 +++++++++++++++--- .../features/LoanDelinquency.feature | 251 ++++-- .../features/LoanDownPayment.feature | 258 ++++-- .../LoanInterestPaymentWaiver.feature | 691 +++++++++++++++ .../resources/features/LoanProduct.feature | 20 +- 7 files changed, 2107 insertions(+), 317 deletions(-) create mode 100644 fineract-e2e-tests-runner/src/test/resources/features/LoanInterestPaymentWaiver.feature 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 6fa3f649d..6cc1f37a7 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 @@ -399,6 +399,302 @@ public class LoanStepDef extends AbstractStepDef { createCustomizedLoan(data.get(1), true); } + @When("Admin creates a fully customized loan with forced disabled downpayment with the following data:") + public void createFullyCustomizedLoanWithForcedDisabledDownpayment(DataTable table) throws IOException { + List> data = table.asLists(); + List loanData = data.get(1); + String loanProduct = loanData.get(0); + String submitDate = loanData.get(1); + String principal = loanData.get(2); + BigDecimal interestRate = new BigDecimal(loanData.get(3)); + String interestType = loanData.get(4); + String interestCalculationPeriod = loanData.get(5); + String amortizationType = loanData.get(6); + Integer loanTermFrequency = Integer.valueOf(loanData.get(7)); + String loanTermFrequencyType = loanData.get(8); + Integer repaymentFrequency = Integer.valueOf(loanData.get(9)); + String repaymentFrequencyType = loanData.get(10); + Integer numberOfRepayments = Integer.valueOf(loanData.get(11)); + Integer graceOnPrincipalPayment = Integer.valueOf(loanData.get(12)); + Integer graceOnInterestPayment = Integer.valueOf(loanData.get(13)); + Integer graceOnInterestCharged = Integer.valueOf(loanData.get(14)); + String transactionProcessingStrategyCode = loanData.get(15); + + Response clientResponse = testContext().get(TestContextKey.CLIENT_CREATE_RESPONSE); + Long clientId = clientResponse.body().getClientId(); + + DefaultLoanProduct product = DefaultLoanProduct.valueOf(loanProduct); + Long loanProductId = loanProductResolver.resolve(product); + + LoanTermFrequencyType termFrequencyType = LoanTermFrequencyType.valueOf(loanTermFrequencyType); + Integer loanTermFrequencyTypeValue = termFrequencyType.getValue(); + + RepaymentFrequencyType repaymentFrequencyType1 = RepaymentFrequencyType.valueOf(repaymentFrequencyType); + Integer repaymentFrequencyTypeValue = repaymentFrequencyType1.getValue(); + + InterestType interestType1 = InterestType.valueOf(interestType); + Integer interestTypeValue = interestType1.getValue(); + + InterestCalculationPeriodTime interestCalculationPeriod1 = InterestCalculationPeriodTime.valueOf(interestCalculationPeriod); + Integer interestCalculationPeriodValue = interestCalculationPeriod1.getValue(); + + AmortizationType amortizationType1 = AmortizationType.valueOf(amortizationType); + Integer amortizationTypeValue = amortizationType1.getValue(); + + TransactionProcessingStrategyCode processingStrategyCode = TransactionProcessingStrategyCode + .valueOf(transactionProcessingStrategyCode); + String transactionProcessingStrategyCodeValue = processingStrategyCode.getValue(); + + PostLoansRequest loansRequest = loanRequestFactory.defaultLoansRequest(clientId)// + .productId(loanProductId)// + .principal(new BigDecimal(principal))// + .interestRatePerPeriod(interestRate)// + .enableDownPayment(false)// + .interestType(interestTypeValue)// + .interestCalculationPeriodType(interestCalculationPeriodValue)// + .amortizationType(amortizationTypeValue)// + .loanTermFrequency(loanTermFrequency)// + .loanTermFrequencyType(loanTermFrequencyTypeValue)// + .numberOfRepayments(numberOfRepayments)// + .repaymentEvery(repaymentFrequency)// + .repaymentFrequencyType(repaymentFrequencyTypeValue)// + .submittedOnDate(submitDate)// + .expectedDisbursementDate(submitDate)// + .graceOnPrincipalPayment(graceOnPrincipalPayment)// + .graceOnInterestPayment(graceOnInterestPayment)// + .graceOnInterestPayment(graceOnInterestCharged).transactionProcessingStrategyCode(transactionProcessingStrategyCodeValue);// + + Response response = loansApi.calculateLoanScheduleOrSubmitLoanApplication(loansRequest, "").execute(); + testContext().set(TestContextKey.LOAN_CREATE_RESPONSE, response); + + ErrorHelper.checkSuccessfulApiCall(response); + eventCheckHelper.createLoanEventCheck(response); + } + + @Then("Admin fails to create a fully customized loan with forced enabled downpayment with the following data:") + public void createFullyCustomizedLoanWithForcedEnabledDownpayment(DataTable table) throws IOException { + List> data = table.asLists(); + List loanData = data.get(1); + String loanProduct = loanData.get(0); + String submitDate = loanData.get(1); + String principal = loanData.get(2); + BigDecimal interestRate = new BigDecimal(loanData.get(3)); + String interestType = loanData.get(4); + String interestCalculationPeriod = loanData.get(5); + String amortizationType = loanData.get(6); + Integer loanTermFrequency = Integer.valueOf(loanData.get(7)); + String loanTermFrequencyType = loanData.get(8); + Integer repaymentFrequency = Integer.valueOf(loanData.get(9)); + String repaymentFrequencyType = loanData.get(10); + Integer numberOfRepayments = Integer.valueOf(loanData.get(11)); + Integer graceOnPrincipalPayment = Integer.valueOf(loanData.get(12)); + Integer graceOnInterestPayment = Integer.valueOf(loanData.get(13)); + Integer graceOnInterestCharged = Integer.valueOf(loanData.get(14)); + String transactionProcessingStrategyCode = loanData.get(15); + + Response clientResponse = testContext().get(TestContextKey.CLIENT_CREATE_RESPONSE); + Long clientId = clientResponse.body().getClientId(); + + DefaultLoanProduct product = DefaultLoanProduct.valueOf(loanProduct); + Long loanProductId = loanProductResolver.resolve(product); + + LoanTermFrequencyType termFrequencyType = LoanTermFrequencyType.valueOf(loanTermFrequencyType); + Integer loanTermFrequencyTypeValue = termFrequencyType.getValue(); + + RepaymentFrequencyType repaymentFrequencyType1 = RepaymentFrequencyType.valueOf(repaymentFrequencyType); + Integer repaymentFrequencyTypeValue = repaymentFrequencyType1.getValue(); + + InterestType interestType1 = InterestType.valueOf(interestType); + Integer interestTypeValue = interestType1.getValue(); + + InterestCalculationPeriodTime interestCalculationPeriod1 = InterestCalculationPeriodTime.valueOf(interestCalculationPeriod); + Integer interestCalculationPeriodValue = interestCalculationPeriod1.getValue(); + + AmortizationType amortizationType1 = AmortizationType.valueOf(amortizationType); + Integer amortizationTypeValue = amortizationType1.getValue(); + + TransactionProcessingStrategyCode processingStrategyCode = TransactionProcessingStrategyCode + .valueOf(transactionProcessingStrategyCode); + String transactionProcessingStrategyCodeValue = processingStrategyCode.getValue(); + + PostLoansRequest loansRequest = loanRequestFactory.defaultLoansRequest(clientId)// + .productId(loanProductId)// + .principal(new BigDecimal(principal))// + .interestRatePerPeriod(interestRate)// + .enableDownPayment(true)// + .interestType(interestTypeValue)// + .interestCalculationPeriodType(interestCalculationPeriodValue)// + .amortizationType(amortizationTypeValue)// + .loanTermFrequency(loanTermFrequency)// + .loanTermFrequencyType(loanTermFrequencyTypeValue)// + .numberOfRepayments(numberOfRepayments)// + .repaymentEvery(repaymentFrequency)// + .repaymentFrequencyType(repaymentFrequencyTypeValue)// + .submittedOnDate(submitDate)// + .expectedDisbursementDate(submitDate)// + .graceOnPrincipalPayment(graceOnPrincipalPayment)// + .graceOnInterestPayment(graceOnInterestPayment)// + .graceOnInterestPayment(graceOnInterestCharged).transactionProcessingStrategyCode(transactionProcessingStrategyCodeValue);// + + Response response = loansApi.calculateLoanScheduleOrSubmitLoanApplication(loansRequest, "").execute(); + testContext().set(TestContextKey.LOAN_CREATE_RESPONSE, response); + + ErrorResponse errorDetails = ErrorResponse.from(response); + Integer errorCode = errorDetails.getHttpStatusCode(); + String errorMessage = errorDetails.getSingleError().getDeveloperMessage(); + assertThat(errorCode).as(ErrorMessageHelper.dateFailureErrorCodeMsg()).isEqualTo(403); + assertThat(errorMessage).isEqualTo(ErrorMessageHelper.downpaymentDisabledOnProductErrorCodeMsg()); + + log.info("Error code: {}", errorCode); + log.info("Error message: {}}", errorMessage); + } + + @When("Admin creates a fully customized loan with auto downpayment {double}% and with the following data:") + public void createFullyCustomizedLoanWithAutoDownpayment15(double percentage, DataTable table) throws IOException { + List> data = table.asLists(); + List loanData = data.get(1); + String loanProduct = loanData.get(0); + String submitDate = loanData.get(1); + String principal = loanData.get(2); + BigDecimal interestRate = new BigDecimal(loanData.get(3)); + String interestType = loanData.get(4); + String interestCalculationPeriod = loanData.get(5); + String amortizationType = loanData.get(6); + Integer loanTermFrequency = Integer.valueOf(loanData.get(7)); + String loanTermFrequencyType = loanData.get(8); + Integer repaymentFrequency = Integer.valueOf(loanData.get(9)); + String repaymentFrequencyType = loanData.get(10); + Integer numberOfRepayments = Integer.valueOf(loanData.get(11)); + Integer graceOnPrincipalPayment = Integer.valueOf(loanData.get(12)); + Integer graceOnInterestPayment = Integer.valueOf(loanData.get(13)); + Integer graceOnInterestCharged = Integer.valueOf(loanData.get(14)); + String transactionProcessingStrategyCode = loanData.get(15); + + Response clientResponse = testContext().get(TestContextKey.CLIENT_CREATE_RESPONSE); + Long clientId = clientResponse.body().getClientId(); + + DefaultLoanProduct product = DefaultLoanProduct.valueOf(loanProduct); + Long loanProductId = loanProductResolver.resolve(product); + + LoanTermFrequencyType termFrequencyType = LoanTermFrequencyType.valueOf(loanTermFrequencyType); + Integer loanTermFrequencyTypeValue = termFrequencyType.getValue(); + + RepaymentFrequencyType repaymentFrequencyType1 = RepaymentFrequencyType.valueOf(repaymentFrequencyType); + Integer repaymentFrequencyTypeValue = repaymentFrequencyType1.getValue(); + + InterestType interestType1 = InterestType.valueOf(interestType); + Integer interestTypeValue = interestType1.getValue(); + + InterestCalculationPeriodTime interestCalculationPeriod1 = InterestCalculationPeriodTime.valueOf(interestCalculationPeriod); + Integer interestCalculationPeriodValue = interestCalculationPeriod1.getValue(); + + AmortizationType amortizationType1 = AmortizationType.valueOf(amortizationType); + Integer amortizationTypeValue = amortizationType1.getValue(); + + TransactionProcessingStrategyCode processingStrategyCode = TransactionProcessingStrategyCode + .valueOf(transactionProcessingStrategyCode); + String transactionProcessingStrategyCodeValue = processingStrategyCode.getValue(); + + PostLoansRequest loansRequest = loanRequestFactory.defaultLoansRequest(clientId)// + .productId(loanProductId)// + .principal(new BigDecimal(principal))// + .interestRatePerPeriod(interestRate)// + .enableAutoRepaymentForDownPayment(true)// + .disbursedAmountPercentageForDownPayment(new BigDecimal(percentage))// + .interestType(interestTypeValue)// + .interestCalculationPeriodType(interestCalculationPeriodValue)// + .amortizationType(amortizationTypeValue)// + .loanTermFrequency(loanTermFrequency)// + .loanTermFrequencyType(loanTermFrequencyTypeValue)// + .numberOfRepayments(numberOfRepayments)// + .repaymentEvery(repaymentFrequency)// + .repaymentFrequencyType(repaymentFrequencyTypeValue)// + .submittedOnDate(submitDate)// + .expectedDisbursementDate(submitDate)// + .graceOnPrincipalPayment(graceOnPrincipalPayment)// + .graceOnInterestPayment(graceOnInterestPayment)// + .graceOnInterestPayment(graceOnInterestCharged).transactionProcessingStrategyCode(transactionProcessingStrategyCodeValue);// + + Response response = loansApi.calculateLoanScheduleOrSubmitLoanApplication(loansRequest, "").execute(); + testContext().set(TestContextKey.LOAN_CREATE_RESPONSE, response); + + ErrorHelper.checkSuccessfulApiCall(response); + eventCheckHelper.createLoanEventCheck(response); + } + + @When("Admin creates a fully customized loan with downpayment {double}%, NO auto downpayment, and with the following data:") + public void createFullyCustomizedLoanWithDownpayment15(double percentage, DataTable table) throws IOException { + List> data = table.asLists(); + List loanData = data.get(1); + String loanProduct = loanData.get(0); + String submitDate = loanData.get(1); + String principal = loanData.get(2); + BigDecimal interestRate = new BigDecimal(loanData.get(3)); + String interestType = loanData.get(4); + String interestCalculationPeriod = loanData.get(5); + String amortizationType = loanData.get(6); + Integer loanTermFrequency = Integer.valueOf(loanData.get(7)); + String loanTermFrequencyType = loanData.get(8); + Integer repaymentFrequency = Integer.valueOf(loanData.get(9)); + String repaymentFrequencyType = loanData.get(10); + Integer numberOfRepayments = Integer.valueOf(loanData.get(11)); + Integer graceOnPrincipalPayment = Integer.valueOf(loanData.get(12)); + Integer graceOnInterestPayment = Integer.valueOf(loanData.get(13)); + Integer graceOnInterestCharged = Integer.valueOf(loanData.get(14)); + String transactionProcessingStrategyCode = loanData.get(15); + + Response clientResponse = testContext().get(TestContextKey.CLIENT_CREATE_RESPONSE); + Long clientId = clientResponse.body().getClientId(); + + DefaultLoanProduct product = DefaultLoanProduct.valueOf(loanProduct); + Long loanProductId = loanProductResolver.resolve(product); + + LoanTermFrequencyType termFrequencyType = LoanTermFrequencyType.valueOf(loanTermFrequencyType); + Integer loanTermFrequencyTypeValue = termFrequencyType.getValue(); + + RepaymentFrequencyType repaymentFrequencyType1 = RepaymentFrequencyType.valueOf(repaymentFrequencyType); + Integer repaymentFrequencyTypeValue = repaymentFrequencyType1.getValue(); + + InterestType interestType1 = InterestType.valueOf(interestType); + Integer interestTypeValue = interestType1.getValue(); + + InterestCalculationPeriodTime interestCalculationPeriod1 = InterestCalculationPeriodTime.valueOf(interestCalculationPeriod); + Integer interestCalculationPeriodValue = interestCalculationPeriod1.getValue(); + + AmortizationType amortizationType1 = AmortizationType.valueOf(amortizationType); + Integer amortizationTypeValue = amortizationType1.getValue(); + + TransactionProcessingStrategyCode processingStrategyCode = TransactionProcessingStrategyCode + .valueOf(transactionProcessingStrategyCode); + String transactionProcessingStrategyCodeValue = processingStrategyCode.getValue(); + + PostLoansRequest loansRequest = loanRequestFactory.defaultLoansRequest(clientId)// + .productId(loanProductId)// + .principal(new BigDecimal(principal))// + .interestRatePerPeriod(interestRate)// + .enableAutoRepaymentForDownPayment(false)// + .disbursedAmountPercentageForDownPayment(new BigDecimal(percentage))// + .interestType(interestTypeValue)// + .interestCalculationPeriodType(interestCalculationPeriodValue)// + .amortizationType(amortizationTypeValue)// + .loanTermFrequency(loanTermFrequency)// + .loanTermFrequencyType(loanTermFrequencyTypeValue)// + .numberOfRepayments(numberOfRepayments)// + .repaymentEvery(repaymentFrequency)// + .repaymentFrequencyType(repaymentFrequencyTypeValue)// + .submittedOnDate(submitDate)// + .expectedDisbursementDate(submitDate)// + .graceOnPrincipalPayment(graceOnPrincipalPayment)// + .graceOnInterestPayment(graceOnInterestPayment)// + .graceOnInterestPayment(graceOnInterestCharged).transactionProcessingStrategyCode(transactionProcessingStrategyCodeValue);// + + Response response = loansApi.calculateLoanScheduleOrSubmitLoanApplication(loansRequest, "").execute(); + testContext().set(TestContextKey.LOAN_CREATE_RESPONSE, response); + + ErrorHelper.checkSuccessfulApiCall(response); + eventCheckHelper.createLoanEventCheck(response); + } + @When("Admin creates a fully customized loan with fixed length {int} and with the following data:") public void createFullyCustomizedLoanFixedLength(int fixedLength, DataTable table) throws IOException { List> data = table.asLists(); diff --git a/fineract-e2e-tests-runner/src/test/resources/features/LoanChargeOff.feature b/fineract-e2e-tests-runner/src/test/resources/features/LoanChargeOff.feature index 0fa866774..09581c360 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/LoanChargeOff.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/LoanChargeOff.feature @@ -1,7 +1,7 @@ @ChargeOffFeature Feature: Charge-off - + @TestRailId:C2565 Scenario: As a user I want to do a Charge-off for non-fraud loan after disbursement When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -21,7 +21,7 @@ Feature: Charge-off | ASSET | 112601 | Loans Receivable | | 1000.0 | | EXPENSE | 744007 | Credit Loss/Bad Debt | 1000.0 | | - + @TestRailId:C2566 Scenario: As a user I want to do a Charge-off for non-fraud loan after repayment When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -47,7 +47,7 @@ Feature: Charge-off | ASSET | 112601 | Loans Receivable | | 750.0 | | EXPENSE | 744007 | Credit Loss/Bad Debt | 750.0 | | - + @TestRailId:C2567 Scenario: As a user I want to do a Repayment undo after Charge-off for non-fraud When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -77,7 +77,7 @@ Feature: Charge-off | ASSET | 112601 | Loans Receivable | | 1000.0 | | EXPENSE | 744007 | Credit Loss/Bad Debt | 1000.0 | | - + @TestRailId:C2568 Scenario: As a user I want to do Charge-off for fraud loan when FEE is added When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -100,7 +100,7 @@ Feature: Charge-off | EXPENSE | 744007 | Credit Loss/Bad Debt | 1000.0 | | | INCOME | 404008 | Fee Charge Off | 10.0 | | - + @TestRailId:C2569 Scenario: As a user I want to do a Merchant Refund after charge-off (fee portion) When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -129,7 +129,7 @@ Feature: Charge-off | INCOME | 404008 | Fee Charge Off | | 10.0 | | LIABILITY | 145023 | Suspense/Clearing account | 100.0 | | - + @TestRailId:C2570 Scenario: As a user I want to do a Charge-off for non-fraud loan when FEE and PENALTY added When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -153,7 +153,7 @@ Feature: Charge-off | EXPENSE | 744007 | Credit Loss/Bad Debt | 1000.0 | | | INCOME | 404008 | Fee Charge Off | 110.0 | | - @Skip @chargeoffOnLoanWithInterest + @Skip @TestRailId:C2571 @chargeoffOnLoanWithInterest Scenario: As a user I want to do Charge-off for non-fraud loan when FEE and PENALTY added (interest portion) When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -180,7 +180,7 @@ Feature: Charge-off | INCOME | 404001 | Interest Income Charge Off | 30.0 | | | INCOME | 404008 | Fee Charge Off | 113.0 | | - @Skip @chargeoffOnLoanWithInterest + @Skip @TestRailId:C2572 @chargeoffOnLoanWithInterest Scenario: As a user I want to do a Merchant Refund after charge-off for non fraud loan (interest portion) When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -215,7 +215,7 @@ Feature: Charge-off | LIABILITY | 145023 | Suspense/Clearing account | 500.0 | | - @Skip @chargeoffOnLoanWithInterest + @Skip @TestRailId:C2573 @chargeoffOnLoanWithInterest Scenario: As a user I want to do a Payout refund after charge-off for non fraud loan (interest portion) When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -249,7 +249,7 @@ Feature: Charge-off | INCOME | 404008 | Fee Charge Off | | 113.0 | | LIABILITY | 145023 | Suspense/Clearing account | 500.0 | | - @Skip @chargeoffOnLoanWithInterest + @Skip @TestRailId:C2574 @chargeoffOnLoanWithInterest Scenario: As a user I want to do a Repayment after Charge-off for fraud loan when FEE and PENALTY added (product with interest) When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -282,7 +282,7 @@ Feature: Charge-off | LIABILITY | 145023 | Suspense/Clearing account | 500.0 | | - + @TestRailId:C2575 Scenario: As a user I want to do a Charge-off for fraud loan after disbursement When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -303,7 +303,7 @@ Feature: Charge-off | ASSET | 112601 | Loans Receivable | | 1000.0 | | EXPENSE | 744037 | Credit Loss/Bad Debt-Fraud | 1000.0 | | - + @TestRailId:C2576 Scenario: As a user I want to do a Repayment undo after Charge-off for fraud loan When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -334,7 +334,7 @@ Feature: Charge-off | ASSET | 112601 | Loans Receivable | | 1000.0 | | EXPENSE | 744037 | Credit Loss/Bad Debt-Fraud | 1000.0 | | - + @TestRailId:C2577 Scenario: As a user I want to do a Charge-off for fraud loan when FEE is added When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -358,7 +358,7 @@ Feature: Charge-off | EXPENSE | 744037 | Credit Loss/Bad Debt-Fraud | 1000.0 | | | INCOME | 404008 | Fee Charge Off | 10.0 | | - + @TestRailId:C2578 Scenario: As a user I want to do a Charge-off for fraud loan when FEE and PENALTY added When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -383,7 +383,7 @@ Feature: Charge-off | EXPENSE | 744037 | Credit Loss/Bad Debt-Fraud | 1000.0 | | | INCOME | 404008 | Fee Charge Off | 110.0 | | - @Skip @chargeoffOnLoanWithInterest + @Skip @TestRailId:C2579 @chargeoffOnLoanWithInterest Scenario: As a user I want to do a Charge-off for fraud loan when FEE and PENALTY added (interest portion) When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -411,7 +411,7 @@ Feature: Charge-off | INCOME | 404001 | Interest Income Charge Off | 30.0 | | | INCOME | 404008 | Fee Charge Off | 113.0 | | - @Skip @chargeoffOnLoanWithInterest + @Skip @TestRailId:C2580 @chargeoffOnLoanWithInterest Scenario: As a user I want to do a Merchant issue refund for fraud loan when FEE and PENALTY added (interest portion) When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -446,7 +446,7 @@ Feature: Charge-off | INCOME | 404008 | Fee Charge Off | | 113.0 | | LIABILITY | 145023 | Suspense/Clearing account | 500.0 | | - @Skip @chargeoffOnLoanWithInterest + @Skip @TestRailId:C2581 @chargeoffOnLoanWithInterest Scenario: As a user I want to do Payout refund for fraud loan when FEE and PENALTY added (interest portion) When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -482,7 +482,7 @@ Feature: Charge-off | LIABILITY | 145023 | Suspense/Clearing account | 500.0 | | - @Skip @chargeoffOnLoanWithInterest + @Skip @TestRailId:C2582 @chargeoffOnLoanWithInterest Scenario: As a user I want to do a Repayment after Charge-off for fraud loan when FEE and PENALTY added When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -516,7 +516,7 @@ Feature: Charge-off | LIABILITY | 145023 | Suspense/Clearing account | 500.0 | | - @Skip @chargeoffOnLoanWithInterest + @Skip @TestRailId:C2591 @chargeoffOnLoanWithInterest Scenario: As a user I want to repay a loan which was charged-off When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -575,7 +575,7 @@ Feature: Charge-off | INCOME | 744008 | Recoveries | | 643.0 | | LIABILITY | 145023 | Suspense/Clearing account | 643.0 | | - @Skip @chargeoffOnLoanWithInterest + @Skip @TestRailId:C2592 @chargeoffOnLoanWithInterest Scenario: As a user I want to do a charge-off undo before any other transactions on the loan When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -635,7 +635,7 @@ Feature: Charge-off | ASSET | 112603 | Interest/Fee Receivable | | 20.0 | | LIABILITY | 145023 | Suspense/Clearing account | 200.0 | | - + @TestRailId:C2593 Scenario: As a user I want to do a Charge-off before the last repayment When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -662,7 +662,7 @@ Feature: Charge-off | ASSET | 112601 | Loans Receivable | | 200.0 | | LIABILITY | 145023 | Suspense/Clearing account | 200.0 | | - + @TestRailId:C2594 Scenario: As a user I want to do a Charge-off between 2 repayments When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -691,7 +691,7 @@ Feature: Charge-off | ASSET | 112601 | Loans Receivable | | 200.0 | | LIABILITY | 145023 | Suspense/Clearing account | 200.0 | | - + @TestRailId:C2595 Scenario: As a user I want to do a backdated Charge-off when only disbursement transaction happened When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -716,7 +716,7 @@ Feature: Charge-off | ASSET | 112601 | Loans Receivable | | 1000.0 | | EXPENSE | 744007 | Credit Loss/Bad Debt | 1000.0 | | - + @TestRailId:C2596 Scenario: As a user I want to do an undo on a transaction which was created before the Charge-off When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -737,7 +737,7 @@ Feature: Charge-off | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 1000 | 0 | 0 | 0 | 1000 | 0 | 0 | 0 | 1000 | - + @TestRailId:C2597 Scenario: As a user I want to do an undo on a transaction which was created on the Charge-off day When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -757,7 +757,7 @@ Feature: Charge-off | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 1000 | 0 | 0 | 0 | 1000 | 0 | 0 | 0 | 1000 | - + @TestRailId:C2598 Scenario: As a user I want to do a second Charge-off When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -783,7 +783,7 @@ Feature: Charge-off | ASSET | 112601 | Loans Receivable | | 1000.0 | | EXPENSE | 744007 | Credit Loss/Bad Debt | 1000.0 | | - + @TestRailId:C2599 Scenario: As a user I want to do a second Charge-off undo When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -806,7 +806,7 @@ Feature: Charge-off | ASSET | 112601 | Loans Receivable | 1000.0 | | | LIABILITY | 145023 | Suspense/Clearing account | | 1000.0 | - + @TestRailId:C2600 Scenario: As a user I want to add charge after Charge-off When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -832,10 +832,7 @@ Feature: Charge-off | ASSET | 112601 | Loans Receivable | | 1000.0 | | EXPENSE | 744007 | Credit Loss/Bad Debt | 1000.0 | | - # TODO: Add reschedule related tests for "Reschedule" and "Close as Reschedule" actions if the reschedule API fixed - - - + @TestRailId:C2706 Scenario: Verify that Charge-off NOT results an error anymore when to be applied on a loan with an interest When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -862,7 +859,7 @@ Feature: Charge-off | 01 January 2023 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | | 22 February 2023 | Charge-off | 1143.0 | 1000.0 | 30.0 | 103.0 | 10.0 | 0.0 | - + @TestRailId:C2761 Scenario: Verify that charge-off is reversed/replayed if Scheduled repayment which was placed on a date before the charge-off is reversed after the charge-off When Admin sets the business date to "01 January 2023" And Admin creates a client with random data @@ -903,7 +900,7 @@ Feature: Charge-off | 01 June 2023 | Charge-off | 1020.0 | 1000.0 | 0.0 | 20.0 | 0.0 | 0.0 | Then On Loan Transactions tab the "Repayment" Transaction with date "01 March 2023" is reverted - + @TestRailId:C2762 Scenario: Verify that charge-off is reversed/replayed if Real time repayment which was placed on a date before the charge-off is reversed after the charge-off When Admin sets the business date to "01 January 2023" And Admin creates a client with random data @@ -929,8 +926,8 @@ Feature: Charge-off Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | | 01 January 2023 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | - | 10 February 2023 | Repayment | 1020.0 | 1000.0 | 0.0 | 20.0 | 0.0 | 0.0 | | 10 February 2023 | Accrual | 20.0 | 0.0 | 0.0 | 20.0 | 0.0 | 0.0 | + | 10 February 2023 | Repayment | 1020.0 | 1000.0 | 0.0 | 20.0 | 0.0 | 0.0 | | 01 June 2023 | Charge-off | 15.0 | 0.0 | 0.0 | 0.0 | 15.0 | 0.0 | When Admin sets the business date to "10 June 2023" When Customer undo "1"th "Repayment" transaction made on "10 February 2023" @@ -945,12 +942,12 @@ Feature: Charge-off Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | | 01 January 2023 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | - | 10 February 2023 | Repayment | 1020.0 | 1000.0 | 0.0 | 20.0 | 0.0 | 0.0 | | 10 February 2023 | Accrual | 20.0 | 0.0 | 0.0 | 20.0 | 0.0 | 0.0 | + | 10 February 2023 | Repayment | 1020.0 | 1000.0 | 0.0 | 20.0 | 0.0 | 0.0 | | 01 June 2023 | Charge-off | 1035.0 | 1000.0 | 0.0 | 20.0 | 15.0 | 0.0 | Then On Loan Transactions tab the "Repayment" Transaction with date "10 February 2023" is reverted - + @TestRailId:C2763 Scenario: Verify that charge-off is reversed/replayed if Autopay repayment which was placed on a date before the charge-off is reversed after the charge-off When Admin sets the business date to "01 January 2023" And Admin creates a client with random data @@ -976,8 +973,8 @@ Feature: Charge-off Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | | 01 January 2023 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | - | 10 February 2023 | Repayment | 1020.0 | 1000.0 | 0.0 | 20.0 | 0.0 | 0.0 | | 10 February 2023 | Accrual | 20.0 | 0.0 | 0.0 | 20.0 | 0.0 | 0.0 | + | 10 February 2023 | Repayment | 1020.0 | 1000.0 | 0.0 | 20.0 | 0.0 | 0.0 | | 01 June 2023 | Charge-off | 15.0 | 0.0 | 0.0 | 0.0 | 15.0 | 0.0 | When Admin sets the business date to "10 June 2023" When Customer undo "1"th "Repayment" transaction made on "10 February 2023" @@ -992,12 +989,12 @@ Feature: Charge-off Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | | 01 January 2023 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | - | 10 February 2023 | Repayment | 1020.0 | 1000.0 | 0.0 | 20.0 | 0.0 | 0.0 | | 10 February 2023 | Accrual | 20.0 | 0.0 | 0.0 | 20.0 | 0.0 | 0.0 | + | 10 February 2023 | Repayment | 1020.0 | 1000.0 | 0.0 | 20.0 | 0.0 | 0.0 | | 01 June 2023 | Charge-off | 1035.0 | 1000.0 | 0.0 | 20.0 | 15.0 | 0.0 | Then On Loan Transactions tab the "Repayment" Transaction with date "10 February 2023" is reverted - + @TestRailId:C2764 Scenario: Verify that charge-off is NOT reversed/replayed if OCA repayment which was placed and reversed on a date after the charge-off When Admin sets the business date to "01 January 2023" And Admin creates a client with random data @@ -1036,7 +1033,7 @@ Feature: Charge-off | 10 June 2023 | Repayment | 1000.0 | 980.0 | 0.0 | 20.0 | 0.0 | 20.0 | Then On Loan Transactions tab the "Repayment" Transaction with date "10 June 2023" is reverted - + @TestRailId:C2765 Scenario: Verify that charge-off is reversed/replayed if Goodwill credit transaction is placed on a date before the charge-off on business date after the charge-off When Admin sets the business date to "01 January 2023" And Admin creates a client with random data @@ -1062,7 +1059,7 @@ Feature: Charge-off | 29 January 2023 | Goodwill Credit | 500.0 | 480.0 | 0.0 | 20.0 | 0.0 | 520.0 | | 01 June 2023 | Charge-off | 520.0 | 520.0 | 0.0 | 0.0 | 0.0 | 0.0 | - + @TestRailId:C2766 Scenario: As a user I want to do a undo Charge-off with reversal external Id When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -1085,7 +1082,7 @@ Feature: Charge-off And Admin does a charge-off undo the loan with reversal external Id Then Loan Charge-off undo event has reversed on date "23 February 2023" for charge-off undo - + @TestRailId:C2767 Scenario: Verify that charge-off is reversed/replayed in case of partial payment, charge-off, second part of payment, reverse 1st payment When Admin sets the business date to "01 January 2023" And Admin creates a client with random data @@ -1146,7 +1143,7 @@ Feature: Charge-off | INCOME | 744008 | Recoveries | | 500.0 | | LIABILITY | 145023 | Suspense/Clearing account | 500.0 | | - + @TestRailId:C2768 Scenario: Verify that charge-off is results an error in case of partial payment, charge-off, fee added after charge-off When Admin sets the business date to "01 January 2023" And Admin creates a client with random data @@ -1174,7 +1171,7 @@ Feature: Charge-off | Charge type | dueDate | amount | | LOAN_SNOOZE_FEE | 10 June 2023 | 20 | - + @TestRailId:C2779 Scenario: Verify that on interest bearing loans the accrual of interest is stopped when the loan is charged-off When Admin sets the business date to "01 January 2023" And Admin creates a client with random data @@ -1219,7 +1216,7 @@ Feature: Charge-off | 03 January 2023 | Accrual | 0.33 | 0.0 | 0.33 | 0.0 | 0.0 | 0.0 | | 05 January 2023 | Charge-off | 1010.19 | 1000.0 | 10.19 | 0.0 | 0.0 | 0.0 | - + @TestRailId:C2780 Scenario: Verify that on interest bearing loans the accrual of interest is resumed and aggregated when the charge-off is reverted When Admin sets the business date to "01 January 2023" And Admin creates a client with random data @@ -1270,7 +1267,7 @@ Feature: Charge-off | 06 January 2023 | Accrual | 1.31 | 0.0 | 1.31 | 0.0 | 0.0 | 0.0 | Then On Loan Transactions tab the "Charge-off" Transaction with date "04 January 2023" is reverted - + @TestRailId:C2781 Scenario: Verify that on interest bearing loans the accrual of interest is stopped when the loan is charged-off even if fully paid after the charge-off When Admin sets the business date to "01 January 2023" And Admin creates a client with random data @@ -1318,7 +1315,7 @@ Feature: Charge-off | 04 January 2023 | Charge-off | 1010.19 | 1000.0 | 10.19 | 0.0 | 0.0 | 0.0 | | 06 January 2023 | Repayment | 1010.19 | 1000.0 | 10.19 | 0.0 | 0.0 | 0.0 | - + @TestRailId:C2782 Scenario: Verify that the accrual of charges is not happened when the loan is charged-off on charge's due date but resumed when the charge-off is reverted When Admin sets the business date to "01 January 2023" And Admin creates a client with random data @@ -1380,7 +1377,7 @@ Feature: Charge-off | 06 January 2023 | Accrual | 15.0 | 0.0 | 0.0 | 15.0 | 0.0 | 0.0 | Then On Loan Transactions tab the "Charge-off" Transaction with date "04 January 2023" is reverted - @AdvancedPaymentAllocation + @TestRailId:C2891 @AdvancedPaymentAllocation Scenario: Verify that the user is able to do a Charge-off for fraud loan when FEE and PENALTY added - LP2_DOWNPAYMENT_AUTO_ADVANCED_PAYMENT_ALLOCATION product When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -1407,7 +1404,7 @@ Feature: Charge-off | EXPENSE | 744037 | Credit Loss/Bad Debt-Fraud | 750.0 | | | INCOME | 404008 | Fee Charge Off | 110.0 | | - @AdvancedPaymentAllocation + @TestRailId:C2892 @AdvancedPaymentAllocation Scenario: Verify that the user is able to do a Charge-off for non-fraud loan after disbursement - LP2_DOWNPAYMENT_AUTO_ADVANCED_PAYMENT_ALLOCATION product When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -1429,7 +1426,7 @@ Feature: Charge-off | ASSET | 112601 | Loans Receivable | | 750.0 | | EXPENSE | 744007 | Credit Loss/Bad Debt | 750.0 | | - @AdvancedPaymentAllocation + @TestRailId:C2893 @AdvancedPaymentAllocation Scenario: Verify that the user is able to do a Charge-off for non-fraud loan after repayment - LP2_DOWNPAYMENT_AUTO_ADVANCED_PAYMENT_ALLOCATION product When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -1457,7 +1454,7 @@ Feature: Charge-off | ASSET | 112601 | Loans Receivable | | 500.0 | | EXPENSE | 744007 | Credit Loss/Bad Debt | 500.0 | | - @AdvancedPaymentAllocation + @TestRailId:C2894 @AdvancedPaymentAllocation Scenario: Verify that the user is able to do a Repayment undo after Charge-off for non-fraud - LP2_DOWNPAYMENT_AUTO_ADVANCED_PAYMENT_ALLOCATION product When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -1489,7 +1486,7 @@ Feature: Charge-off | ASSET | 112601 | Loans Receivable | | 750.0 | | EXPENSE | 744007 | Credit Loss/Bad Debt | 750.0 | | - @AdvancedPaymentAllocation + @TestRailId:C2895 @AdvancedPaymentAllocation Scenario: Verify that the user is able to do a backdated Charge-off when only disbursement transaction happened - LP2_DOWNPAYMENT_AUTO_ADVANCED_PAYMENT_ALLOCATION product When Admin sets the business date to "1 January 2023" And Admin creates a client with random data @@ -1516,7 +1513,7 @@ Feature: Charge-off | 01 January 2023 | Down Payment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 750.0 | | 10 February 2023 | Charge-off | 750.0 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | - @AdvancedPaymentAllocation + @TestRailId:C2896 @AdvancedPaymentAllocation Scenario: Verify that charge-off is reversed/replayed if Goodwill credit transaction is placed on a date before the charge-off on business date after the charge-off - - LP2_DOWNPAYMENT_AUTO_ADVANCED_PAYMENT_ALLOCATION product When Admin sets the business date to "01 January 2023" And Admin creates a client with random data @@ -1548,7 +1545,7 @@ Feature: Charge-off | 29 January 2023 | Goodwill Credit | 500.0 | 500.0 | 0.0 | 0.0 | 0.0 | 250.0 | | 01 June 2023 | Charge-off | 270.0 | 250.0 | 0.0 | 20.0 | 0.0 | 0.0 | - @AdvancedPaymentAllocation + @TestRailId:C3067 @AdvancedPaymentAllocation Scenario: Verify charge-off GL entries in case of reverse-replay on fraud loan When Admin sets the business date to "01 February 2024" When Admin creates a client with random data diff --git a/fineract-e2e-tests-runner/src/test/resources/features/LoanChargeback.feature b/fineract-e2e-tests-runner/src/test/resources/features/LoanChargeback.feature index 45a14d91b..fadecc7c7 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/LoanChargeback.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/LoanChargeback.feature @@ -1,7 +1,7 @@ @LoanChargeback Feature: LoanChargeback - + @TestRailId:C2441 Scenario: As an admin I would like to check chargeback function is working properly on a closed loan in case of payment type: REPAYMENT_ADJUSTMENT_CHARGEBACK When Admin sets the business date to "1 January 2022" When Admin creates a client with random data @@ -17,7 +17,7 @@ Feature: LoanChargeback Then Loan has 250 outstanding amount Then Loan status will be "ACTIVE" - + @TestRailId:C2442 Scenario: As an admin I would like to check chargeback function is working properly on a closed loan in case of payment type: REPAYMENT_ADJUSTMENT_REFUND When Admin sets the business date to "1 January 2022" When Admin creates a client with random data @@ -33,7 +33,7 @@ Feature: LoanChargeback Then Loan has 250 outstanding amount Then Loan status will be "ACTIVE" - + @TestRailId:C2443 Scenario: As an admin I would like to check chargeback function is working properly when chargeback comes after the loan was fully repaid and closed When Admin sets the business date to "1 January 2022" When Admin creates a client with random data @@ -53,7 +53,7 @@ Feature: LoanChargeback Then Loan has 250 outstanding amount Then Loan status will be "ACTIVE" - + @TestRailId:C2444 Scenario: As an admin I would like to check chargeback function is working properly when repayment happens again after chargeback When Admin sets the business date to "1 January 2022" When Admin creates a client with random data @@ -74,7 +74,7 @@ Feature: LoanChargeback Then Loan has 0 outstanding amount Then Loan status will be "CLOSED_OBLIGATIONS_MET" - + @TestRailId:C2445 Scenario: As an admin I would like to check chargeback function is working properly when a second chargeback happens after the repayment When Admin sets the business date to "1 January 2022" When Admin creates a client with random data @@ -99,7 +99,7 @@ Feature: LoanChargeback Then Loan has 200 outstanding amount Then Loan status will be "ACTIVE" - + @TestRailId:C2446 Scenario: As an admin I would like to check chargeback function is working properly when chargeback happens after NSF fee was added to the loan then was repaid When Admin sets the business date to "1 January 2022" When Admin creates a client with random data @@ -129,7 +129,7 @@ Feature: LoanChargeback Then Loan has 250 outstanding amount Then Loan status will be "ACTIVE" - + @TestRailId:C2447 Scenario: As an admin I would like to check that the loan goes to ACTIVE when the loan is OVERPAID but the chargeback amount is HIGHER than the overpaid amount When Admin sets the business date to "1 January 2022" When Admin creates a client with random data @@ -145,7 +145,7 @@ Feature: LoanChargeback Then Loan status will be "ACTIVE" Then Loan has 50 outstanding amount - + @TestRailId:C2448 Scenario: As an admin I would like to check that the loan remains OVERPAID when the loan is OVERPAID but the chargeback amount is LOWER than the overpaid amount When Admin sets the business date to "1 January 2022" When Admin creates a client with random data @@ -161,7 +161,7 @@ Feature: LoanChargeback Then Loan status will be "OVERPAID" Then Loan has 0 outstanding amount - + @TestRailId:C2449 Scenario: As an admin I would like to check that the loan goes to CLOSED when the loan is OVERPAID but the chargeback amount is EQUALS than the overpaid amount When Admin sets the business date to "1 January 2022" When Admin creates a client with random data @@ -177,26 +177,29 @@ Feature: LoanChargeback Then Loan status will be "CLOSED_OBLIGATIONS_MET" Then Loan has 0 outstanding amount - + @TestRailId:C2458 Scenario: As an admin I would like to check that delinquency and overdue treatment of chargeback works properly When Admin sets the business date to "1 January 2022" When Admin creates a client with random data And Admin successfully creates a new customised Loan submitted on date: "1 January 2022", with Principal: "3000", a loanTermFrequency: 3 months, and numberOfRepayments: 3 And Admin successfully approves the loan on "1 January 2022" with "3000" amount and expected disbursement date on "1 January 2022" When Admin successfully disburse the loan on "1 January 2022" with "3000" EUR transaction amount + When Admin runs inline COB job for Loan When Admin sets the business date to "01 February 2022" And Customer makes "AUTOPAY" repayment on "01 February 2022" with 1000 EUR transaction amount + When Admin runs inline COB job for Loan When Admin sets the business date to "01 March 2022" And Customer makes "AUTOPAY" repayment on "01 March 2022" with 1000 EUR transaction amount + When Admin runs inline COB job for Loan When Admin sets the business date to "15 March 2022" When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 1000 EUR transaction amount + When Admin runs inline COB job for Loan When Admin sets the business date to "07 April 2022" - And Admin runs the Loan Delinquency Classification job + When Admin runs inline COB job for Loan Then Admin checks that delinquency range is: "RANGE_3" and has delinquentDate "2022-03-18" -# //Then Loan has 2000 total overdue amount -# //TODO overdue amount will not work until New Transactions not updating the overdue calculation and loan status issue is solved - + Then Loan has 2000 total overdue amount + @TestRailId:C2459 Scenario: As an admin I would like to check that delinquency and overdue treatment of chargeback works properly when all the chargeback transactions are fully paid When Admin sets the business date to "1 January 2022" When Admin creates a client with random data @@ -216,7 +219,7 @@ Feature: LoanChargeback Then Admin checks that delinquency range is: "RANGE_1" and has delinquentDate "2022-04-04" Then Loan has 1000 total overdue amount - + @TestRailId:C2460 Scenario: As an admin I would like to check that delinquency and overdue treatment of chargeback works properly when all the instalments are fully paid When Admin sets the business date to "1 January 2022" When Admin creates a client with random data @@ -239,7 +242,7 @@ Feature: LoanChargeback Then Admin checks that delinquency range is: "NO_DELINQUENCY" and has delinquentDate "" Then Loan has 0 total overdue amount - + @TestRailId:C2486 Scenario: As an admin I would like to check that Goodwill credit, Payout refund, Merchant Issued refund works properly with chargeback for a fully paid loan When Admin sets the business date to "1 January 2022" When Admin creates a client with random data @@ -269,7 +272,7 @@ Feature: LoanChargeback Then Loan has 0 outstanding amount Then Loan has 300 overpaid amount - + @TestRailId:C2543 Scenario: When charge backs comes in after the loan is closed, before the maturity date When Admin sets the business date to "1 January 2023" When Admin creates a client with random data @@ -315,7 +318,7 @@ Feature: LoanChargeback | LIABILITY | 145023 | Suspense/Clearing account | | 250.0 | - + @TestRailId:C2544 Scenario: When repayment happens again on the charge backs When Admin sets the business date to "1 January 2023" When Admin creates a client with random data @@ -367,7 +370,7 @@ Feature: LoanChargeback | ASSET | 112601 | Loans Receivable | | 250.0 | | LIABILITY | 145023 | Suspense/Clearing account | 250.0 | | - + @TestRailId:C2545 Scenario: When repayment 1 is reversed When Admin sets the business date to "1 January 2023" When Admin creates a client with random data @@ -422,7 +425,7 @@ Feature: LoanChargeback | ASSET | 112601 | Loans Receivable | | 250.0 | | LIABILITY | 145023 | Suspense/Clearing account | 250.0 | | - + @TestRailId:C2546 Scenario: When 2 repayments are reversed (repayment 1 & 3) When Admin sets the business date to "1 January 2023" When Admin creates a client with random data @@ -480,29 +483,33 @@ Feature: LoanChargeback | ASSET | 112601 | Loans Receivable | | 250.0 | | LIABILITY | 145023 | Suspense/Clearing account | 250.0 | | - # TODO check the periodic accrual creation + modify - @Skip + @TestRailId:C2547 Scenario: When chargeback happens after the charge addition on maturity date for repayment 01-03-2022 When Admin sets the business date to "1 January 2023" When Admin creates a client with random data When Admin successfully creates a new customised Loan submitted on date: "1 January 2023", with Principal: "750", a loanTermFrequency: 3 months, and numberOfRepayments: 3 And Admin successfully approves the loan on "1 January 2023" with "750" amount and expected disbursement date on "1 January 2023" When Admin successfully disburse the loan on "1 January 2023" with "750" EUR transaction amount + When Admin runs inline COB job for Loan When Admin sets the business date to "1 February 2023" And Customer makes "AUTOPAY" repayment on "1 February 2023" with 250 EUR transaction amount + When Admin runs inline COB job for Loan When Admin sets the business date to "1 March 2023" And Customer makes "AUTOPAY" repayment on "1 March 2023" with 250 EUR transaction amount + When Admin runs inline COB job for Loan When Admin sets the business date to "30 March 2023" And Customer makes "AUTOPAY" repayment on "30 March 2023" with 250 EUR transaction amount When Customer undo "3"th repayment on "30 March 2023" When Admin adds "LOAN_SNOOZE_FEE" due date charge with "30 March 2023" due date and 20 EUR transaction amount + When Admin runs inline COB job for Loan Then Loan has 270 outstanding amount When Admin sets the business date to "31 March 2023" - And Admin runs COB job + When Admin runs inline COB job for Loan When Admin sets the business date to "01 April 2023" And Customer makes "AUTOPAY" repayment on "01 April 2023" with 270 EUR transaction amount Then Loan has 0 outstanding amount And Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 250 EUR transaction amount for Payment nr. 2 + When Admin runs inline COB job for Loan Then Loan has 250 outstanding 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 | @@ -545,8 +552,7 @@ Feature: LoanChargeback | ASSET | 112601 | Loans Receivable | 250.0 | | | LIABILITY | 145023 | Suspense/Clearing account | | 250.0 | - - + @TestRailId:C2548 Scenario: When chargeback comes in after the loan overpayment-1 When Admin sets the business date to "1 January 2023" When Admin creates a client with random data @@ -594,7 +600,7 @@ Feature: LoanChargeback | LIABILITY | l1 | Overpayment account | 250.0 | | | LIABILITY | 145023 | Suspense/Clearing account | | 250.0 | - + @TestRailId:C2549 Scenario: When chargeback comes in after the loan overpayment-2 When Admin sets the business date to "1 January 2023" When Admin creates a client with random data @@ -642,7 +648,7 @@ Feature: LoanChargeback | LIABILITY | l1 | Overpayment account | 150.0 | | | LIABILITY | 145023 | Suspense/Clearing account | | 150.0 | - + @TestRailId:C2550 Scenario: When chargeback comes in after the loan overpayment-3 When Admin sets the business date to "1 January 2023" When Admin creates a client with random data @@ -691,7 +697,7 @@ Feature: LoanChargeback | LIABILITY | 145023 | Suspense/Clearing account | | 350.0 | | LIABILITY | l1 | Overpayment account | 250.0 | | - + @TestRailId:C2551 Scenario: When chargeback comes in after the loan overpayment-4 with reverse and replay When Admin sets the business date to "1 January 2023" When Admin creates a client with random data @@ -744,7 +750,7 @@ Feature: LoanChargeback | LIABILITY | 145023 | Suspense/Clearing account | | 350.0 | | LIABILITY | l1 | Overpayment account | 100.0 | | - + @TestRailId:C2608 Scenario: When charge backs comes in after the loan is closed for the repayment 01-03-2022 (after maturity) When Admin sets the business date to "1 January 2023" When Admin creates a client with random data @@ -791,7 +797,7 @@ Feature: LoanChargeback | ASSET | 112601 | Loans Receivable | 250.0 | | | LIABILITY | 145023 | Suspense/Clearing account | | 250.0 | - + @TestRailId:C2609 Scenario: When repayment happens again on the charge backs (after maturity) When Admin sets the business date to "1 January 2023" When Admin creates a client with random data @@ -844,7 +850,7 @@ Feature: LoanChargeback | ASSET | 112601 | Loans Receivable | | 250.0 | | LIABILITY | 145023 | Suspense/Clearing account | 250.0 | | - + @TestRailId:C2610 Scenario: When repayment 1 is reversed (after maturity) When Admin sets the business date to "1 January 2023" When Admin creates a client with random data @@ -900,7 +906,7 @@ Feature: LoanChargeback | ASSET | 112601 | Loans Receivable | | 250.0 | | LIABILITY | 145023 | Suspense/Clearing account | 250.0 | | - + @TestRailId:C2611 Scenario: When 2 repayments are reversed (repayment 1 & 3) (after maturity) When Admin sets the business date to "1 January 2023" When Admin creates a client with random data @@ -959,7 +965,7 @@ Feature: LoanChargeback | ASSET | 112601 | Loans Receivable | | 250.0 | | LIABILITY | 145023 | Suspense/Clearing account | 250.0 | | - + @TestRailId:C2623 Scenario: When second charge back happens for the repayment 01-04-2022 (after maturity) When Admin sets the business date to "1 January 2023" When Admin creates a client with random data @@ -1018,7 +1024,7 @@ Feature: LoanChargeback | ASSET | 112601 | Loans Receivable | 200.0 | | | LIABILITY | 145023 | Suspense/Clearing account | | 200.0 | - + @TestRailId:C2612 Scenario: When chargeback happens after the charge addition on maturity date for repayment 01-03-2022 (after maturity) When Admin sets the business date to "1 January 2023" When Admin creates a client with random data @@ -1084,7 +1090,7 @@ Feature: LoanChargeback | ASSET | 112601 | Loans Receivable | 250.0 | | | LIABILITY | 145023 | Suspense/Clearing account | | 250.0 | - + @TestRailId:C2613 Scenario: When chargeback comes in after the loan overpayment-1 (after maturity) When Admin sets the business date to "1 January 2023" When Admin creates a client with random data @@ -1132,7 +1138,7 @@ Feature: LoanChargeback | LIABILITY | l1 | Overpayment account | 250.0 | | | LIABILITY | 145023 | Suspense/Clearing account | | 250.0 | - + @TestRailId:C2614 Scenario: When chargeback comes in after the loan overpayment-2 (after maturity) When Admin sets the business date to "1 January 2023" When Admin creates a client with random data @@ -1180,7 +1186,7 @@ Feature: LoanChargeback | LIABILITY | l1 | Overpayment account | 150.0 | | | LIABILITY | 145023 | Suspense/Clearing account | | 150.0 | - + @TestRailId:C2615 Scenario: When chargeback comes in after the loan overpayment-3 (after maturity) When Admin sets the business date to "1 January 2023" When Admin creates a client with random data @@ -1230,7 +1236,7 @@ Feature: LoanChargeback | LIABILITY | 145023 | Suspense/Clearing account | | 350.0 | | LIABILITY | l1 | Overpayment account | 250.0 | | - + @TestRailId:C2616 Scenario: When chargeback comes in after the loan overpayment-4 with reverse and replay (after maturity) When Admin sets the business date to "1 January 2023" When Admin creates a client with random data @@ -1284,7 +1290,7 @@ Feature: LoanChargeback | LIABILITY | 145023 | Suspense/Clearing account | | 350.0 | | LIABILITY | l1 | Overpayment account | 100.0 | | - + @TestRailId:C2624 Scenario: As an admin I would like to verify principal portion for partial chargeback for OVERPAID loan When Admin sets the business date to "01 January 2023" When Admin creates a client with random data @@ -1315,7 +1321,7 @@ Feature: LoanChargeback Then Loan status will be "ACTIVE" Then Loan has 500 outstanding amount - @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + @TestRailId:C2870 @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation on a closed loan in case of payment type: REPAYMENT_ADJUSTMENT_CHARGEBACK When Admin sets the business date to "01 September 2023" When Admin creates a client with random data @@ -1357,7 +1363,7 @@ Feature: LoanChargeback | 16 October 2023 | Repayment | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | | 25 October 2023 | Chargeback | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | - @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + @TestRailId:C2871 @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation on a closed loan in case of payment type: REPAYMENT_ADJUSTMENT_REFUND When Admin sets the business date to "01 September 2023" When Admin creates a client with random data @@ -1399,7 +1405,7 @@ Feature: LoanChargeback | 16 October 2023 | Repayment | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | | 25 October 2023 | Chargeback | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | - @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + @TestRailId:C2872 @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation when full repayment happens after chargeback, on the same business date When Admin sets the business date to "01 September 2023" When Admin creates a client with random data @@ -1443,7 +1449,7 @@ Feature: LoanChargeback | 25 October 2023 | Chargeback | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | | 25 October 2023 | Repayment | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | - @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + @TestRailId:C2873 @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation when partial repayment happens after chargeback, on the same business date When Admin sets the business date to "01 September 2023" When Admin creates a client with random data @@ -1487,7 +1493,7 @@ Feature: LoanChargeback | 25 October 2023 | Chargeback | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | | 25 October 2023 | Repayment | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 50.0 | - @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + @TestRailId:C2874 @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation when full repayment happens after chargeback, on a future business date When Admin sets the business date to "01 September 2023" When Admin creates a client with random data @@ -1532,7 +1538,7 @@ Feature: LoanChargeback | 25 October 2023 | Chargeback | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | | 30 October 2023 | Repayment | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | - @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + @TestRailId:C2875 @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation when partial repayment happens after chargeback, on a future business date When Admin sets the business date to "01 September 2023" When Admin creates a client with random data @@ -1577,7 +1583,7 @@ Feature: LoanChargeback | 25 October 2023 | Chargeback | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | | 30 October 2023 | Repayment | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 50.0 | - @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + @TestRailId:C2876 @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation when a second chargeback happens after the repayment When Admin sets the business date to "01 September 2023" When Admin creates a client with random data @@ -1625,7 +1631,7 @@ Feature: LoanChargeback | 30 October 2023 | Repayment | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | | 01 November 2023 | Chargeback | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | - @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + @TestRailId:C2877 @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation -loan goes to ACTIVE when the it is OVERPAID but the chargeback amount is HIGHER than the overpaid amount When Admin sets the business date to "01 September 2023" When Admin creates a client with random data @@ -1667,7 +1673,7 @@ Feature: LoanChargeback | 16 October 2023 | Repayment | 150.0 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | | 25 October 2023 | Chargeback | 100.0 | 50.0 | 0.0 | 0.0 | 0.0 | 50.0 | - @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + @TestRailId:C2878 @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation -loan remains OVERPAID when the it is OVERPAID but the chargeback amount is LOWER than the overpaid amount When Admin sets the business date to "01 September 2023" When Admin creates a client with random data @@ -1708,7 +1714,7 @@ Feature: LoanChargeback | 16 October 2023 | Repayment | 150.0 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | | 25 October 2023 | Chargeback | 25.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + @TestRailId:C2879 @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation -loan goes to CLOSED when the loan is OVERPAID but the chargeback amount is EQUALS than the overpaid amount When Admin sets the business date to "01 September 2023" When Admin creates a client with random data @@ -1749,7 +1755,7 @@ Feature: LoanChargeback | 16 October 2023 | Repayment | 150.0 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | | 25 October 2023 | Chargeback | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + @TestRailId:C2880 @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation - chargeback after the loan is closed, before the maturity date When Admin sets the business date to "01 September 2023" When Admin creates a client with random data @@ -1787,7 +1793,7 @@ Feature: LoanChargeback | 10 October 2023 | Repayment | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | | 10 October 2023 | Chargeback | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | - @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + @TestRailId:C2881 @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation - repayment 1 is reversed When Admin sets the business date to "01 September 2023" When Admin creates a client with random data @@ -1837,7 +1843,7 @@ Feature: LoanChargeback | 25 October 2023 | Chargeback | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 200.0 | | 30 October 2023 | Repayment | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | - @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + @TestRailId:C3034 @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation - overpayment handling When Admin sets the business date to "01 September 2023" When Admin creates a client with random data @@ -1866,7 +1872,7 @@ Feature: LoanChargeback When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 100 EUR transaction amount Then Loan has 1000 outstanding amount - @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + @TestRailId:C3038 @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation - chargeback on downpayment When Admin sets the business date to "01 January 2024" When Admin creates a client with random data @@ -1893,7 +1899,7 @@ Feature: LoanChargeback | 01 January 2024 | Down Payment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 750.0 | | 01 January 2024 | Chargeback | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 1000.0 | - @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + @TestRailId:C3039 @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation - partial chargeback on downpayment When Admin sets the business date to "01 January 2024" When Admin creates a client with random data @@ -1920,8 +1926,7 @@ Feature: LoanChargeback | 01 January 2024 | Down Payment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 750.0 | | 01 January 2024 | Chargeback | 200.0 | 200.0 | 0.0 | 0.0 | 0.0 | 950.0 | -# TODO chack and finish when credit allocation is implemented - @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + @TestRailId:C3243 @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation - credit allocation UC1 When Admin sets the business date to "01 January 2024" When Admin creates a client with random data @@ -1938,7 +1943,7 @@ Feature: LoanChargeback When Admin sets the business date to "17 January 2024" When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 10 EUR transaction amount - @AdvancedPaymentAllocation + @TestRailId:C3079 @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation - full chargeback on overpaid loan When Admin sets the business date to "01 January 2024" When Admin creates a client with random data @@ -2017,7 +2022,7 @@ Feature: LoanChargeback | LIABILITY | l1 | Overpayment account | 125.0 | | | LIABILITY | 145023 | Suspense/Clearing account | | 125.0 | - @AdvancedPaymentAllocation + @TestRailId:C3080 @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation - partial chargeback on overpaid loan When Admin sets the business date to "01 January 2024" When Admin creates a client with random data @@ -2097,7 +2102,7 @@ Feature: LoanChargeback | LIABILITY | l1 | Overpayment account | 25.0 | | | LIABILITY | 145023 | Suspense/Clearing account | | 25.0 | - @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + @TestRailId:C3081 @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation - credit allocation UC1: partial, prior chargeback When Admin sets the business date to "01 January 2024" When Admin creates a client with random data @@ -2135,7 +2140,7 @@ Feature: LoanChargeback | 31 January 2024 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 125.0 | | 15 February 2024 | Repayment | 125.0 | 125.0 | 0.0 | 0.0 | 0.0 | 0.0 | - @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + @TestRailId:C3082 @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation - credit allocation UC2: partial, prior chargeback with penalty When Admin sets the business date to "01 January 2024" When Admin creates a client with random data @@ -2175,7 +2180,7 @@ Feature: LoanChargeback | 15 February 2024 | Repayment | 125.0 | 125.0 | 0.0 | 0.0 | 0.0 | 0.0 | | 15 February 2024 | Accrual | 3.0 | 0.0 | 0.0 | 0.0 | 3.0 | 0.0 | - @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + @TestRailId:C3083 @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation - credit allocation UC3: partial, prior chargeback with penalty (2) When Admin sets the business date to "01 January 2024" When Admin creates a client with random data @@ -2215,7 +2220,7 @@ Feature: LoanChargeback | 15 February 2024 | Repayment | 128.0 | 128.0 | 0.0 | 0.0 | 0.0 | 0.0 | | 15 February 2024 | Accrual | 3.0 | 0.0 | 0.0 | 0.0 | 3.0 | 0.0 | - @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + @TestRailId:C3084 @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation - credit allocation UC4: partial, prior chargeback with penalty and fee When Admin sets the business date to "01 January 2024" When Admin creates a client with random data @@ -2257,7 +2262,7 @@ Feature: LoanChargeback | 15 February 2024 | Repayment | 182.0 | 182.0 | 0.0 | 0.0 | 0.0 | 0.0 | | 15 February 2024 | Accrual | 7.0 | 0.0 | 0.0 | 4.0 | 3.0 | 0.0 | - @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + @TestRailId:C3085 @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation - credit allocation UC5: full, prior chargeback When Admin sets the business date to "01 January 2024" When Admin creates a client with random data @@ -2297,7 +2302,7 @@ Feature: LoanChargeback | 31 January 2024 | Repayment | 375.0 | 375.0 | 0.0 | 0.0 | 0.0 | 125.0 | | 15 February 2024 | Repayment | 125.0 | 125.0 | 0.0 | 0.0 | 0.0 | 0.0 | - @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + @TestRailId:C3086 @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation - credit allocation UC6: full, after chargeback When Admin sets the business date to "01 January 2024" When Admin creates a client with random data @@ -2345,7 +2350,7 @@ Feature: LoanChargeback | 20 February 2024 | Chargeback | 125.0 | 125.0 | 0.0 | 0.0 | 0.0 | 500.0 | | 28 February 2024 | Repayment | 500.0 | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | - @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + @TestRailId:C3087 @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation - credit allocation UC7: partial, after chargeback When Admin sets the business date to "01 January 2024" When Admin creates a client with random data @@ -2387,7 +2392,7 @@ Feature: LoanChargeback | 20 February 2024 | Chargeback | 125.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | | 28 February 2024 | Repayment | 125.0 | 125.0 | 0.0 | 0.0 | 0.0 | 0.0 | - @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + @TestRailId:C3088 @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation - credit allocation UC8: multiple, prior chargebacks on same payment When Admin sets the business date to "01 January 2024" When Admin creates a client with random data @@ -2428,7 +2433,7 @@ Feature: LoanChargeback | 31 January 2024 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 125.0 | | 15 February 2024 | Repayment | 125.0 | 125.0 | 0.0 | 0.0 | 0.0 | 0.0 | - @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + @TestRailId:C3094 @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation - credit allocation accounting entries UC1: chargeback on principal When Admin sets the business date to "01 January 2024" When Admin creates a client with random data @@ -2470,7 +2475,7 @@ Feature: LoanChargeback | LIABILITY | 145023 | Suspense/Clearing account | | 250.0 | | ASSET | 112601 | Loans Receivable | 250.0 | | - @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + @TestRailId:C3095 @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation - credit allocation accounting entries UC2: chargeback on principal and fees When Admin sets the business date to "01 January 2024" When Admin creates a client with random data @@ -2519,7 +2524,7 @@ Feature: LoanChargeback | ASSET | 112601 | Loans Receivable | 250.0 | | | ASSET | 112603 | Interest/Fee Receivable | 30.0 | | - @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + @TestRailId:C3096 @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation - credit allocation accounting entries UC3: chargeback on principal and penalties When Admin sets the business date to "01 January 2024" When Admin creates a client with random data @@ -2568,7 +2573,7 @@ Feature: LoanChargeback | ASSET | 112601 | Loans Receivable | 250.0 | | | ASSET | 112603 | Interest/Fee Receivable | 30.0 | | - @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + @TestRailId:C3097 @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation - credit allocation accounting entries UC4: when overpayment amount is smaller than chargeback When Admin sets the business date to "01 January 2024" When Admin creates a client with random data @@ -2614,7 +2619,7 @@ Feature: LoanChargeback | LIABILITY | l1 | Overpayment account | 150.0 | | | ASSET | 112601 | Loans Receivable | 100.0 | | - @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + @TestRailId:C3098 @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation - credit allocation accounting entries UC5: with fees- when overpayment amount is bigger than chargeback When Admin sets the business date to "01 January 2024" When Admin creates a client with random data @@ -2665,7 +2670,7 @@ Feature: LoanChargeback | LIABILITY | 145023 | Suspense/Clearing account | | 100.0 | | LIABILITY | l1 | Overpayment account | 100.0 | | - @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + @TestRailId:C3099 @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation - credit allocation accounting entries UC6: when overpayment amount is bigger than chargeback When Admin sets the business date to "01 January 2024" When Admin creates a client with random data @@ -2710,7 +2715,7 @@ Feature: LoanChargeback | LIABILITY | 145023 | Suspense/Clearing account | | 100.0 | | LIABILITY | l1 | Overpayment account | 100.0 | | - @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + @TestRailId:C3100 @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation - credit allocation accounting entries UC7: chargeback on charge-off loan account with principal When Admin sets the business date to "01 January 2024" When Admin creates a client with random data @@ -2753,7 +2758,7 @@ Feature: LoanChargeback | LIABILITY | 145023 | Suspense/Clearing account | | 250.0 | | EXPENSE | 744007 | Credit Loss/Bad Debt | 250.0 | | - @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + @TestRailId:C3101 @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation - credit allocation accounting entries UC8: chargeback on charge-off loan account with principal and Fees When Admin sets the business date to "01 January 2024" When Admin creates a client with random data @@ -2799,7 +2804,7 @@ Feature: LoanChargeback | EXPENSE | 744007 | Credit Loss/Bad Debt | 250.0 | | | INCOME | 404008 | Fee Charge Off | 30.0 | | - @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + @TestRailId:C3102 @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation - credit allocation accounting entries UC9: chargeback on charge-off loan account with principal and Penalties When Admin sets the business date to "01 January 2024" When Admin creates a client with random data @@ -2845,7 +2850,7 @@ Feature: LoanChargeback | EXPENSE | 744007 | Credit Loss/Bad Debt | 250.0 | | | INCOME | 404008 | Fee Charge Off | 30.0 | | - @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + @TestRailId:C3111 @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation Scenario: Verify chargeback function for advanced payment allocation - credit allocation accounting entries UC10: chargeback on overpaid loan When Admin sets the business date to "01 January 2024" When Admin creates a client with random data @@ -2855,35 +2860,35 @@ Feature: LoanChargeback And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "100" 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 0 | 01 January 2024 | | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | - | 2 | 31 | 01 February 2024 | | 50.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | - | 3 | 29 | 01 March 2024 | | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | - | 4 | 31 | 01 April 2024 | | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 2 | 31 | 01 February 2024 | | 50.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 3 | 29 | 01 March 2024 | | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 4 | 31 | 01 April 2024 | | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | When Admin adds "LOAN_NSF_FEE" due date charge with "05 January 2024" due date and 5 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 0 | 01 January 2024 | | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | - | 2 | 31 | 01 February 2024 | | 50.0 | 25.0 | 0.0 | 0.0 | 5.0 | 30.0 | 0.0 | 0.0 | 0.0 | 30.0 | - | 3 | 29 | 01 March 2024 | | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | - | 4 | 31 | 01 April 2024 | | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 2 | 31 | 01 February 2024 | | 50.0 | 25.0 | 0.0 | 0.0 | 5.0 | 30.0 | 0.0 | 0.0 | 0.0 | 30.0 | + | 3 | 29 | 01 March 2024 | | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 4 | 31 | 01 April 2024 | | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | When Admin sets the business date to "01 February 2024" And Customer makes "AUTOPAY" repayment on "01 February 2024" with 105 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 0 | 01 January 2024 | 01 February 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 25.0 | 0.0 | - | 2 | 31 | 01 February 2024 | 01 February 2024 | 50.0 | 25.0 | 0.0 | 0.0 | 5.0 | 30.0 | 30.0 | 0.0 | 0.0 | 0.0 | - | 3 | 29 | 01 March 2024 | 01 February 2024 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 25.0 | 0.0 | 0.0 | - | 4 | 31 | 01 April 2024 | 01 February 2024 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 25.0 | 0.0 | 0.0 | + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | 01 February 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 25.0 | 0.0 | + | 2 | 31 | 01 February 2024 | 01 February 2024 | 50.0 | 25.0 | 0.0 | 0.0 | 5.0 | 30.0 | 30.0 | 0.0 | 0.0 | 0.0 | + | 3 | 29 | 01 March 2024 | 01 February 2024 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 25.0 | 0.0 | 0.0 | + | 4 | 31 | 01 April 2024 | 01 February 2024 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 25.0 | 0.0 | 0.0 | Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | @@ -2894,27 +2899,27 @@ Feature: LoanChargeback When Admin sets the business date to "01 March 2024" When Admin makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "19 January 2024" with 10 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 0 | 01 January 2024 | 01 February 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 25.0 | 0.0 | - | 2 | 31 | 01 February 2024 | 01 February 2024 | 50.0 | 25.0 | 0.0 | 0.0 | 5.0 | 30.0 | 30.0 | 0.0 | 0.0 | 0.0 | - | 3 | 29 | 01 March 2024 | 01 February 2024 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 25.0 | 0.0 | 0.0 | - | 4 | 31 | 01 April 2024 | 01 February 2024 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 25.0 | 0.0 | 0.0 | + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | 01 February 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 25.0 | 0.0 | + | 2 | 31 | 01 February 2024 | 01 February 2024 | 50.0 | 25.0 | 0.0 | 0.0 | 5.0 | 30.0 | 30.0 | 0.0 | 0.0 | 0.0 | + | 3 | 29 | 01 March 2024 | 01 February 2024 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 25.0 | 0.0 | 0.0 | + | 4 | 31 | 01 April 2024 | 01 February 2024 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 25.0 | 0.0 | 0.0 | Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Overpayment | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | 0.0 | - | 19 January 2024 | Merchant Issued Refund | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 90.0 | 0.0 | - | 01 February 2024 | Accrual | 5.0 | 0.0 | 0.0 | 0.0 | 5.0 | 0.0 | 0.0 | - | 01 February 2024 | Repayment | 105.0 | 90.0 | 0.0 | 0.0 | 5.0 | 0.0 | 10.0 | + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Overpayment | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | 0.0 | + | 19 January 2024 | Merchant Issued Refund | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 90.0 | 0.0 | + | 01 February 2024 | Repayment | 105.0 | 90.0 | 0.0 | 0.0 | 5.0 | 0.0 | 10.0 | + | 01 February 2024 | Accrual | 5.0 | 0.0 | 0.0 | 0.0 | 5.0 | 0.0 | 0.0 | Then Loan has 0 outstanding amount Then Loan has 10 overpaid amount Then Loan status will be "OVERPAID" When Admin sets the business date to "15 April 2024" And Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 7 EUR transaction amount for Payment nr. 1 Then Loan Transactions tab has a "DISBURSEMENT" transaction with date "01 January 2024" which has the following Journal entries: - | Type | Account code | Account name | Debit | Credit | - | ASSET | 112601 | Loans Receivable | 100.0 | | - | LIABILITY | 145023 | Suspense/Clearing account | | 100.0 | + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | 100.0 | | + | LIABILITY | 145023 | Suspense/Clearing account | | 100.0 | Then Loan Transactions tab has a "MERCHANT_ISSUED_REFUND" transaction with date "19 January 2024" which has the following Journal entries: | Type | Account code | Account name | Debit | Credit | | ASSET | 112601 | Loans Receivable | | 10.0 | @@ -2926,23 +2931,23 @@ Feature: LoanChargeback | LIABILITY | l1 | Overpayment account | | 10.0 | | LIABILITY | 145023 | Suspense/Clearing account | 105.0 | | Then Loan Repayment schedule has 5 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 0 | 01 January 2024 | 01 February 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 25.0 | 0.0 | - | 2 | 31 | 01 February 2024 | 01 February 2024 | 50.0 | 25.0 | 0.0 | 0.0 | 5.0 | 30.0 | 30.0 | 0.0 | 0.0 | 0.0 | - | 3 | 29 | 01 March 2024 | 01 February 2024 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 25.0 | 0.0 | 0.0 | - | 4 | 31 | 01 April 2024 | 01 February 2024 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 25.0 | 0.0 | 0.0 | - | 5 | 14 | 15 April 2024 | 15 April 2024 | 0.0 | 2.0 | 0.0 | 0.0 | 5.0 | 7.0 | 7.0 | 0.0 | 0.0 | 0.0 | + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | 01 February 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 25.0 | 0.0 | + | 2 | 31 | 01 February 2024 | 01 February 2024 | 50.0 | 25.0 | 0.0 | 0.0 | 5.0 | 30.0 | 30.0 | 0.0 | 0.0 | 0.0 | + | 3 | 29 | 01 March 2024 | 01 February 2024 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 25.0 | 0.0 | 0.0 | + | 4 | 31 | 01 April 2024 | 01 February 2024 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 25.0 | 0.0 | 0.0 | + | 5 | 14 | 15 April 2024 | 15 April 2024 | 0.0 | 2.0 | 0.0 | 0.0 | 5.0 | 7.0 | 7.0 | 0.0 | 0.0 | 0.0 | Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Overpayment | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | 0.0 | - | 19 January 2024 | Merchant Issued Refund | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 90.0 | 0.0 | - | 01 February 2024 | Accrual | 5.0 | 0.0 | 0.0 | 0.0 | 5.0 | 0.0 | 0.0 | - | 01 February 2024 | Repayment | 105.0 | 90.0 | 0.0 | 0.0 | 5.0 | 0.0 | 10.0 | - | 15 April 2024 | Chargeback | 7.0 | 2.0 | 0.0 | 0.0 | 5.0 | 0.0 | 7.0 | + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Overpayment | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | 0.0 | + | 19 January 2024 | Merchant Issued Refund | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 90.0 | 0.0 | + | 01 February 2024 | Repayment | 105.0 | 90.0 | 0.0 | 0.0 | 5.0 | 0.0 | 10.0 | + | 01 February 2024 | Accrual | 5.0 | 0.0 | 0.0 | 0.0 | 5.0 | 0.0 | 0.0 | + | 15 April 2024 | Chargeback | 7.0 | 2.0 | 0.0 | 0.0 | 5.0 | 0.0 | 7.0 | Then Loan Transactions tab has a "CHARGEBACK" transaction with date "15 April 2024" which has the following Journal entries: | Type | Account code | Account name | Debit | Credit | - | LIABILITY | l1 | Overpayment account | 7.0 | | + | LIABILITY | l1 | Overpayment account | 7.0 | | | LIABILITY | 145023 | Suspense/Clearing account | | 7.0 | Then Loan has 0 outstanding amount Then Loan has 3 overpaid amount @@ -2950,25 +2955,545 @@ Feature: LoanChargeback When Admin sets the business date to "16 April 2024" When Admin makes "REPAYMENT_ADJUSTMENT_REFUND" chargeback with 7 EUR transaction amount for Payment nr. 1 Then Loan Repayment schedule has 5 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 0 | 01 January 2024 | 01 February 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 25.0 | 0.0 | - | 2 | 31 | 01 February 2024 | 01 February 2024 | 50.0 | 25.0 | 0.0 | 0.0 | 5.0 | 30.0 | 30.0 | 0.0 | 0.0 | 0.0 | - | 3 | 29 | 01 March 2024 | 01 February 2024 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 25.0 | 0.0 | 0.0 | - | 4 | 31 | 01 April 2024 | 01 February 2024 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 25.0 | 0.0 | 0.0 | - | 5 | 15 | 16 April 2024 | | 0.0 | 9.0 | 0.0 | 0.0 | 5.0 | 14.0 | 10.0 | 0.0 | 0.0 | 4.0 | + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | 01 February 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 25.0 | 0.0 | + | 2 | 31 | 01 February 2024 | 01 February 2024 | 50.0 | 25.0 | 0.0 | 0.0 | 5.0 | 30.0 | 30.0 | 0.0 | 0.0 | 0.0 | + | 3 | 29 | 01 March 2024 | 01 February 2024 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 25.0 | 0.0 | 0.0 | + | 4 | 31 | 01 April 2024 | 01 February 2024 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 25.0 | 0.0 | 0.0 | + | 5 | 15 | 16 April 2024 | | 0.0 | 9.0 | 0.0 | 0.0 | 5.0 | 14.0 | 10.0 | 0.0 | 0.0 | 4.0 | Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Overpayment | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | 0.0 | - | 19 January 2024 | Merchant Issued Refund | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 90.0 | 0.0 | - | 01 February 2024 | Accrual | 5.0 | 0.0 | 0.0 | 0.0 | 5.0 | 0.0 | 0.0 | - | 01 February 2024 | Repayment | 105.0 | 90.0 | 0.0 | 0.0 | 5.0 | 0.0 | 10.0 | - | 15 April 2024 | Chargeback | 7.0 | 2.0 | 0.0 | 0.0 | 5.0 | 0.0 | 7.0 | - | 16 April 2024 | Chargeback | 7.0 | 7.0 | 0.0 | 0.0 | 0.0 | 4.0 | 3.0 | + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Overpayment | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | 0.0 | + | 19 January 2024 | Merchant Issued Refund | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 90.0 | 0.0 | + | 01 February 2024 | Repayment | 105.0 | 90.0 | 0.0 | 0.0 | 5.0 | 0.0 | 10.0 | + | 01 February 2024 | Accrual | 5.0 | 0.0 | 0.0 | 0.0 | 5.0 | 0.0 | 0.0 | + | 15 April 2024 | Chargeback | 7.0 | 2.0 | 0.0 | 0.0 | 5.0 | 0.0 | 7.0 | + | 16 April 2024 | Chargeback | 7.0 | 7.0 | 0.0 | 0.0 | 0.0 | 4.0 | 3.0 | Then Loan Transactions tab has a "CHARGEBACK" transaction with date "16 April 2024" which has the following Journal entries: | Type | Account code | Account name | Debit | Credit | - | LIABILITY | l1 | Overpayment account | 3.0 | | - | ASSET | 112601 | Loans Receivable | 4.0 | | + | LIABILITY | l1 | Overpayment account | 3.0 | | + | ASSET | 112601 | Loans Receivable | 4.0 | | | LIABILITY | 145023 | Suspense/Clearing account | | 7.0 | Then Loan has 4 outstanding amount Then Loan status will be "ACTIVE" + + @TestRailId:C3116 @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + Scenario: Verify chargeback function for advanced payment allocation - credit allocation accounting entries UC11: chargeback before maturity on payment with fee + When Admin sets the business date to "01 January 2024" + When 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_DOWNPAYMENT_ADV_PMT_ALLOC_PROG_SCHEDULE_HOR_INST_LVL_DELINQUENCY_CREDIT_ALLOCATION | 01 January 2024 | 100 | 0 | 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 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 2 | 31 | 01 February 2024 | | 50.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 3 | 29 | 01 March 2024 | | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 4 | 31 | 01 April 2024 | | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | + When Admin adds "LOAN_NSF_FEE" due date charge with "05 January 2024" due date and 5 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 2 | 31 | 01 February 2024 | | 50.0 | 25.0 | 0.0 | 0.0 | 5.0 | 30.0 | 0.0 | 0.0 | 0.0 | 30.0 | + | 3 | 29 | 01 March 2024 | | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 4 | 31 | 01 April 2024 | | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 105 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | 01 February 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 25.0 | 0.0 | + | 2 | 31 | 01 February 2024 | 01 February 2024 | 50.0 | 25.0 | 0.0 | 0.0 | 5.0 | 30.0 | 30.0 | 0.0 | 0.0 | 0.0 | + | 3 | 29 | 01 March 2024 | 01 February 2024 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 25.0 | 0.0 | 0.0 | + | 4 | 31 | 01 April 2024 | 01 February 2024 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 25.0 | 0.0 | 0.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | + | 01 February 2024 | Repayment | 105.0 | 100.0 | 0.0 | 0.0 | 5.0 | 0.0 | + | 01 February 2024 | Accrual | 5.0 | 0.0 | 0.0 | 0.0 | 5.0 | 0.0 | + Then Loan has 0 outstanding amount + Then Loan status will be "CLOSED_OBLIGATIONS_MET" +# ---Chargeback with amount < fee --- + When Admin sets the business date to "01 March 2024" + When Admin makes "REPAYMENT_ADJUSTMENT_REFUND" chargeback with 3 EUR transaction amount for Payment nr. 1 + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | 01 February 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 25.0 | 0.0 | + | 2 | 31 | 01 February 2024 | 01 February 2024 | 50.0 | 25.0 | 0.0 | 0.0 | 5.0 | 30.0 | 30.0 | 0.0 | 0.0 | 0.0 | + | 3 | 29 | 01 March 2024 | 01 February 2024 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 25.0 | 0.0 | 0.0 | + | 4 | 31 | 01 April 2024 | | 0.0 | 25.0 | 0.0 | 0.0 | 3.0 | 28.0 | 25.0 | 25.0 | 0.0 | 3.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 0.0 | 0.0 | 8.0 | 108.0 | 105.0 | 50.0 | 25.0 | 3.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Overpayment | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | 0.0 | + | 01 February 2024 | Repayment | 105.0 | 100.0 | 0.0 | 0.0 | 5.0 | 0.0 | 0.0 | + | 01 February 2024 | Accrual | 5.0 | 0.0 | 0.0 | 0.0 | 5.0 | 0.0 | 0.0 | + | 01 March 2024 | Chargeback | 3.0 | 0.0 | 0.0 | 0.0 | 3.0 | 0.0 | 0.0 | + Then Loan Transactions tab has a "DISBURSEMENT" transaction with date "01 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | 100.0 | | + | LIABILITY | 145023 | Suspense/Clearing account | | 100.0 | + Then Loan Transactions tab has a "REPAYMENT" transaction with date "01 February 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | | 100.0 | + | ASSET | 112603 | Interest/Fee Receivable | | 5.0 | + | LIABILITY | 145023 | Suspense/Clearing account | 105.0 | | + Then Loan Transactions tab has a "ACCRUAL" transaction with date "01 February 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112603 | Interest/Fee Receivable | 5.0 | | + | INCOME | 404007 | Fee Income | | 5.0 | + Then Loan Transactions tab has a "CHARGEBACK" transaction with date "01 March 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | LIABILITY | 145023 | Suspense/Clearing account | | 3.0 | + | ASSET | 112603 | Interest/Fee Receivable | 3.0 | | + Then Loan has 3 outstanding amount + Then Loan status will be "ACTIVE" +# --- Chargeback with amount > fee --- + When Admin sets the business date to "05 March 2024" + When Admin makes "REPAYMENT_ADJUSTMENT_REFUND" chargeback with 10 EUR transaction amount for Payment nr. 1 + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | 01 February 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 25.0 | 0.0 | + | 2 | 31 | 01 February 2024 | 01 February 2024 | 50.0 | 25.0 | 0.0 | 0.0 | 5.0 | 30.0 | 30.0 | 0.0 | 0.0 | 0.0 | + | 3 | 29 | 01 March 2024 | 01 February 2024 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 25.0 | 0.0 | 0.0 | + | 4 | 31 | 01 April 2024 | | 0.0 | 33.0 | 0.0 | 0.0 | 5.0 | 38.0 | 25.0 | 25.0 | 0.0 | 13.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 108.0 | 0.0 | 0.0 | 10.0 | 118.0 | 105.0 | 50.0 | 25.0 | 13.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Overpayment | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | 0.0 | + | 01 February 2024 | Repayment | 105.0 | 100.0 | 0.0 | 0.0 | 5.0 | 0.0 | 0.0 | + | 01 February 2024 | Accrual | 5.0 | 0.0 | 0.0 | 0.0 | 5.0 | 0.0 | 0.0 | + | 01 March 2024 | Chargeback | 3.0 | 0.0 | 0.0 | 0.0 | 3.0 | 0.0 | 0.0 | + | 05 March 2024 | Chargeback | 10.0 | 8.0 | 0.0 | 0.0 | 2.0 | 8.0 | 0.0 | + Then Loan Transactions tab has a "DISBURSEMENT" transaction with date "01 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | 100.0 | | + | LIABILITY | 145023 | Suspense/Clearing account | | 100.0 | + Then Loan Transactions tab has a "REPAYMENT" transaction with date "01 February 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | | 100.0 | + | ASSET | 112603 | Interest/Fee Receivable | | 5.0 | + | LIABILITY | 145023 | Suspense/Clearing account | 105.0 | | + Then Loan Transactions tab has a "ACCRUAL" transaction with date "01 February 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112603 | Interest/Fee Receivable | 5.0 | | + | INCOME | 404007 | Fee Income | | 5.0 | + Then Loan Transactions tab has a "CHARGEBACK" transaction with date "01 March 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | LIABILITY | 145023 | Suspense/Clearing account | | 3.0 | + | ASSET | 112603 | Interest/Fee Receivable | 3.0 | | + Then Loan Transactions tab has a "CHARGEBACK" transaction with date "05 March 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | LIABILITY | 145023 | Suspense/Clearing account | | 10.0 | + | ASSET | 112601 | Loans Receivable | 8.0 | | + | ASSET | 112603 | Interest/Fee Receivable | 2.0 | | + Then Loan has 13 outstanding amount + Then Loan status will be "ACTIVE" + + @TestRailId:C3117 @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + Scenario: Verify chargeback function for advanced payment allocation - credit allocation accounting entries UC12: chargeback after maturity on payment with fee + When Admin sets the business date to "01 January 2024" + When 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_DOWNPAYMENT_ADV_PMT_ALLOC_PROG_SCHEDULE_HOR_INST_LVL_DELINQUENCY_CREDIT_ALLOCATION | 01 January 2024 | 100 | 0 | 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 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 2 | 31 | 01 February 2024 | | 50.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 3 | 29 | 01 March 2024 | | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 4 | 31 | 01 April 2024 | | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | + When Admin adds "LOAN_NSF_FEE" due date charge with "05 January 2024" due date and 5 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 2 | 31 | 01 February 2024 | | 50.0 | 25.0 | 0.0 | 0.0 | 5.0 | 30.0 | 0.0 | 0.0 | 0.0 | 30.0 | + | 3 | 29 | 01 March 2024 | | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 4 | 31 | 01 April 2024 | | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 105 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | 01 February 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 25.0 | 0.0 | + | 2 | 31 | 01 February 2024 | 01 February 2024 | 50.0 | 25.0 | 0.0 | 0.0 | 5.0 | 30.0 | 30.0 | 0.0 | 0.0 | 0.0 | + | 3 | 29 | 01 March 2024 | 01 February 2024 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 25.0 | 0.0 | 0.0 | + | 4 | 31 | 01 April 2024 | 01 February 2024 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 25.0 | 0.0 | 0.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | + | 01 February 2024 | Repayment | 105.0 | 100.0 | 0.0 | 0.0 | 5.0 | 0.0 | + | 01 February 2024 | Accrual | 5.0 | 0.0 | 0.0 | 0.0 | 5.0 | 0.0 | + Then Loan has 0 outstanding amount + Then Loan status will be "CLOSED_OBLIGATIONS_MET" +# ---Chargeback with amount < fee --- + When Admin sets the business date to "15 April 2024" + When Admin makes "REPAYMENT_ADJUSTMENT_REFUND" chargeback with 3 EUR transaction amount for Payment nr. 1 + Then Loan Repayment schedule has 5 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | 01 February 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 25.0 | 0.0 | + | 2 | 31 | 01 February 2024 | 01 February 2024 | 50.0 | 25.0 | 0.0 | 0.0 | 5.0 | 30.0 | 30.0 | 0.0 | 0.0 | 0.0 | + | 3 | 29 | 01 March 2024 | 01 February 2024 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 25.0 | 0.0 | 0.0 | + | 4 | 31 | 01 April 2024 | 01 February 2024 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 25.0 | 0.0 | 0.0 | + | 5 | 14 | 15 April 2024 | | 0.0 | 0.0 | 0.0 | 0.0 | 3.0 | 3.0 | 0.0 | 0.0 | 0.0 | 3.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 0.0 | 0.0 | 8.0 | 108.0 | 105.0 | 50.0 | 25.0 | 3.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Overpayment | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | 0.0 | + | 01 February 2024 | Repayment | 105.0 | 100.0 | 0.0 | 0.0 | 5.0 | 0.0 | 0.0 | + | 01 February 2024 | Accrual | 5.0 | 0.0 | 0.0 | 0.0 | 5.0 | 0.0 | 0.0 | + | 15 April 2024 | Chargeback | 3.0 | 0.0 | 0.0 | 0.0 | 3.0 | 0.0 | 0.0 | + Then Loan Transactions tab has a "DISBURSEMENT" transaction with date "01 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | 100.0 | | + | LIABILITY | 145023 | Suspense/Clearing account | | 100.0 | + Then Loan Transactions tab has a "REPAYMENT" transaction with date "01 February 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | | 100.0 | + | ASSET | 112603 | Interest/Fee Receivable | | 5.0 | + | LIABILITY | 145023 | Suspense/Clearing account | 105.0 | | + Then Loan Transactions tab has a "ACCRUAL" transaction with date "01 February 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112603 | Interest/Fee Receivable | 5.0 | | + | INCOME | 404007 | Fee Income | | 5.0 | + Then Loan Transactions tab has a "CHARGEBACK" transaction with date "15 April 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | LIABILITY | 145023 | Suspense/Clearing account | | 3.0 | + | ASSET | 112603 | Interest/Fee Receivable | 3.0 | | + Then Loan has 3 outstanding amount + Then Loan status will be "ACTIVE" +# --- Chargeback with amount > fee --- + When Admin sets the business date to "20 April 2024" + When Admin makes "REPAYMENT_ADJUSTMENT_REFUND" chargeback with 10 EUR transaction amount for Payment nr. 1 + Then Loan Repayment schedule has 5 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | 01 February 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 25.0 | 0.0 | + | 2 | 31 | 01 February 2024 | 01 February 2024 | 50.0 | 25.0 | 0.0 | 0.0 | 5.0 | 30.0 | 30.0 | 0.0 | 0.0 | 0.0 | + | 3 | 29 | 01 March 2024 | 01 February 2024 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 25.0 | 0.0 | 0.0 | + | 4 | 31 | 01 April 2024 | 01 February 2024 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 25.0 | 0.0 | 0.0 | + | 5 | 19 | 20 April 2024 | | 0.0 | 8.0 | 0.0 | 0.0 | 5.0 | 13.0 | 0.0 | 0.0 | 0.0 | 13.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 108.0 | 0.0 | 0.0 | 10.0 | 118.0 | 105.0 | 50.0 | 25.0 | 13.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Overpayment | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | 0.0 | + | 01 February 2024 | Repayment | 105.0 | 100.0 | 0.0 | 0.0 | 5.0 | 0.0 | 0.0 | + | 01 February 2024 | Accrual | 5.0 | 0.0 | 0.0 | 0.0 | 5.0 | 0.0 | 0.0 | + | 15 April 2024 | Chargeback | 3.0 | 0.0 | 0.0 | 0.0 | 3.0 | 0.0 | 0.0 | + | 20 April 2024 | Chargeback | 10.0 | 8.0 | 0.0 | 0.0 | 2.0 | 8.0 | 0.0 | + Then Loan Transactions tab has a "DISBURSEMENT" transaction with date "01 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | 100.0 | | + | LIABILITY | 145023 | Suspense/Clearing account | | 100.0 | + Then Loan Transactions tab has a "REPAYMENT" transaction with date "01 February 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | | 100.0 | + | ASSET | 112603 | Interest/Fee Receivable | | 5.0 | + | LIABILITY | 145023 | Suspense/Clearing account | 105.0 | | + Then Loan Transactions tab has a "ACCRUAL" transaction with date "01 February 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112603 | Interest/Fee Receivable | 5.0 | | + | INCOME | 404007 | Fee Income | | 5.0 | + Then Loan Transactions tab has a "CHARGEBACK" transaction with date "15 April 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | LIABILITY | 145023 | Suspense/Clearing account | | 3.0 | + | ASSET | 112603 | Interest/Fee Receivable | 3.0 | | + Then Loan Transactions tab has a "CHARGEBACK" transaction with date "20 April 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | LIABILITY | 145023 | Suspense/Clearing account | | 10.0 | + | ASSET | 112601 | Loans Receivable | 8.0 | | + | ASSET | 112603 | Interest/Fee Receivable | 2.0 | | + Then Loan has 13 outstanding amount + Then Loan status will be "ACTIVE" + + @TestRailId:C3118 @creditAllocation @AdvancedPaymentAllocationChargeback @AdvancedPaymentAllocation + Scenario: Verify chargeback function for advanced payment allocation - credit allocation accounting entries UC13: loan goes overpaid after maturity then chargeback applied on payment with fee + When Admin sets the business date to "01 January 2024" + When 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_DOWNPAYMENT_ADV_PMT_ALLOC_PROG_SCHEDULE_HOR_INST_LVL_DELINQUENCY_CREDIT_ALLOCATION | 01 January 2024 | 100 | 0 | 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 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 2 | 31 | 01 February 2024 | | 50.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 3 | 29 | 01 March 2024 | | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 4 | 31 | 01 April 2024 | | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | + When Admin adds "LOAN_NSF_FEE" due date charge with "05 January 2024" due date and 5 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 2 | 31 | 01 February 2024 | | 50.0 | 25.0 | 0.0 | 0.0 | 5.0 | 30.0 | 0.0 | 0.0 | 0.0 | 30.0 | + | 3 | 29 | 01 March 2024 | | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 4 | 31 | 01 April 2024 | | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 105 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | 01 February 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 25.0 | 0.0 | + | 2 | 31 | 01 February 2024 | 01 February 2024 | 50.0 | 25.0 | 0.0 | 0.0 | 5.0 | 30.0 | 30.0 | 0.0 | 0.0 | 0.0 | + | 3 | 29 | 01 March 2024 | 01 February 2024 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 25.0 | 0.0 | 0.0 | + | 4 | 31 | 01 April 2024 | 01 February 2024 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 25.0 | 0.0 | 0.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | + | 01 February 2024 | Repayment | 105.0 | 100.0 | 0.0 | 0.0 | 5.0 | 0.0 | + | 01 February 2024 | Accrual | 5.0 | 0.0 | 0.0 | 0.0 | 5.0 | 0.0 | + Then Loan has 0 outstanding amount + Then Loan status will be "CLOSED_OBLIGATIONS_MET" +# --- Loan goes overpaid after maturity --- + When Admin sets the business date to "10 April 2024" + When Admin makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "19 January 2024" with 10 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | 01 February 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 25.0 | 0.0 | + | 2 | 31 | 01 February 2024 | 01 February 2024 | 50.0 | 25.0 | 0.0 | 0.0 | 5.0 | 30.0 | 30.0 | 0.0 | 0.0 | 0.0 | + | 3 | 29 | 01 March 2024 | 01 February 2024 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 25.0 | 0.0 | 0.0 | + | 4 | 31 | 01 April 2024 | 01 February 2024 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 25.0 | 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 | + | 100.0 | 0.0 | 0.0 | 5.0 | 105.0 | 105.0 | 50.0 | 25.0 | 0.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Overpayment | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | 0.0 | + | 19 January 2024 | Merchant Issued Refund | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 90.0 | 0.0 | + | 01 February 2024 | Accrual | 5.0 | 0.0 | 0.0 | 0.0 | 5.0 | 0.0 | 0.0 | + | 01 February 2024 | Repayment | 105.0 | 90.0 | 0.0 | 0.0 | 5.0 | 0.0 | 10.0 | + Then Loan has 0 outstanding amount + Then Loan has 10 overpaid amount + Then Loan status will be "OVERPAID" +# ---Chargeback with amount < overpaid amount and fee amount --- + When Admin sets the business date to "15 April 2024" + When Admin makes "REPAYMENT_ADJUSTMENT_REFUND" chargeback with 3 EUR transaction amount for Payment nr. 1 + Then Loan Repayment schedule has 5 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | 01 February 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 25.0 | 0.0 | + | 2 | 31 | 01 February 2024 | 01 February 2024 | 50.0 | 25.0 | 0.0 | 0.0 | 5.0 | 30.0 | 30.0 | 0.0 | 0.0 | 0.0 | + | 3 | 29 | 01 March 2024 | 01 February 2024 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 25.0 | 0.0 | 0.0 | + | 4 | 31 | 01 April 2024 | 01 February 2024 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 25.0 | 0.0 | 0.0 | + | 5 | 14 | 15 April 2024 | 15 April 2024 | 0.0 | 0.0 | 0.0 | 0.0 | 3.0 | 3.0 | 3.0 | 0.0 | 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 | + | 100.0 | 0.0 | 0.0 | 8.0 | 108.0 | 108.0 | 50.0 | 25.0 | 0.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Overpayment | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | 0.0 | + | 19 January 2024 | Merchant Issued Refund | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 90.0 | 0.0 | + | 01 February 2024 | Accrual | 5.0 | 0.0 | 0.0 | 0.0 | 5.0 | 0.0 | 0.0 | + | 01 February 2024 | Repayment | 105.0 | 90.0 | 0.0 | 0.0 | 5.0 | 0.0 | 10.0 | + | 15 April 2024 | Chargeback | 3.0 | 0.0 | 0.0 | 0.0 | 3.0 | 0.0 | 3.0 | + Then Loan Transactions tab has a "DISBURSEMENT" transaction with date "01 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | 100.0 | | + | LIABILITY | 145023 | Suspense/Clearing account | | 100.0 | + Then Loan Transactions tab has a "MERCHANT_ISSUED_REFUND" transaction with date "19 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | | 10.0 | + | LIABILITY | 145023 | Suspense/Clearing account | 10.0 | | + Then Loan Transactions tab has a "ACCRUAL" transaction with date "01 February 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112603 | Interest/Fee Receivable | 5.0 | | + | INCOME | 404007 | Fee Income | | 5.0 | + Then Loan Transactions tab has a "REPAYMENT" transaction with date "01 February 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | | 90.0 | + | ASSET | 112603 | Interest/Fee Receivable | | 5.0 | + | LIABILITY | l1 | Overpayment account | | 10.0 | + | LIABILITY | 145023 | Suspense/Clearing account | 105.0 | | + Then Loan Transactions tab has a "CHARGEBACK" transaction with date "15 April 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | LIABILITY | 145023 | Suspense/Clearing account | | 3.0 | + | LIABILITY | l1 | Overpayment account | 3.0 | | + Then Loan has 0 outstanding amount + Then Loan has 7 overpaid amount + Then Loan status will be "OVERPAID" +# --- Chargeback with amount > overpaid amount and fee amount --- + When Admin sets the business date to "20 April 2024" + When Admin makes "REPAYMENT_ADJUSTMENT_REFUND" chargeback with 10 EUR transaction amount for Payment nr. 1 + Then Loan Repayment schedule has 5 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | 01 February 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 25.0 | 0.0 | + | 2 | 31 | 01 February 2024 | 01 February 2024 | 50.0 | 25.0 | 0.0 | 0.0 | 5.0 | 30.0 | 30.0 | 0.0 | 0.0 | 0.0 | + | 3 | 29 | 01 March 2024 | 01 February 2024 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 25.0 | 0.0 | 0.0 | + | 4 | 31 | 01 April 2024 | 01 February 2024 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 25.0 | 0.0 | 0.0 | + | 5 | 19 | 20 April 2024 | | 0.0 | 8.0 | 0.0 | 0.0 | 5.0 | 13.0 | 10.0 | 0.0 | 0.0 | 3.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 108.0 | 0.0 | 0.0 | 10.0 | 118.0 | 115.0 | 50.0 | 25.0 | 3.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Overpayment | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | 0.0 | + | 19 January 2024 | Merchant Issued Refund | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 90.0 | 0.0 | + | 01 February 2024 | Accrual | 5.0 | 0.0 | 0.0 | 0.0 | 5.0 | 0.0 | 0.0 | + | 01 February 2024 | Repayment | 105.0 | 90.0 | 0.0 | 0.0 | 5.0 | 0.0 | 10.0 | + | 15 April 2024 | Chargeback | 3.0 | 0.0 | 0.0 | 0.0 | 3.0 | 0.0 | 3.0 | + | 20 April 2024 | Chargeback | 10.0 | 8.0 | 0.0 | 0.0 | 2.0 | 3.0 | 7.0 | + Then Loan Transactions tab has a "DISBURSEMENT" transaction with date "01 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | 100.0 | | + | LIABILITY | 145023 | Suspense/Clearing account | | 100.0 | + Then Loan Transactions tab has a "MERCHANT_ISSUED_REFUND" transaction with date "19 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | | 10.0 | + | LIABILITY | 145023 | Suspense/Clearing account | 10.0 | | + Then Loan Transactions tab has a "ACCRUAL" transaction with date "01 February 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112603 | Interest/Fee Receivable | 5.0 | | + | INCOME | 404007 | Fee Income | | 5.0 | + Then Loan Transactions tab has a "REPAYMENT" transaction with date "01 February 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | | 90.0 | + | ASSET | 112603 | Interest/Fee Receivable | | 5.0 | + | LIABILITY | l1 | Overpayment account | | 10.0 | + | LIABILITY | 145023 | Suspense/Clearing account | 105.0 | | + Then Loan Transactions tab has a "CHARGEBACK" transaction with date "15 April 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | LIABILITY | 145023 | Suspense/Clearing account | | 3.0 | + | LIABILITY | l1 | Overpayment account | 3.0 | | + Then Loan Transactions tab has a "CHARGEBACK" transaction with date "20 April 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | LIABILITY | 145023 | Suspense/Clearing account | | 10.0 | + | LIABILITY | l1 | Overpayment account | 7.0 | | + | ASSET | 112601 | Loans Receivable | 3.0 | | + Then Loan has 3 outstanding amount + Then Loan status will be "ACTIVE" + + @TestRailId:C3138 + Scenario: Verify chargeback function when reverse replay happens with Advanced payment allocation and set allocation rules for Chargeback transaction + When Admin sets the business date to "01 January 2024" + When 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_DOWNPAYMENT_ADV_PMT_ALLOC_PROG_SCHEDULE_HOR_INST_LVL_DELINQUENCY_CREDIT_ALLOCATION | 01 January 2024 | 100 | 0 | 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 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 2 | 31 | 01 February 2024 | | 50.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 3 | 29 | 01 March 2024 | | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 4 | 31 | 01 April 2024 | | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | + When Admin adds "LOAN_NSF_FEE" due date charge with "05 January 2024" due date and 5 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 2 | 31 | 01 February 2024 | | 50.0 | 25.0 | 0.0 | 0.0 | 5.0 | 30.0 | 0.0 | 0.0 | 0.0 | 30.0 | + | 3 | 29 | 01 March 2024 | | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 4 | 31 | 01 April 2024 | | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | + When Admin sets the business date to "05 January 2024" + And Customer makes "AUTOPAY" repayment on "05 January 2024" with 28 EUR transaction amount + When Admin sets the business date to "06 January 2024" + And Customer makes "AUTOPAY" repayment on "06 January 2024" with 10 EUR transaction amount + When Admin sets the business date to "07 January 2024" + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | 05 January 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 25.0 | 0.0 | + | 2 | 31 | 01 February 2024 | | 50.0 | 25.0 | 0.0 | 0.0 | 5.0 | 30.0 | 13.0 | 13.0 | 0.0 | 17.0 | + | 3 | 29 | 01 March 2024 | | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 4 | 31 | 01 April 2024 | | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 05 January 2024 | Repayment | 28.0 | 25.0 | 0.0 | 0.0 | 3.0 | 75.0 | false | false | + | 06 January 2024 | Repayment | 10.0 | 8.0 | 0.0 | 0.0 | 2.0 | 67.0 | false | false | + When Admin makes "REPAYMENT_ADJUSTMENT_REFUND" chargeback with 10 EUR transaction amount for Payment nr. 2 + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | 05 January 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 25.0 | 0.0 | + | 2 | 31 | 01 February 2024 | | 50.0 | 33.0 | 0.0 | 0.0 | 7.0 | 40.0 | 13.0 | 13.0 | 0.0 | 27.0 | + | 3 | 29 | 01 March 2024 | | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 4 | 31 | 01 April 2024 | | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 05 January 2024 | Repayment | 28.0 | 25.0 | 0.0 | 0.0 | 3.0 | 75.0 | false | false | + | 06 January 2024 | Repayment | 10.0 | 8.0 | 0.0 | 0.0 | 2.0 | 67.0 | false | false | + | 07 January 2024 | Chargeback | 10.0 | 8.0 | 0.0 | 0.0 | 2.0 | 75.0 | false | false | + When Customer undo "1"th repayment on "05 January 2024" + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 10.0 | 0.0 | 10.0 | 15.0 | + | 2 | 31 | 01 February 2024 | | 50.0 | 35.0 | 0.0 | 0.0 | 5.0 | 40.0 | 0.0 | 0.0 | 0.0 | 40.0 | + | 3 | 29 | 01 March 2024 | | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 4 | 31 | 01 April 2024 | | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 05 January 2024 | Repayment | 28.0 | 25.0 | 0.0 | 0.0 | 3.0 | 75.0 | true | false | + | 06 January 2024 | Repayment | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 90.0 | false | true | + | 07 January 2024 | Chargeback | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | true | + And Customer makes "AUTOPAY" repayment on "03 January 2024" with 25 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | 03 January 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 25.0 | 0.0 | + | 2 | 31 | 01 February 2024 | | 50.0 | 30.0 | 0.0 | 0.0 | 10.0 | 40.0 | 10.0 | 10.0 | 0.0 | 30.0 | + | 3 | 29 | 01 March 2024 | | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 4 | 31 | 01 April 2024 | | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 03 January 2024 | Repayment | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 75.0 | false | false | + | 05 January 2024 | Repayment | 28.0 | 25.0 | 0.0 | 0.0 | 3.0 | 75.0 | true | false | + | 06 January 2024 | Repayment | 10.0 | 5.0 | 0.0 | 0.0 | 5.0 | 70.0 | false | true | + | 07 January 2024 | Chargeback | 10.0 | 5.0 | 0.0 | 0.0 | 5.0 | 75.0 | false | true | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 105.0 | 0.0 | 0.0 | 10.0 | 115.0 | 35.0 | 10.0 | 25.0 | 80.0 | 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 ebd342ebd..10aa97b14 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/LoanDelinquency.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/LoanDelinquency.feature @@ -1,7 +1,7 @@ @LoanDelinquencyFeature Feature: LoanDelinquency - + @TestRailId:C2963 Scenario: Verify Loan delinquency pause API - PAUSE and RESUME by loanId When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -22,7 +22,7 @@ Feature: LoanDelinquency | PAUSE | 16 October 2023 | 30 October 2023 | | RESUME | 20 October 2023 | | - + @TestRailId:C2964 Scenario: Verify Loan delinquency pause API - PAUSE and RESUME by loanExternalId When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -43,7 +43,7 @@ Feature: LoanDelinquency | PAUSE | 16 October 2023 | 30 October 2023 | | RESUME | 20 October 2023 | | - + @TestRailId:C2965 Scenario: Verify Loan delinquency pause API - PAUSE and RESUME actions supported only When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -65,7 +65,7 @@ Feature: LoanDelinquency | PAUSE | 16 October 2023 | 30 October 2023 | | RESUME | 20 October 2023 | | - + @TestRailId:C2966 Scenario: Verify Loan delinquency pause API - PAUSE with start date on actual business date When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -80,7 +80,7 @@ Feature: LoanDelinquency | action | startDate | endDate | | PAUSE | 16 October 2023 | 30 October 2023 | - + @TestRailId:C2967 Scenario: Verify Loan delinquency pause API - PAUSE with start date later than actual business date When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -95,7 +95,7 @@ Feature: LoanDelinquency | action | startDate | endDate | | PAUSE | 25 October 2023 | 30 October 2023 | - + @TestRailId:C2968 Scenario: Verify Loan delinquency pause API - PAUSE with start date before than actual business date is possible When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -110,7 +110,7 @@ Feature: LoanDelinquency | action | startDate | endDate | | PAUSE | 14 October 2023 | 30 October 2023 | - + @TestRailId:C2969 Scenario: Verify Loan delinquency pause API - PAUSE action on non-active loan result an error When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -135,7 +135,7 @@ Feature: LoanDelinquency When Admin sets the business date to "16 October 2023" Then Initiating a DELINQUENCY PAUSE on a non-active loan results an error - startDate: "16 October 2023", endDate: "30 October 2023" - + @TestRailId:C2970 Scenario: Verify Loan delinquency pause API - RESUME action on non-active loan result an error When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -158,7 +158,7 @@ Feature: LoanDelinquency Then Loan status will be "CLOSED_OBLIGATIONS_MET" Then Initiating a DELINQUENCY RESUME on a non-active loan results an error - startDate: "16 October 2023" - + @TestRailId:C2971 Scenario: Verify Loan delinquency pause API - Overlapping PAUSE periods result an error When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -175,7 +175,7 @@ Feature: LoanDelinquency When Admin sets the business date to "20 October 2023" Then Overlapping PAUSE periods result an error - startDate: "20 October 2023", endDate: "30 October 2023" - + @TestRailId:C2972 Scenario: Verify Loan delinquency pause API - RESUME without an active PAUSE period results an error When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -186,7 +186,7 @@ Feature: LoanDelinquency When Admin successfully disburse the loan on "01 October 2023" with "1000" EUR transaction amount Then Initiating a DELINQUENCY RESUME without an active PAUSE period results an error - startDate: "01 October 2023" - + @TestRailId:C2973 Scenario: Verify Loan delinquency pause API - RESUME with start date before than actual business date results an error When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -203,7 +203,7 @@ Feature: LoanDelinquency When Admin sets the business date to "20 October 2023" Then Initiating a DELINQUENCY RESUME with start date other than actual business date results an error - startDate: "01 October 2023" - + @TestRailId:C2974 Scenario: Verify Loan delinquency pause API - RESUME with start date later than actual business date results an error When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -220,12 +220,12 @@ Feature: LoanDelinquency When Admin sets the business date to "20 October 2023" Then Initiating a DELINQUENCY RESUME with start date other than actual business date results an error - startDate: "21 October 2023" - + @TestRailId:C2975 Scenario: Verify Loan delinquency pause API - RESUME with end date results an error When Admin sets the business date to "01 October 2023" When 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 | + | 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_DOWNPAYMENT_AUTO_ADVANCED_PAYMENT_ALLOCATION | 01 October 2023 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 45 | DAYS | 15 | DAYS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 October 2023" with "1000" amount and expected disbursement date on "01 October 2023" When Admin successfully disburse the loan on "01 October 2023" with "1000" EUR transaction amount @@ -237,7 +237,7 @@ Feature: LoanDelinquency When Admin sets the business date to "20 October 2023" Then Initiating a DELINQUENCY RESUME with an endDate results an error - startDate: "20 October 2023", endDate: "30 October 2023" - @Skip + @Skip @TestRailId:C2992 Scenario: Verify Loan level loan delinquency - loan goes into delinquency pause then will be resumed When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -265,7 +265,7 @@ Feature: LoanDelinquency When Admin runs inline COB job for Loan Then Admin checks that delinquency range is: "RANGE_30" and has delinquentDate "2023-10-04" - + @TestRailId:C2979 Scenario: Verify Installment level loan delinquency - loan goes into delinquency bucket When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -282,7 +282,7 @@ Feature: LoanDelinquency | 4 | RANGE_60 | 500.00 | Then Installment level delinquency event has correct data - + @TestRailId:C2980 Scenario: Verify Installment level loan delinquency - loan goes from one delinquency bucket to an other When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -307,7 +307,7 @@ Feature: LoanDelinquency | 4 | RANGE_60 | 500.00 | Then Installment level delinquency event has correct data - + @TestRailId:C2981 Scenario: Verify Installment level loan delinquency - loan goes out from delinquency by late repayment When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -328,7 +328,7 @@ Feature: LoanDelinquency Then Installment level delinquency event has correct data Then INSTALLMENT level delinquency is null - + @TestRailId:C2982 Scenario: Verify Installment level loan delinquency - some of the installments go out from delinquency by late repayment When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -350,7 +350,7 @@ Feature: LoanDelinquency | rangeId | Range | Amount | | 2 | RANGE_3 | 250.00 | - + @TestRailId:C2983 Scenario: Verify Installment level loan delinquency - loan goes out from delinquency by Goodwill credit transaction When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -371,7 +371,7 @@ Feature: LoanDelinquency Then Installment level delinquency event has correct data Then INSTALLMENT level delinquency is null - + @TestRailId:C2984 Scenario: Verify Installment level loan delinquency - some of the installments go out from delinquency by Goodwill credit transaction When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -393,7 +393,7 @@ Feature: LoanDelinquency | rangeId | Range | Amount | | 2 | RANGE_3 | 250.00 | - + @TestRailId:C2985 Scenario: Verify Installment level loan delinquency - loan with charges goes into delinquency bucket When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -413,7 +413,7 @@ Feature: LoanDelinquency | 4 | RANGE_60 | 520.00 | Then Installment level delinquency event has correct data - + @TestRailId:C2987 Scenario: Verify Installment level loan delinquency - loan goes into delinquency pause When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -422,6 +422,9 @@ Feature: LoanDelinquency | LP2_DOWNPAYMENT_ADV_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL_INSTALLMENT_LEVEL_DELINQUENCY | 01 October 2023 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 45 | DAYS | 15 | DAYS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 October 2023" with "1000" amount and expected disbursement date on "01 October 2023" When Admin successfully disburse the loan on "01 October 2023" with "1000" EUR transaction amount + When Admin runs inline COB job for Loan + When Admin sets the business date to "30 October 2023" + When Admin runs inline COB job for Loan When Admin sets the business date to "16 November 2023" When Admin runs inline COB job for Loan Then Loan has the following INSTALLMENT level delinquency data: @@ -450,6 +453,8 @@ Feature: LoanDelinquency | 1 | RANGE_1 | 250.00 | | 2 | RANGE_3 | 250.00 | | 3 | RANGE_30 | 500.00 | + When Admin sets the business date to "20 December 2023" + When Admin runs inline COB job for Loan When Admin sets the business date to "01 January 2024" When Admin runs inline COB job for Loan Then Installment level delinquency event has correct data @@ -458,7 +463,7 @@ Feature: LoanDelinquency | 3 | RANGE_30 | 500.00 | | 4 | RANGE_60 | 500.00 | - + @TestRailId:C2988 Scenario: Verify Installment level loan delinquency - loan goes into delinquency pause then will be resumed When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -467,6 +472,9 @@ Feature: LoanDelinquency | LP2_DOWNPAYMENT_ADV_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL_INSTALLMENT_LEVEL_DELINQUENCY | 01 October 2023 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 45 | DAYS | 15 | DAYS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 October 2023" with "1000" amount and expected disbursement date on "01 October 2023" When Admin successfully disburse the loan on "01 October 2023" with "1000" EUR transaction amount + When Admin runs inline COB job for Loan + When Admin sets the business date to "30 October 2023" + When Admin runs inline COB job for Loan When Admin sets the business date to "16 November 2023" When Admin runs inline COB job for Loan Then Loan has the following INSTALLMENT level delinquency data: @@ -501,7 +509,7 @@ Feature: LoanDelinquency | 2 | RANGE_3 | 250.00 | | 3 | RANGE_30 | 500.00 | - + @TestRailId:C2990 Scenario: Verify that a non-super user with CREATE_DELINQUENCY_ACTION permission can initiate a DELINQUENCY PAUSE When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -519,7 +527,7 @@ Feature: LoanDelinquency | action | startDate | endDate | | PAUSE | 16 October 2023 | 30 October 2023 | - + @TestRailId:C2991 Scenario: Verify that a non-super user with no CREATE_DELINQUENCY_ACTION permission gets an error when initiate a DELINQUENCY PAUSE When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -533,7 +541,7 @@ Feature: LoanDelinquency | REPAYMENT_LOAN | Then Created user with no CREATE_DELINQUENCY_ACTION permission gets an error when initiate a DELINQUENCY PAUSE with startDate: "16 October 2023" and endDate: "30 October 2023" - + @TestRailId:C2999 Scenario: Verify Loan delinquency pause E2E - full PAUSE period When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -604,7 +612,7 @@ Feature: LoanDelinquency | rangeId | Range | Amount | | 2 | RANGE_3 | 250.00 | - + @TestRailId:C3000 Scenario: Verify Loan delinquency pause E2E - PAUSE period with RESUME When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -613,6 +621,7 @@ Feature: LoanDelinquency | LP2_DOWNPAYMENT_ADV_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL_INSTALLMENT_LEVEL_DELINQUENCY | 01 October 2023 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 45 | DAYS | 15 | DAYS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 October 2023" with "1000" amount and expected disbursement date on "01 October 2023" When Admin successfully disburse the loan on "01 October 2023" with "1000" EUR transaction amount + When Admin runs inline COB job for Loan # --- Delinquency pause --- When Admin sets the business date to "15 October 2023" When Admin initiate a DELINQUENCY PAUSE with startDate: "15 October 2023" and endDate: "30 October 2023" @@ -625,7 +634,11 @@ Feature: LoanDelinquency | PAUSE | 15 October 2023 | 30 October 2023 | Then Loan has the following LOAN level delinquency data: | classification | delinquentAmount | delinquentDate | delinquentDays | pastDueDays | - | NO_DELINQUENCY | 250.0 | 04 October 2023 | 11 | 14 | + | RANGE_3 | 250.0 | 04 October 2023 | 11 | 14 | + Then Loan has the following INSTALLMENT level delinquency data: + | rangeId | Range | Amount | + | 2 | RANGE_3 | 250.00 | + Then Installment level delinquency event has correct data # --- Delinquency resume --- When Admin sets the business date to "25 October 2023" When Admin initiate a DELINQUENCY RESUME with startDate: "25 October 2023" @@ -643,9 +656,13 @@ Feature: LoanDelinquency | RESUME | 25 October 2023 | | Then Loan has the following LOAN level delinquency data: | classification | delinquentAmount | delinquentDate | delinquentDays | pastDueDays | - | NO_DELINQUENCY | 500.0 | 04 October 2023 | 12 | 25 | - + | RANGE_3 | 500.0 | 04 October 2023 | 12 | 25 | + Then Loan has the following INSTALLMENT level delinquency data: + | rangeId | Range | Amount | + | 2 | RANGE_3 | 250.00 | + Then Installment level delinquency event has correct data + @TestRailId:C3001 Scenario: Verify Loan delinquency pause E2E - PAUSE period with RESUME and second PAUSE When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -654,6 +671,7 @@ Feature: LoanDelinquency | LP2_DOWNPAYMENT_ADV_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL_INSTALLMENT_LEVEL_DELINQUENCY | 01 October 2023 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 45 | DAYS | 15 | DAYS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 October 2023" with "1000" amount and expected disbursement date on "01 October 2023" When Admin successfully disburse the loan on "01 October 2023" with "1000" EUR transaction amount + When Admin runs inline COB job for Loan # --- Delinquency pause --- When Admin sets the business date to "15 October 2023" When Admin initiate a DELINQUENCY PAUSE with startDate: "15 October 2023" and endDate: "30 October 2023" @@ -664,9 +682,15 @@ Feature: LoanDelinquency Then Delinquency-actions have the following data: | action | startDate | endDate | | PAUSE | 15 October 2023 | 30 October 2023 | + When Admin sets the business date to "16 October 2023" + When Admin runs inline COB job for Loan Then Loan has the following LOAN level delinquency data: | classification | delinquentAmount | delinquentDate | delinquentDays | pastDueDays | - | NO_DELINQUENCY | 250.0 | 04 October 2023 | 11 | 14 | + | RANGE_3 | 250.0 | 04 October 2023 | 11 | 15 | + Then Loan has the following INSTALLMENT level delinquency data: + | rangeId | Range | Amount | + | 2 | RANGE_3 | 250.00 | + Then Installment level delinquency event has correct data # --- Delinquency resume --- When Admin sets the business date to "25 October 2023" When Admin initiate a DELINQUENCY RESUME with startDate: "25 October 2023" @@ -684,7 +708,11 @@ Feature: LoanDelinquency | RESUME | 25 October 2023 | | Then Loan has the following LOAN level delinquency data: | classification | delinquentAmount | delinquentDate | delinquentDays | pastDueDays | - | NO_DELINQUENCY | 500.0 | 04 October 2023 | 12 | 25 | + | RANGE_3 | 500.0 | 04 October 2023 | 12 | 25 | + Then Loan has the following INSTALLMENT level delinquency data: + | rangeId | Range | Amount | + | 2 | RANGE_3 | 250.00 | + Then Installment level delinquency event has correct data # --- Delinquency runs --- When Admin sets the business date to "13 November 2023" When Admin runs inline COB job for Loan @@ -739,7 +767,7 @@ Feature: LoanDelinquency | PAUSE | 14 November 2023 | 30 November 2023 | Then Loan has the following LOAN level delinquency data: | classification | delinquentAmount | delinquentDate | delinquentDays | pastDueDays | - | RANGE_3 | 1000.0 | 04 October 2023 | 31 | 60 | + | RANGE_3 | 1000.0 | 04 October 2023 | 31 | 60 | Then Loan has the following INSTALLMENT level delinquency data: | rangeId | Range | Amount | | 1 | RANGE_1 | 250.00 | @@ -766,7 +794,7 @@ Feature: LoanDelinquency | 3 | RANGE_30 | 250.00 | Then Installment level delinquency event has correct data - + @TestRailId:C3002 Scenario: Verify Loan delinquency pause E2E - full repayment (late/due date) during PAUSE period When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -775,6 +803,7 @@ Feature: LoanDelinquency | LP2_DOWNPAYMENT_ADV_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL_INSTALLMENT_LEVEL_DELINQUENCY | 01 October 2023 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 45 | DAYS | 15 | DAYS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 October 2023" with "1000" amount and expected disbursement date on "01 October 2023" When Admin successfully disburse the loan on "01 October 2023" with "1000" EUR transaction amount + When Admin runs inline COB job for Loan # --- Delinquency pause --- When Admin sets the business date to "06 October 2023" When Admin initiate a DELINQUENCY PAUSE with startDate: "06 October 2023" and endDate: "30 October 2023" @@ -787,7 +816,12 @@ Feature: LoanDelinquency | PAUSE | 06 October 2023 | 30 October 2023 | Then Loan has the following LOAN level delinquency data: | classification | delinquentAmount | delinquentDate | delinquentDays | pastDueDays | - | NO_DELINQUENCY | 250.0 | 04 October 2023 | 2 | 5 | + | RANGE_1 | 250.0 | 04 October 2023 | 2 | 5 | +# --- Grace period applied only on Loan level, not on installment level --- + Then Loan has the following INSTALLMENT level delinquency data: + | rangeId | Range | Amount | + | 2 | RANGE_3 | 250.00 | + Then Installment level delinquency event has correct data # --- Full repayment for late/due date installments --- When Admin sets the business date to "16 October 2023" Then Loan Delinquency pause periods has the following data: @@ -798,7 +832,11 @@ Feature: LoanDelinquency | PAUSE | 06 October 2023 | 30 October 2023 | Then Loan has the following LOAN level delinquency data: | classification | delinquentAmount | delinquentDate | delinquentDays | pastDueDays | - | NO_DELINQUENCY | 250.0 | 04 October 2023 | 2 | 15 | + | RANGE_1 | 250.0 | 04 October 2023 | 2 | 15 | +# --- Grace period applied only on Loan level, not on installment level --- + Then Loan has the following INSTALLMENT level delinquency data: + | rangeId | Range | Amount | + | 2 | RANGE_3 | 250.00 | And Customer makes "AUTOPAY" repayment on "16 October 2023" with 500 EUR transaction amount When Admin runs inline COB job for Loan Then Loan Delinquency pause periods has the following data: @@ -812,7 +850,7 @@ Feature: LoanDelinquency | NO_DELINQUENCY | 0.0 | null | 0 | 0 | Then INSTALLMENT level delinquency is null - + @TestRailId:C3003 Scenario: Verify Loan delinquency pause E2E - partial repayment during PAUSE period When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -821,6 +859,7 @@ Feature: LoanDelinquency | LP2_DOWNPAYMENT_ADV_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL_INSTALLMENT_LEVEL_DELINQUENCY | 01 October 2023 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 45 | DAYS | 15 | DAYS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 October 2023" with "1000" amount and expected disbursement date on "01 October 2023" When Admin successfully disburse the loan on "01 October 2023" with "1000" EUR transaction amount + When Admin runs inline COB job for Loan # --- Delinquency pause --- When Admin sets the business date to "06 October 2023" When Admin initiate a DELINQUENCY PAUSE with startDate: "06 October 2023" and endDate: "30 October 2023" @@ -833,7 +872,12 @@ Feature: LoanDelinquency | PAUSE | 06 October 2023 | 30 October 2023 | Then Loan has the following LOAN level delinquency data: | classification | delinquentAmount | delinquentDate | delinquentDays | pastDueDays | - | NO_DELINQUENCY | 250.0 | 04 October 2023 | 2 | 5 | + | RANGE_1 | 250.0 | 04 October 2023 | 2 | 5 | +# --- Grace period applied only on Loan level, not on installment level --- + Then Loan has the following INSTALLMENT level delinquency data: + | rangeId | Range | Amount | + | 2 | RANGE_3 | 250.00 | + Then Installment level delinquency event has correct data # --- Full repayment for late/due date installments --- When Admin sets the business date to "16 October 2023" Then Loan Delinquency pause periods has the following data: @@ -844,7 +888,11 @@ Feature: LoanDelinquency | PAUSE | 06 October 2023 | 30 October 2023 | Then Loan has the following LOAN level delinquency data: | classification | delinquentAmount | delinquentDate | delinquentDays | pastDueDays | - | NO_DELINQUENCY | 250.0 | 04 October 2023 | 2 | 15 | + | RANGE_1 | 250.0 | 04 October 2023 | 2 | 15 | +# --- Grace period applied only on Loan level, not on installment level --- + Then Loan has the following INSTALLMENT level delinquency data: + | rangeId | Range | Amount | + | 2 | RANGE_3 | 250.00 | And Customer makes "AUTOPAY" repayment on "16 October 2023" with 150 EUR transaction amount When Admin runs inline COB job for Loan Then Loan Delinquency pause periods has the following data: @@ -861,7 +909,7 @@ Feature: LoanDelinquency | rangeId | Range | Amount | | 2 | RANGE_3 | 100.00 | - + @TestRailId:C3004 Scenario: Verify Loan delinquency pause E2E - full repayment (only late) during PAUSE period then RESUME When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -870,6 +918,7 @@ Feature: LoanDelinquency | LP2_DOWNPAYMENT_ADV_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL_INSTALLMENT_LEVEL_DELINQUENCY | 01 October 2023 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 45 | DAYS | 15 | DAYS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 October 2023" with "1000" amount and expected disbursement date on "01 October 2023" When Admin successfully disburse the loan on "01 October 2023" with "1000" EUR transaction amount + When Admin runs inline COB job for Loan # --- Delinquency pause --- When Admin sets the business date to "06 October 2023" When Admin initiate a DELINQUENCY PAUSE with startDate: "06 October 2023" and endDate: "30 October 2023" @@ -882,7 +931,12 @@ Feature: LoanDelinquency | PAUSE | 06 October 2023 | 30 October 2023 | Then Loan has the following LOAN level delinquency data: | classification | delinquentAmount | delinquentDate | delinquentDays | pastDueDays | - | NO_DELINQUENCY | 250.0 | 04 October 2023 | 2 | 5 | + | RANGE_1 | 250.0 | 04 October 2023 | 2 | 5 | +# --- Grace period applied only on Loan level, not on installment level --- + Then Loan has the following INSTALLMENT level delinquency data: + | rangeId | Range | Amount | + | 2 | RANGE_3 | 250.00 | + Then Installment level delinquency event has correct data # --- Full repayment for late/due date installments --- When Admin sets the business date to "16 October 2023" Then Loan Delinquency pause periods has the following data: @@ -893,7 +947,11 @@ Feature: LoanDelinquency | PAUSE | 06 October 2023 | 30 October 2023 | Then Loan has the following LOAN level delinquency data: | classification | delinquentAmount | delinquentDate | delinquentDays | pastDueDays | - | NO_DELINQUENCY | 250.0 | 04 October 2023 | 2 | 15 | + | RANGE_1 | 250.0 | 04 October 2023 | 2 | 15 | +# --- Grace period applied only on Loan level, not on installment level --- + Then Loan has the following INSTALLMENT level delinquency data: + | rangeId | Range | Amount | + | 2 | RANGE_3 | 250.00 | And Customer makes "AUTOPAY" repayment on "16 October 2023" with 250 EUR transaction amount When Admin runs inline COB job for Loan Then Loan Delinquency pause periods has the following data: @@ -944,15 +1002,16 @@ Feature: LoanDelinquency | 2 | RANGE_3 | 250.00 | Then Installment level delinquency event has correct data - + @TestRailId:C3013 Scenario: Verify that in case of resume on end/start date of continous pause periods first period ends automatically, second period ended by resume When Admin sets the business date to "01 October 2023" When 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 | + | 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_DOWNPAYMENT_ADV_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL_INSTALLMENT_LEVEL_DELINQUENCY | 01 October 2023 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 45 | DAYS | 15 | DAYS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 October 2023" with "1000" amount and expected disbursement date on "01 October 2023" When Admin successfully disburse the loan on "01 October 2023" with "1000" EUR transaction amount + When Admin runs inline COB job for Loan When Admin sets the business date to "25 October 2023" When Admin initiate a DELINQUENCY PAUSE with startDate: "25 October 2023" and endDate: "30 October 2023" Then Delinquency-actions have the following data: @@ -992,7 +1051,10 @@ Feature: LoanDelinquency | true | 30 October 2023 | 30 October 2023 | Then Loan has the following LOAN level delinquency data: | classification | delinquentAmount | delinquentDate | delinquentDays | pastDueDays | - | NO_DELINQUENCY | 500.0 | 04 October 2023 | 21 | 29 | + | RANGE_3 | 500.0 | 04 October 2023 | 21 | 29 | + Then Loan has the following INSTALLMENT level delinquency data: + | rangeId | Range | Amount | + | 2 | RANGE_3 | 500.00 | When Admin sets the business date to "31 October 2023" Then Loan Delinquency pause periods has the following data: | active | pausePeriodStart | pausePeriodEnd | @@ -1000,9 +1062,12 @@ Feature: LoanDelinquency | false | 30 October 2023 | 30 October 2023 | Then Loan has the following LOAN level delinquency data: | classification | delinquentAmount | delinquentDate | delinquentDays | pastDueDays | - | NO_DELINQUENCY | 500.0 | 04 October 2023 | 22 | 30 | - + | RANGE_3 | 500.0 | 04 October 2023 | 22 | 30 | + Then Loan has the following INSTALLMENT level delinquency data: + | rangeId | Range | Amount | + | 2 | RANGE_3 | 500.00 | + @TestRailId:C3014 Scenario: Verify that creating a loan with Advanced payment allocation with product no Advanced payment allocation set results an error When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -1010,7 +1075,7 @@ Feature: LoanDelinquency | 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 | | LP1 | 01 October 2023 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 45 | DAYS | 15 | DAYS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - + @TestRailId:C3015 Scenario: Verify Backdated Pause Delinquency - Event Trigger: LoanDelinquencyRangeChangeBusinessEvent, LoanAccountDelinquencyPauseChangedBusinessEvent check When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -1045,7 +1110,7 @@ Feature: LoanDelinquency | rangeId | Range | Amount | | 2 | RANGE_3 | 500.00 | - + @TestRailId:C3016 Scenario: Verify that for pause period calculations business date is being used instead of COB date When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -1100,7 +1165,7 @@ Feature: LoanDelinquency | action | startDate | endDate | | PAUSE | 16 October 2023 | 25 October 2023 | - + @TestRailId:C3018 Scenario: Verify that if Global configuration: next-payment-due-date is set to: earliest-unpaid-date then in Loan details delinquent.nextPaymentDueDate will be the first unpaid installment date When Global config "next-payment-due-date" value set to "earliest-unpaid-date" When Admin sets the business date to "01 October 2023" @@ -1116,7 +1181,7 @@ Feature: LoanDelinquency Then Loan details delinquent.nextPaymentDueDate will be "01 October 2023" When Global config "next-payment-due-date" value set to "earliest-unpaid-date" - + @TestRailId:C3019 Scenario: Verify that if Global configuration: next-payment-due-date is set to: next-unpaid-due-date then in Loan details delinquent.nextPaymentDueDate will be the next unpaid installment date regardless of the status of previous installments When Global config "next-payment-due-date" value set to "next-unpaid-due-date" When Admin sets the business date to "01 October 2023" @@ -1132,7 +1197,7 @@ Feature: LoanDelinquency Then Loan details delinquent.nextPaymentDueDate will be "31 October 2023" When Global config "next-payment-due-date" value set to "earliest-unpaid-date" - + @TestRailId:C3032 Scenario: Verify that delinquencyRange field in LoanAccountDelinquencyRangeDataV1 is not null in case of delinquent Loan When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -1148,7 +1213,7 @@ Feature: LoanDelinquency | classification | delinquentAmount | delinquentDate | delinquentDays | pastDueDays | | RANGE_30 | 1000.0 | 04 October 2023 | 58 | 61 | - + @TestRailId:C3035 Scenario: Verify that delinquency is NOT applied after loan submitted and approved When Admin sets the business date to "30 October 2023" When Admin creates a client with random data @@ -1163,7 +1228,7 @@ Feature: LoanDelinquency | classification | delinquentAmount | delinquentDate | delinquentDays | pastDueDays | | NO_DELINQUENCY | 0.0 | null | 0 | 0 | - + @TestRailId:C3047 Scenario: Verify that delinquent.lastRepaymentAmount is calculated correctly in case of auto downpayment When Admin sets the business date to "01 February 2024" When Admin creates a client with random data @@ -1175,7 +1240,7 @@ Feature: LoanDelinquency When Admin sets the business date to "01 April 2024" Then In Loan details delinquent.lastRepaymentAmount is 250 EUR with lastRepaymentDate "01 February 2024" - @AdvancedPaymentAllocation + @TestRailId:C3066 @AdvancedPaymentAllocation Scenario: Verify that on Loans in SUBMITTED_AND_PENDING_APPROVAL or APPROVED status delinquency is not applied When Admin sets the business date to "01 February 2024" When Admin creates a client with random data @@ -1189,8 +1254,8 @@ Feature: LoanDelinquency And Admin successfully approves the loan on "01 March 2024" with "1000" amount and expected disbursement date on "01 March 2024" Then Admin checks that delinquency range is: "NO_DELINQUENCY" and has delinquentDate "" -# TODO remove skip when LoanDelinquencyRangeChangeBusinessEvent has wrong values compared to LoanDetails is done and scenario below here does not fail - @Skip +# TODO unskip and check when PS-1827 is done + @Skip @TestRailId:C3093 Scenario: Verify that LoanDelinquencyRangeChangeBusinessEvent has the correct Delinquency range, date and amount on both loan- and installment-level When Admin sets the business date to "01 January 2024" When Admin creates a client with random data @@ -1199,6 +1264,9 @@ Feature: LoanDelinquency | LP2_DOWNPAYMENT_ADV_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL_INSTALLMENT_LEVEL_DELINQUENCY | 01 January 2024 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 90 | DAYS | 30 | DAYS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 January 2024" with "1000" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "1000" EUR transaction amount + When Admin runs inline COB job for Loan + When Admin sets the business date to "01 February 2024" + When Admin runs inline COB job for Loan When Admin sets the business date to "05 March 2024" When Admin runs inline COB job for Loan Then Loan has the following LOAN level delinquency data: @@ -1210,3 +1278,70 @@ Feature: LoanDelinquency | 3 | RANGE_30 | 250.00 | | 4 | RANGE_60 | 250.00 | Then LoanDelinquencyRangeChangeBusinessEvent has the same Delinquency range, date and amount as in LoanDetails on both loan- and installment-level + + @TestRailId:C3135 + Scenario: Verify that the delinquency is not applied on Loan with Rejected status + When Admin sets the business date to "01 February 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 + 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_DOWNPAYMENT_AUTO_ADVANCED_PAYMENT_ALLOCATION | 01 February 2024 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 45 | DAYS | 15 | DAYS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + When Admin sets the business date to "01 March 2024" + When Admin runs inline COB job for Loan + Then Loan has the following LOAN level delinquency data: + | classification | delinquentAmount | delinquentDate | delinquentDays | pastDueDays | + | NO_DELINQUENCY | 0.0 | null | 0 | 0 | + And Admin successfully approves the loan on "01 March 2024" with "1000" amount and expected disbursement date on "01 March 2024" + Then Loan has the following LOAN level delinquency data: + | classification | delinquentAmount | delinquentDate | delinquentDays | pastDueDays | + | NO_DELINQUENCY | 0.0 | null | 0 | 0 | + When Admin sets the business date to "25 March 2024" + And Admin can successfully undone the loan approval + And Admin successfully rejects the loan on "25 March 2024" + Then Loan status will be "REJECTED" + Then Loan has the following LOAN level delinquency data: + | classification | delinquentAmount | delinquentDate | delinquentDays | pastDueDays | + | NO_DELINQUENCY | 0.0 | null | 0 | 0 | + + @TestRailId:C3136 + Scenario: Verify that the delinquency is not applied on Loan with Withdrawn status + When Admin sets the business date to "01 February 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 + 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_DOWNPAYMENT_AUTO_ADVANCED_PAYMENT_ALLOCATION | 01 February 2024 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 45 | DAYS | 15 | DAYS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + When Admin sets the business date to "01 March 2024" + When Admin runs inline COB job for Loan + Then Loan has the following LOAN level delinquency data: + | classification | delinquentAmount | delinquentDate | delinquentDays | pastDueDays | + | NO_DELINQUENCY | 0.0 | null | 0 | 0 | + And Admin successfully approves the loan on "01 March 2024" with "1000" amount and expected disbursement date on "01 March 2024" + Then Loan has the following LOAN level delinquency data: + | classification | delinquentAmount | delinquentDate | delinquentDays | pastDueDays | + | NO_DELINQUENCY | 0.0 | null | 0 | 0 | + When Admin sets the business date to "25 March 2024" + And Admin can successfully undone the loan approval + And Admin successfully withdrawn the loan on "25 March 2024" + Then Loan status will be "WITHDRAWN" + Then Loan has the following LOAN level delinquency data: + | classification | delinquentAmount | delinquentDate | delinquentDays | pastDueDays | + | NO_DELINQUENCY | 0.0 | null | 0 | 0 | + + @TestRailId:C3137 + Scenario: Verify Installment level loan delinquency can be applied on loan account level in case of non-installment level delinquency loan product + When Admin sets the business date to "01 October 2023" + When Admin creates a client with random data + When Admin creates a fully customized loan with installment level delinquency and 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_DOWNPAYMENT_ADV_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 October 2023 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 45 | DAYS | 15 | DAYS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 October 2023" with "1000" amount and expected disbursement date on "01 October 2023" + When Admin successfully disburse the loan on "01 October 2023" with "1000" EUR transaction amount + When Admin sets the business date to "16 December 2023" + When Admin runs inline COB job for Loan + Then Loan has the following INSTALLMENT level delinquency data: + | rangeId | Range | Amount | + | 3 | RANGE_30 | 500.00 | + | 4 | RANGE_60 | 500.00 | + Then Installment level delinquency event has correct data diff --git a/fineract-e2e-tests-runner/src/test/resources/features/LoanDownPayment.feature b/fineract-e2e-tests-runner/src/test/resources/features/LoanDownPayment.feature index 1c62109de..2c38eed5b 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/LoanDownPayment.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/LoanDownPayment.feature @@ -1,7 +1,7 @@ @LoanDownPaymentFeature Feature: Loan DownPayment - + @TestRailId:C2812 Scenario: Single disbursement normal flow - auto enabled When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -51,7 +51,7 @@ Feature: Loan DownPayment | 01 February 2022 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 500.0 | | 15 February 2022 | Repayment | 400.0 | 400.0 | 0.0 | 0.0 | 0.0 | 100.0 | - + @TestRailId:C2813 Scenario: Single disbursement normal flow - auto disabled When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -112,7 +112,7 @@ Feature: Loan DownPayment | 01 February 2022 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 500.0 | | 15 February 2022 | Repayment | 400.0 | 400.0 | 0.0 | 0.0 | 0.0 | 100.0 | - + @TestRailId:C2814 Scenario: Single disbursement charge flow - auto enabled When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -163,7 +163,7 @@ Feature: Loan DownPayment | 01 February 2022 | Repayment | 300.0 | 250.0 | 0.0 | 0.0 | 50.0 | 500.0 | | 15 February 2022 | Repayment | 400.0 | 400.0 | 0.0 | 0.0 | 0.0 | 100.0 | - + @TestRailId:C2815 Scenario: Single disbursement charge flow - auto disabled When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -225,7 +225,7 @@ Feature: Loan DownPayment | 01 February 2022 | Repayment | 300.0 | 250.0 | 0.0 | 0.0 | 50.0 | 500.0 | | 15 February 2022 | Repayment | 400.0 | 400.0 | 0.0 | 0.0 | 0.0 | 100.0 | - + @TestRailId:C2816 Scenario: Double disbursement different day - auto enabled When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -266,7 +266,7 @@ Feature: Loan DownPayment | 10 January 2022 | Disbursement | 400.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1150.0 | | 10 January 2022 | Down Payment | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 1050.0 | - + @TestRailId:C2817 Scenario: Double disbursement different day - auto disabled When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -318,7 +318,7 @@ Feature: Loan DownPayment | 10 January 2022 | Disbursement | 400.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1150.0 | - + @TestRailId:C2818 Scenario: Double disbursement on installment day - auto enabled When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -360,7 +360,7 @@ Feature: Loan DownPayment | 01 February 2022 | Down Payment | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 1050.0 | - + @TestRailId:C2819 Scenario: Double disbursement on installment day - auto disabled When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -411,7 +411,7 @@ Feature: Loan DownPayment | 01 January 2022 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 750.0 | | 01 February 2022 | Disbursement | 400.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1150.0 | - + @TestRailId:C2820 Scenario: Downpayment with loan adjustment - auto enabled When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -456,7 +456,7 @@ Feature: Loan DownPayment | 01 April 2022 | Disbursement | 400.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1150.0 | | 01 April 2022 | Down Payment | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 1050.0 | - + @TestRailId:C2821 Scenario: Downpayment with loan adjustment - auto disabled When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -521,7 +521,7 @@ Feature: Loan DownPayment | 01 January 2022 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 750.0 | | 01 April 2022 | Disbursement | 400.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1150.0 | - + @TestRailId:C2822 Scenario: Downpayment creation date - auto enabled When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -576,7 +576,7 @@ Feature: Loan DownPayment | 01 April 2022 | Disbursement | 400.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1150.0 | | 01 April 2022 | Down Payment | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 1050.0 | - + @TestRailId:C2823 Scenario: Downpayment creation date - auto disabled When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -641,7 +641,7 @@ Feature: Loan DownPayment | 10 January 2022 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 750.0 | | 01 April 2022 | Disbursement | 400.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1150.0 | - + @TestRailId:C2824 Scenario: Double disbursement normal flow - auto enabled When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -696,7 +696,7 @@ Feature: Loan DownPayment | 15 January 2022 | Down Payment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 1500.0 | | 01 February 2022 | Repayment | 500.0 | 500.0 | 0.0 | 0.0 | 0.0 | 1000.0 | - + @TestRailId:C2825 Scenario: Double disbursement normal flow - auto disabled When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -761,7 +761,7 @@ Feature: Loan DownPayment | 15 January 2022 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1750.0 | | 01 February 2022 | Repayment | 500.0 | 500.0 | 0.0 | 0.0 | 0.0 | 1250.0 | - + @TestRailId:C2826 Scenario: Double disbursement same day - auto enabled When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -801,7 +801,7 @@ Feature: Loan DownPayment | 15 January 2022 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1750.0 | | 15 January 2022 | Down Payment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 1500.0 | - + @TestRailId:C2827 Scenario: Double disbursement same day - auto disabled When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -865,7 +865,7 @@ Feature: Loan DownPayment | 15 January 2022 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1750.0 | | 15 January 2022 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 1500.0 | - + @TestRailId:C2828 Scenario: Double disbursement partial overpayment - auto enabled When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -905,7 +905,7 @@ Feature: Loan DownPayment | 15 January 2022 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1750.0 | | 15 January 2022 | Down Payment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 1500.0 | - + @TestRailId:C2829 Scenario: Double disbursement partial overpayment - auto disabled When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -969,7 +969,7 @@ Feature: Loan DownPayment | 15 January 2022 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1600.0 | | 15 January 2022 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 1350.0 | - + @TestRailId:C2830 Scenario: Double disbursement full overpayment - auto enabled When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -1021,7 +1021,7 @@ Feature: Loan DownPayment | 15 January 2022 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1500.0 | | 15 January 2022 | Down Payment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 1250.0 | - + @TestRailId:C2831 Scenario: Double disbursement full overpayment - auto disabled When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -1085,7 +1085,7 @@ Feature: Loan DownPayment | 15 January 2022 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1500.0 | | 15 January 2022 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 1250.0 | - + @TestRailId:C2832 Scenario: Double disbursement after installment overdue - auto enabled When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -1125,7 +1125,7 @@ Feature: Loan DownPayment | 15 February 2022 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1750.0 | | 15 February 2022 | Down Payment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 1500.0 | - + @TestRailId:C2833 Scenario: Double disbursement after installment overdue - auto disabled When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -1189,7 +1189,7 @@ Feature: Loan DownPayment | 15 February 2022 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1750.0 | | 15 February 2022 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 1500.0 | - + @TestRailId:C2834 Scenario: Double disbursement after installment 2 - auto enabled When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -1242,7 +1242,7 @@ Feature: Loan DownPayment | 15 February 2022 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1500.0 | | 15 February 2022 | Down Payment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 1250.0 | - + @TestRailId:C2835 Scenario: Double disbursement after installment 2 - auto disabled When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -1319,7 +1319,7 @@ Feature: Loan DownPayment | 15 February 2022 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1500.0 | | 15 February 2022 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 1250.0 | - + @TestRailId:C2836 Scenario: Double disbursement normal overdue - auto enabled When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -1373,7 +1373,7 @@ Feature: Loan DownPayment | 15 January 2022 | Down Payment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 1500.0 | | 15 January 2022 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 1250.0 | - + @TestRailId:C2837 Scenario: Double disbursement normal overdue - auto disabled When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -1425,7 +1425,7 @@ Feature: Loan DownPayment | 15 January 2022 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 2000.0 | | 15 January 2022 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 1750.0 | - + @TestRailId:C2838 Scenario: Double disbursement on Duedate - auto enabled When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -1465,7 +1465,7 @@ Feature: Loan DownPayment | 01 February 2022 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1750.0 | | 01 February 2022 | Down Payment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 1500.0 | - + @TestRailId:C2839 Scenario: Double disbursement on Duedate - auto disabled When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -1530,7 +1530,7 @@ Feature: Loan DownPayment | 01 February 2022 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 1500.0 | # To recheck after verifying that loan product details are correct - @Skip + @Skip @TestRailId:C2852 Scenario: Single disbursement with interest - auto disabled When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -1551,7 +1551,7 @@ Feature: Loan DownPayment | 1000.0 | 30 | 0 | 0 | 1030.0 | 0.0 | 0 | 0 | 1030 | # To recheck after verifying that loan product details are correct - @Skip + @Skip @TestRailId:C2853 Scenario: Single disbursement delinquency - auto disabled When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -1574,7 +1574,7 @@ Feature: Loan DownPayment When Admin runs COB job Then Admin checks that delinquency range is: "RANGE_1" and has delinquentDate "2022-01-04" - + @TestRailId:C2854 Scenario: Single disbursement with undo disbursement when auto downpayment is enabled without manual transaction after last downpayment When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -1600,7 +1600,7 @@ Feature: Loan DownPayment When Admin successfully undo disbursal Then Loan status has changed to "Approved" - + @TestRailId:C2855 Scenario: Single disbursement with undo disbursement when auto downpayment is disabled without manual transaction after last downpayment When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -1637,7 +1637,7 @@ Feature: Loan DownPayment When Admin successfully undo disbursal Then Loan status has changed to "Approved" - + @TestRailId:C2856 Scenario: Single disbursement with undo disbursement when auto downpayment is disabled with manual transaction after last downpayment When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -1700,7 +1700,7 @@ Feature: Loan DownPayment When Admin successfully undo disbursal Then Loan status has changed to "Approved" - + @TestRailId:C2857 Scenario: Single disbursement with undo disbursement when auto downpayment is enabled with manual transaction after last downpayment When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -1753,7 +1753,7 @@ Feature: Loan DownPayment Then Loan status has changed to "Approved" - + @TestRailId:C2858 Scenario: Multi disbursement with undo last disbursement when auto downpayment is enabled without manual transaction after last downpayment When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -1803,7 +1803,7 @@ Feature: Loan DownPayment | 01 January 2022 | Down Payment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 750.0 | - + @TestRailId:C2859 Scenario: Multi disbursement with undo last disbursement when auto downpayment is disabled without manual transaction after last downpayment When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -1865,7 +1865,7 @@ Feature: Loan DownPayment | 01 January 2022 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 750.0 | - + @TestRailId:C2866 Scenario: Verify backdated disbursement - after down payment, before first installment due date, installment start date calculated by loan disbursement date When Admin sets the business date to "01 January 2023" When Admin creates a client with random data @@ -1910,7 +1910,7 @@ Feature: Loan DownPayment | 05 January 2023 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 2000.0 | | 05 January 2023 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 1750.0 | - + @TestRailId:C2867 Scenario: Verify backdated disbursement - second disbursement placed on after down payment, after first installment paid on due date, and takes place before first installment due date When Admin sets the business date to "01 January 2023" When Admin creates a client with random data @@ -1973,7 +1973,7 @@ Feature: Loan DownPayment | 01 February 2023 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1750.0 | | 05 February 2023 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 1500.0 | - + @TestRailId:C2868 Scenario: Verify backdated disbursement - after down payment, before first installment due date, installment start date calculated by loan submitted on date When Admin sets repaymentStartDateType for "LP2_DOWNPAYMENT" loan product to "SUBMITTED_ON_DATE" When Admin sets the business date to "01 January 2023" @@ -2020,7 +2020,7 @@ Feature: Loan DownPayment | 05 January 2023 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 1750.0 | When Admin sets repaymentStartDateType for "LP2_DOWNPAYMENT" loan product to "DISBURSEMENT_DATE" - + @TestRailId:C2869 Scenario: Verify correct Loan Repayment EMI Amount is calculated and is rounded off if loan product installmentAmountInMultiplesOf is set When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -2040,7 +2040,7 @@ Feature: Loan DownPayment | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 1250.0 | 0 | 0 | 0 | 1250.0 | 0.0 | 0 | 0 | 1250 | - + @TestRailId:C2882 Scenario: Verify Loan Repayment Due and Overdue events for downpayment When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -2055,7 +2055,7 @@ Feature: Loan DownPayment When Admin runs inline COB job for Loan Then Loan Repayment Overdue Business Event is created - + @TestRailId:C2883 Scenario: Verify that with multiple disbursement when last disbursement is reverted, downpayment will be reverted too - autopayment disabled When Admin sets the business date to "01 September 2023" When Admin creates a client with random data @@ -2101,7 +2101,7 @@ Feature: Loan DownPayment | 01 September 2023 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | | 05 September 2023 | Repayment | 500.0 | 500.0 | 0.0 | 0.0 | 0.0 | 500.0 | - + @TestRailId:C2884 Scenario: Verify that with multiple disbursement when last disbursement is reverted, downpayment will be reverted too - autopayment enabled When Admin sets the business date to "01 September 2023" When Admin creates a client with random data @@ -2150,7 +2150,7 @@ Feature: Loan DownPayment | 01 September 2023 | Down Payment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 750.0 | | 05 September 2023 | Repayment | 500.0 | 500.0 | 0.0 | 0.0 | 0.0 | 250.0 | - + @TestRailId:C2913 @AdvancedPaymentAllocation Scenario: Verify that down-payment Installments are available in the repayment schedule for CREATED, APPROVED and DISBURSED states of the loan account When Admin sets the business date to "01 September 2023" @@ -2208,7 +2208,7 @@ Feature: Loan DownPayment | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 600.0 | 0 | 0.0 | 0 | 600.0 | 150.0 | 0.0 | 0.0 | 450.0 | - + @TestRailId:C2938 Scenario: Multiple disbursements on same day - auto enabled When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -2273,7 +2273,7 @@ Feature: Loan DownPayment | 01 February 2022 | Down Payment | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 1050.0 | - + @TestRailId:C2939 Scenario: Multiple disbursements on same day - auto disabled When Admin sets the business date to "01 January 2022" When Admin creates a client with random data @@ -2345,7 +2345,7 @@ Feature: Loan DownPayment | 01 February 2022 | Disbursement | 200.0 | 0.0 | 0.0 | 0.0 | 0.0 | 950.0 | | 01 February 2022 | Disbursement | 200.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1150.0 | - + @TestRailId:C3017 Scenario: Verify that repayment schedule is managed properly in case of LP2 product with two disbursement on the same day When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -2374,7 +2374,7 @@ Feature: Loan DownPayment | 01 October 2023 | Disbursement | 900.0 | 0.0 | 0.0 | 0.0 | 0.0 | 975.0 | | 01 October 2023 | Down Payment | 225.0 | 225.0 | 0.0 | 0.0 | 0.0 | 750.0 | - + @TestRailId:C3031 Scenario: Verify that in case of auto downpayment Loan details / summary.totalRepaymentTransaction has the downpayment amount When Admin sets the business date to "01 October 2023" When Admin creates a client with random data @@ -2385,7 +2385,7 @@ Feature: Loan DownPayment When Admin successfully disburse the loan on "01 October 2023" with "1000" EUR transaction amount Then Loan details has the downpayment amount "250" in summary.totalRepaymentTransaction - @AdvancedPaymentAllocation + @TestRailId:C3061 @AdvancedPaymentAllocation Scenario: Verify enhanced auto downpayment for overpaid loans - UC1: overpaid amount > second disbursement amount AND overpaid amount > related downpayment amount When Admin sets the business date to "01 February 2024" When Admin creates a client with random data @@ -2422,7 +2422,7 @@ Feature: Loan DownPayment | 16 February 2024 | Repayment | 1000.0 | 375.0 | 0.0 | 0.0 | 0.0 | 0.0 | | 20 February 2024 | Disbursement | 400.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - @AdvancedPaymentAllocation + @TestRailId:C3062 @AdvancedPaymentAllocation Scenario: Verify enhanced auto downpayment for overpaid loans - UC2: overpaid amount = second disbursement amount AND overpaid amount > related downpayment amount When Admin sets the business date to "01 February 2024" When Admin creates a client with random data @@ -2449,8 +2449,8 @@ Feature: Loan DownPayment | 4 | 15 | 02 March 2024 | 20 February 2024 | 359.0 | 360.0 | 0.0 | 0.0 | 0.0 | 360.0 | 360.0 | 360.0 | 0.0 | 0.0 | | 5 | 15 | 17 March 2024 | 20 February 2024 | 0.0 | 359.0 | 0.0 | 0.0 | 0.0 | 359.0 | 359.0 | 359.0 | 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 | - | 1125.0 | 0.0 | 0.0 | 0.0 | 1125.0 | 1125.0 | 719.0 | 0.0 | 0.0 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1125.0 | 0.0 | 0.0 | 0.0 | 1125.0 | 1125.0 | 719.0 | 0.0 | 0.0 | Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | | 01 February 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | @@ -2458,7 +2458,7 @@ Feature: Loan DownPayment | 16 February 2024 | Repayment | 1000.0 | 375.0 | 0.0 | 0.0 | 0.0 | 0.0 | | 20 February 2024 | Disbursement | 625.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - @AdvancedPaymentAllocation + @TestRailId:C3063 @AdvancedPaymentAllocation Scenario: Verify enhanced auto downpayment for overpaid loans - UC3: overpaid amount < second disbursement amount BUT overpaid amount > related downpayment amount When Admin sets the business date to "01 February 2024" When Admin creates a client with random data @@ -2495,7 +2495,7 @@ Feature: Loan DownPayment | 16 February 2024 | Repayment | 575.0 | 375.0 | 0.0 | 0.0 | 0.0 | 0.0 | | 20 February 2024 | Disbursement | 400.0 | 0.0 | 0.0 | 0.0 | 0.0 | 200.0 | - @AdvancedPaymentAllocation + @TestRailId:C3064 @AdvancedPaymentAllocation Scenario: Verify enhanced auto downpayment for overpaid loans - UC4: overpaid amount < second disbursement amount AND overpaid amount < related downpayment amount When Admin sets the business date to "01 February 2024" When Admin creates a client with random data @@ -2533,7 +2533,7 @@ Feature: Loan DownPayment | 20 February 2024 | Disbursement | 600.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | | 20 February 2024 | Down Payment | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 450.0 | - @AdvancedPaymentAllocation + @TestRailId:C3065 @AdvancedPaymentAllocation Scenario: Verify enhanced auto downpayment for overpaid loans - UC5: repayment reverted When Admin sets the business date to "01 February 2024" When Admin creates a client with random data @@ -2572,6 +2572,152 @@ Feature: Loan DownPayment | 01 February 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | false | | 01 February 2024 | Down Payment | 125.0 | 125.0 | 0.0 | 0.0 | 0.0 | 375.0 | false | | 10 February 2024 | Repayment | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 275.0 | false | - | 16 February 2024 | Repayment | 375.0 | 275.0 | 0.0 | 0.0 | 0.0 | 0.0 | true | + | 16 February 2024 | Repayment | 375.0 | 275.0 | 0.0 | 0.0 | 0.0 | 0.0 | true | | 20 February 2024 | Disbursement | 600.0 | 0.0 | 0.0 | 0.0 | 0.0 | 875.0 | false | | 20 February 2024 | Down Payment | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 825.0 | false | + + @TestRailId:C3105 @AdvancedPaymentAllocation + Scenario: Verify multi disbursement on same day with Advanced payment allocation works properly + When Admin sets the business date to "01 February 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 + 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_DOWNPAYMENT_AUTO_ADVANCED_PAYMENT_ALLOCATION | 01 February 2024 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 45 | DAYS | 15 | DAYS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 February 2024" with "1000" amount and expected disbursement date on "01 February 2024" + When Admin successfully disburse the loan on "01 February 2024" with "100" 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 February 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 February 2024 | 01 February 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | + | 2 | 15 | 16 February 2024 | | 50.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 3 | 15 | 02 March 2024 | | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 4 | 15 | 17 March 2024 | | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | 25.0 | 0.0 | 0.0 | 75.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 February 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | + | 01 February 2024 | Down Payment | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 75.0 | false | + When Admin sets the business date to "02 February 2024" + When Admin successfully disburse the loan on "02 February 2024" with "1000" EUR transaction amount + Then Loan Repayment schedule has 5 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 February 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 February 2024 | 01 February 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | + | | | 02 February 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 2 | 0 | 02 February 2024 | 02 February 2024 | 825.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | + | 3 | 15 | 16 February 2024 | | 550.0 | 275.0 | 0.0 | 0.0 | 0.0 | 275.0 | 0.0 | 0.0 | 0.0 | 275.0 | + | 4 | 15 | 02 March 2024 | | 275.0 | 275.0 | 0.0 | 0.0 | 0.0 | 275.0 | 0.0 | 0.0 | 0.0 | 275.0 | + | 5 | 15 | 17 March 2024 | | 0.0 | 275.0 | 0.0 | 0.0 | 0.0 | 275.0 | 0.0 | 0.0 | 0.0 | 275.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1100.0 | 0.0 | 0.0 | 0.0 | 1100.0 | 275.0 | 0.0 | 0.0 | 825.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 February 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | + | 01 February 2024 | Down Payment | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 75.0 | false | + | 02 February 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1075.0 | false | + | 02 February 2024 | Down Payment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 825.0 | false | + When Admin successfully disburse the loan on "02 February 2024" with "112" EUR transaction amount + Then Loan Repayment schedule has 6 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 February 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 February 2024 | 01 February 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | + | | | 02 February 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | | | 02 February 2024 | | 112.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 2 | 0 | 02 February 2024 | 02 February 2024 | 937.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | + | 3 | 0 | 02 February 2024 | 02 February 2024 | 909.0 | 28.0 | 0.0 | 0.0 | 0.0 | 28.0 | 28.0 | 0.0 | 0.0 | 0.0 | + | 4 | 15 | 16 February 2024 | | 606.0 | 303.0 | 0.0 | 0.0 | 0.0 | 303.0 | 0.0 | 0.0 | 0.0 | 303.0 | + | 5 | 15 | 02 March 2024 | | 303.0 | 303.0 | 0.0 | 0.0 | 0.0 | 303.0 | 0.0 | 0.0 | 0.0 | 303.0 | + | 6 | 15 | 17 March 2024 | | 0.0 | 303.0 | 0.0 | 0.0 | 0.0 | 303.0 | 0.0 | 0.0 | 0.0 | 303.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1212.0 | 0.0 | 0.0 | 0.0 | 1212.0 | 303.0 | 0.0 | 0.0 | 909.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 February 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | + | 01 February 2024 | Down Payment | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 75.0 | false | + | 02 February 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1075.0 | false | + | 02 February 2024 | Down Payment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 825.0 | false | + | 02 February 2024 | Disbursement | 112.0 | 0.0 | 0.0 | 0.0 | 0.0 | 937.0 | false | + | 02 February 2024 | Down Payment | 28.0 | 28.0 | 0.0 | 0.0 | 0.0 | 909.0 | false | + + @TestRailId:C3162 + Scenario: Verify that downpayment can be enabled during loan creation if the product has downpayment enabled + When Admin sets the business date to "01 January 2022" + When Admin creates a client with random data + When Admin creates a fully customized loan with forced disabled downpayment 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_DOWNPAYMENT | 01 January 2022 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | DUE_PENALTY_INTEREST_PRINCIPAL_FEE_IN_ADVANCE_PENALTY_INTEREST_PRINCIPAL_FEE | + And Admin successfully approves the loan on "01 January 2022" with "1000" amount and expected disbursement date on "01 January 2023" + When Admin successfully disburse the loan on "01 January 2022" 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 January 2022 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2022 | | 667.0 | 333.0 | 0.0 | 0.0 | 0.0 | 333.0 | 0.0 | 0.0 | 0.0 | 333.0 | + | 2 | 28 | 01 March 2022 | | 334.0 | 333.0 | 0.0 | 0.0 | 0.0 | 333.0 | 0.0 | 0.0 | 0.0 | 333.0 | + | 3 | 31 | 01 April 2022 | | 0.0 | 334.0 | 0.0 | 0.0 | 0.0 | 334.0 | 0.0 | 0.0 | 0.0 | 334.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 | 1000.0 | 0.0 | 0 | 0 | 1000 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2022 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + + + @TestRailId:C3163 + Scenario: Verify that downpayment cannot be enabled during loan creation if the product has downpayment disabled + When Admin sets the business date to "01 January 2022" + When Admin creates a client with random data + Then Admin fails to create a fully customized loan with forced enabled downpayment 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_ACTUAL_ACTUAL | 01 January 2022 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + + @TestRailId:C3180 + Scenario: Verify that auto repayment and downpayment percentage value can be set during loan creation in case of downpayment is enabled on Loan product level - UC1 + When Admin sets the business date to "01 July 2024" + When Admin creates a client with random data + When Admin creates a fully customized loan with auto downpayment 15% and 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_DOWNPAYMENT | 01 July 2024 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | DUE_PENALTY_INTEREST_PRINCIPAL_FEE_IN_ADVANCE_PENALTY_INTEREST_PRINCIPAL_FEE | + And Admin successfully approves the loan on "01 July 2024" with "1000" amount and expected disbursement date on "01 July 2024" + When Admin successfully disburse the loan on "01 July 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 July 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 July 2024 | 01 July 2024 | 850.0 | 150.0 | 0.0 | 0.0 | 0.0 | 150.0 | 150.0 | 0.0 | 0.0 | 0.0 | + | 2 | 31 | 01 August 2024 | | 567.0 | 283.0 | 0.0 | 0.0 | 0.0 | 283.0 | 0.0 | 0.0 | 0.0 | 283.0 | + | 3 | 31 | 01 September 2024 | | 284.0 | 283.0 | 0.0 | 0.0 | 0.0 | 283.0 | 0.0 | 0.0 | 0.0 | 283.0 | + | 4 | 30 | 01 October 2024 | | 0.0 | 284.0 | 0.0 | 0.0 | 0.0 | 284.0 | 0.0 | 0.0 | 0.0 | 284.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 | 1000.0 | 150.0 | 0 | 0 | 850 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 July 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + | 01 July 2024 | Down Payment | 150.0 | 150.0 | 0.0 | 0.0 | 0.0 | 850.0 | false | + + @TestRailId:C3181 + Scenario: Verify that auto repayment and downpayment percentage value can be set during loan creation in case of downpayment is enabled on Loan product level - UC2 + When Admin sets the business date to "01 July 2024" + When Admin creates a client with random data + When Admin creates a fully customized loan with downpayment 15%, NO auto downpayment, and 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_DOWNPAYMENT | 01 July 2024 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | DUE_PENALTY_INTEREST_PRINCIPAL_FEE_IN_ADVANCE_PENALTY_INTEREST_PRINCIPAL_FEE | + And Admin successfully approves the loan on "01 July 2024" with "1000" amount and expected disbursement date on "01 July 2024" + When Admin successfully disburse the loan on "01 July 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 July 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 July 2024 | | 850.0 | 150.0 | 0.0 | 0.0 | 0.0 | 150.0 | 0.0 | 0.0 | 0.0 | 150.0 | + | 2 | 31 | 01 August 2024 | | 567.0 | 283.0 | 0.0 | 0.0 | 0.0 | 283.0 | 0.0 | 0.0 | 0.0 | 283.0 | + | 3 | 31 | 01 September 2024 | | 284.0 | 283.0 | 0.0 | 0.0 | 0.0 | 283.0 | 0.0 | 0.0 | 0.0 | 283.0 | + | 4 | 30 | 01 October 2024 | | 0.0 | 284.0 | 0.0 | 0.0 | 0.0 | 284.0 | 0.0 | 0.0 | 0.0 | 284.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 | 1000.0 | 0.0 | 0 | 0 | 1000 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 July 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | diff --git a/fineract-e2e-tests-runner/src/test/resources/features/LoanInterestPaymentWaiver.feature b/fineract-e2e-tests-runner/src/test/resources/features/LoanInterestPaymentWaiver.feature new file mode 100644 index 000000000..ea6e7ba54 --- /dev/null +++ b/fineract-e2e-tests-runner/src/test/resources/features/LoanInterestPaymentWaiver.feature @@ -0,0 +1,691 @@ +@LoanInterestPaymentWaiver +Feature: LoanInterestWaiver + + @TestRailId:C3141 + Scenario: Verify Interest Payment Waiver transaction - UC1: LP1 product, cumulative schedule, flat interest, allocation: interest-principal, interestPaymentWaiver on due date with exact amount + When Admin sets the business date to "01 January 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 | + | LP1_INTEREST_FLAT | 01 January 2024 | 1000 | 12 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | INTEREST_PRINCIPAL_PENALTIES_FEES_ORDER | + And Admin successfully approves the loan on "01 January 2024" with "1000" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "1000" EUR transaction amount + When Admin sets the business date to "01 February 2024" + When Admin makes "INTEREST_PAYMENT_WAIVER" transaction with "AUTOPAY" payment type on "01 February 2024" with 260 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 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 750.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 260.0 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 500.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + | 3 | 31 | 01 April 2024 | | 250.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + | 4 | 30 | 01 May 2024 | | 0.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 40.0 | 0.0 | 0.0 | 1040.0 | 260.0 | 0.0 | 0.0 | 780.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + | 01 February 2024 | Interest Payment Waiver | 260.0 | 250.0 | 10.0 | 0.0 | 0.0 | 750.0 | + Then Loan Transactions tab has a "DISBURSEMENT" transaction with date "01 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | 1000.0 | | + | LIABILITY | 145023 | Suspense/Clearing account | | 1000.0 | + Then Loan Transactions tab has a "INTEREST_PAYMENT_WAIVER" transaction with date "01 February 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | | 250.0 | + | ASSET | 112603 | Interest/Fee Receivable | | 10.0 | + | INCOME | 404000 | Interest Income | 260.0 | | + + @TestRailId:C3142 + Scenario: Verify Interest Payment Waiver transaction - UC2: LP1 product, cumulative schedule, flat interest, allocation: fee-interest-principal, interestPaymentWaiver on due date with partial amount + When Admin sets the business date to "01 January 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 | + | LP1_INTEREST_FLAT | 01 January 2024 | 1000 | 12 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | DUE_PENALTY_FEE_INTEREST_PRINCIPAL_IN_ADVANCE_PRINCIPAL_PENALTY_FEE_INTEREST | + And Admin successfully approves the loan on "01 January 2024" with "1000" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "1000" EUR transaction amount + When Admin sets the business date to "15 January 2024" + When Admin adds "LOAN_SNOOZE_FEE" due date charge with "15 January 2024" due date and 20 EUR transaction amount + When Admin sets the business date to "01 February 2024" + When Admin makes "INTEREST_PAYMENT_WAIVER" transaction with "AUTOPAY" payment type on "01 February 2024" with 40 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 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 750.0 | 250.0 | 10.0 | 20.0 | 0.0 | 280.0 | 40.0 | 0.0 | 0.0 | 240.0 | + | 2 | 29 | 01 March 2024 | | 500.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + | 3 | 31 | 01 April 2024 | | 250.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + | 4 | 30 | 01 May 2024 | | 0.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 40.0 | 20.0 | 0.0 | 1060.0 | 40.0 | 0.0 | 0.0 | 1020.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + | 01 February 2024 | Interest Payment Waiver | 40.0 | 10.0 | 10.0 | 20.0 | 0.0 | 990.0 | + Then Loan Transactions tab has a "DISBURSEMENT" transaction with date "01 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | 1000.0 | | + | LIABILITY | 145023 | Suspense/Clearing account | | 1000.0 | + Then Loan Transactions tab has a "INTEREST_PAYMENT_WAIVER" transaction with date "01 February 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | | 10.0 | + | ASSET | 112603 | Interest/Fee Receivable | | 30.0 | + | INCOME | 404000 | Interest Income | 40.0 | | + + @TestRailId:C3143 + Scenario: Verify Interest Payment Waiver transaction - UC3: LP1 product, cumulative schedule, flat interest, allocation: principal-interest, interestPaymentWaiver on due date with partial amount + When Admin sets the business date to "01 January 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 | + | LP1_INTEREST_FLAT | 01 January 2024 | 1000 | 12 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | PRINCIPAL_INTEREST_PENALTIES_FEES_ORDER | + And Admin successfully approves the loan on "01 January 2024" with "1000" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "1000" EUR transaction amount + When Admin sets the business date to "01 February 2024" + When Admin makes "INTEREST_PAYMENT_WAIVER" transaction with "AUTOPAY" payment type on "01 February 2024" with 10 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 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 750.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 10.0 | 0.0 | 0.0 | 250.0 | + | 2 | 29 | 01 March 2024 | | 500.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + | 3 | 31 | 01 April 2024 | | 250.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + | 4 | 30 | 01 May 2024 | | 0.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 40.0 | 0.0 | 0.0 | 1040.0 | 10.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 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + | 01 February 2024 | Interest Payment Waiver | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 990.0 | + Then Loan Transactions tab has a "DISBURSEMENT" transaction with date "01 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | 1000.0 | | + | LIABILITY | 145023 | Suspense/Clearing account | | 1000.0 | + Then Loan Transactions tab has a "INTEREST_PAYMENT_WAIVER" transaction with date "01 February 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | | 10.0 | + | INCOME | 404000 | Interest Income | 10.0 | | + + @TestRailId:C3144 + Scenario: Verify Interest Payment Waiver transaction - UC4: LP1 product, cumulative schedule, flat interest, allocation: principal-interest, interestPaymentWaiver after maturity date, overpayment + When Admin sets the business date to "01 January 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 | + | LP1_INTEREST_FLAT | 01 January 2024 | 1000 | 12 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | PRINCIPAL_INTEREST_PENALTIES_FEES_ORDER | + And Admin successfully approves the loan on "01 January 2024" with "1000" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "1000" EUR transaction amount + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 260 EUR transaction amount + When Admin sets the business date to "01 March 2024" + And Customer makes "AUTOPAY" repayment on "01 March 2024" with 260 EUR transaction amount + When Admin sets the business date to "01 April 2024" + And Customer makes "AUTOPAY" repayment on "01 April 2024" with 260 EUR transaction amount + When Admin sets the business date to "01 May 2024" + And Customer makes "AUTOPAY" repayment on "01 May 2024" with 250 EUR transaction amount + Then Loan status will be "ACTIVE" + Then Loan has 10 outstanding 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 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 750.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 260.0 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 500.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 260.0 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 01 April 2024 | 250.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 260.0 | 0.0 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | | 0.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 250.0 | 0.0 | 0.0 | 10.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 40.0 | 0.0 | 0.0 | 1040.0 | 1030.0 | 0.0 | 0.0 | 10.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + | 01 February 2024 | Repayment | 260.0 | 250.0 | 10.0 | 0.0 | 0.0 | 750.0 | + | 01 March 2024 | Repayment | 260.0 | 250.0 | 10.0 | 0.0 | 0.0 | 500.0 | + | 01 April 2024 | Repayment | 260.0 | 250.0 | 10.0 | 0.0 | 0.0 | 250.0 | + | 01 May 2024 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | +# ---Overpay loan with Interest payment waiver --- + When Admin makes "INTEREST_PAYMENT_WAIVER" transaction with "AUTOPAY" payment type on "01 May 2024" with 20 EUR transaction amount + Then Loan status will be "OVERPAID" + Then Loan has 0 outstanding amount + Then Loan has 10 overpaid 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 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 750.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 260.0 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 500.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 260.0 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 01 April 2024 | 250.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 260.0 | 0.0 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | 01 May 2024 | 0.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 260.0 | 0.0 | 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 | 40.0 | 0.0 | 0.0 | 1040.0 | 1040.0 | 0.0 | 0.0 | 0.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + | 01 February 2024 | Repayment | 260.0 | 250.0 | 10.0 | 0.0 | 0.0 | 750.0 | + | 01 March 2024 | Repayment | 260.0 | 250.0 | 10.0 | 0.0 | 0.0 | 500.0 | + | 01 April 2024 | Repayment | 260.0 | 250.0 | 10.0 | 0.0 | 0.0 | 250.0 | + | 01 May 2024 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 01 May 2024 | Interest Payment Waiver | 20.0 | 0.0 | 10.0 | 0.0 | 0.0 | 0.0 | + | 01 May 2024 | Accrual | 40.0 | 0.0 | 40.0 | 0.0 | 0.0 | 0.0 | + Then Loan Transactions tab has a "DISBURSEMENT" transaction with date "01 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | 1000.0 | | + | LIABILITY | 145023 | Suspense/Clearing account | | 1000.0 | + Then Loan Transactions tab has a "REPAYMENT" transaction with date "01 February 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | | 250.0 | + | ASSET | 112603 | Interest/Fee Receivable | | 10.0 | + | LIABILITY | 145023 | Suspense/Clearing account | 260.0 | | + Then Loan Transactions tab has a "REPAYMENT" transaction with date "01 March 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | | 250.0 | + | ASSET | 112603 | Interest/Fee Receivable | | 10.0 | + | LIABILITY | 145023 | Suspense/Clearing account | 260.0 | | + Then Loan Transactions tab has a "REPAYMENT" transaction with date "01 April 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | | 250.0 | + | ASSET | 112603 | Interest/Fee Receivable | | 10.0 | + | LIABILITY | 145023 | Suspense/Clearing account | 260.0 | | + Then Loan Transactions tab has a "REPAYMENT" transaction with date "01 May 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | | 250.0 | + | LIABILITY | 145023 | Suspense/Clearing account | 250.0 | | + Then Loan Transactions tab has a "INTEREST_PAYMENT_WAIVER" transaction with date "01 May 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112603 | Interest/Fee Receivable | | 10.0 | + | LIABILITY | l1 | Overpayment account | | 10.0 | + | INCOME | 404000 | Interest Income | 20.0 | | + Then Loan Transactions tab has a "ACCRUAL" transaction with date "01 May 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112603 | Interest/Fee Receivable | 40.0 | | + | INCOME | 404000 | Interest Income | | 40.0 | + + @TestRailId:C3145 + Scenario: Verify Interest Payment Waiver transaction - UC5: LP1 product, cumulative schedule, flat interest, allocation: interest-principal, interestPaymentWaiver before due date, repayment on due date, undo interestPaymentWaiver + When Admin sets the business date to "01 January 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 | + | LP1_INTEREST_FLAT | 01 January 2024 | 1000 | 12 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | INTEREST_PRINCIPAL_PENALTIES_FEES_ORDER | + And Admin successfully approves the loan on "01 January 2024" with "1000" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "1000" EUR transaction amount +# --- Interest Payment Waiver before due date with partial amount --- + When Admin sets the business date to "15 January 2024" + When Admin makes "INTEREST_PAYMENT_WAIVER" transaction with "AUTOPAY" payment type on "15 January 2024" with 10 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 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 750.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 10.0 | 10.0 | 0.0 | 250.0 | + | 2 | 29 | 01 March 2024 | | 500.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + | 3 | 31 | 01 April 2024 | | 250.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + | 4 | 30 | 01 May 2024 | | 0.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 40.0 | 0.0 | 0.0 | 1040.0 | 10.0 | 10.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 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + | 15 January 2024 | Interest Payment Waiver | 10.0 | 0.0 | 10.0 | 0.0 | 0.0 | 1000.0 | + Then Loan Transactions tab has a "DISBURSEMENT" transaction with date "01 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | 1000.0 | | + | LIABILITY | 145023 | Suspense/Clearing account | | 1000.0 | + Then Loan Transactions tab has a "INTEREST_PAYMENT_WAIVER" transaction with date "15 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112603 | Interest/Fee Receivable | | 10.0 | + | INCOME | 404000 | Interest Income | 10.0 | | +# --- Repayment on due date for the remaining amount --- + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 250 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 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 750.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 260.0 | 10.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 500.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + | 3 | 31 | 01 April 2024 | | 250.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + | 4 | 30 | 01 May 2024 | | 0.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 40.0 | 0.0 | 0.0 | 1040.0 | 260.0 | 10.0 | 0.0 | 780.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + | 15 January 2024 | Interest Payment Waiver | 10.0 | 0.0 | 10.0 | 0.0 | 0.0 | 1000.0 | + | 01 February 2024 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 750.0 | + Then Loan Transactions tab has a "DISBURSEMENT" transaction with date "01 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | 1000.0 | | + | LIABILITY | 145023 | Suspense/Clearing account | | 1000.0 | + Then Loan Transactions tab has a "INTEREST_PAYMENT_WAIVER" transaction with date "15 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112603 | Interest/Fee Receivable | | 10.0 | + | INCOME | 404000 | Interest Income | 10.0 | | + Then Loan Transactions tab has a "REPAYMENT" transaction with date "01 February 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | | 250.0 | + | LIABILITY | 145023 | Suspense/Clearing account | 250.0 | | +# --- Interest Payment waiver revert --- + When Admin sets the business date to "02 February 2024" + When Customer undo "1"th "Interest Payment Waiver" transaction made on "15 January 2024" + 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 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 750.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 250.0 | 0.0 | 0.0 | 10.0 | + | 2 | 29 | 01 March 2024 | | 500.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + | 3 | 31 | 01 April 2024 | | 250.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + | 4 | 30 | 01 May 2024 | | 0.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 40.0 | 0.0 | 0.0 | 1040.0 | 250.0 | 0.0 | 0.0 | 790.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | + | 15 January 2024 | Interest Payment Waiver | 10.0 | 0.0 | 10.0 | 0.0 | 0.0 | 1000.0 | true | false | + | 01 February 2024 | Repayment | 250.0 | 240.0 | 10.0 | 0.0 | 0.0 | 760.0 | false | true | + Then Loan Transactions tab has a "DISBURSEMENT" transaction with date "01 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | 1000.0 | | + | LIABILITY | 145023 | Suspense/Clearing account | | 1000.0 | + Then Loan Transactions tab has a "INTEREST_PAYMENT_WAIVER" transaction with date "15 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112603 | Interest/Fee Receivable | | 10.0 | + | INCOME | 404000 | Interest Income | 10.0 | | + | ASSET | 112603 | Interest/Fee Receivable | 10.0 | | + | INCOME | 404000 | Interest Income | | 10.0 | + Then Loan Transactions tab has a "REPAYMENT" transaction with date "01 February 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | | 240.0 | + | ASSET | 112603 | Interest/Fee Receivable | | 10.0 | + | LIABILITY | 145023 | Suspense/Clearing account | 250.0 | | + + @TestRailId:C3146 + Scenario: Verify Interest Payment Waiver transaction - UC6: LP1 product, cumulative schedule, flat interest, allocation: interest-principal, interestPaymentWaiver before due date, repayment on due date, chergeback for interestPaymentWaiver + When Admin sets the business date to "01 January 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 | + | LP1_INTEREST_FLAT | 01 January 2024 | 1000 | 12 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | INTEREST_PRINCIPAL_PENALTIES_FEES_ORDER | + And Admin successfully approves the loan on "01 January 2024" with "1000" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "1000" EUR transaction amount +# --- Interest Payment Waiver before due date with partial amount --- + When Admin sets the business date to "15 January 2024" + When Admin makes "INTEREST_PAYMENT_WAIVER" transaction with "AUTOPAY" payment type on "15 January 2024" with 10 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 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 750.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 10.0 | 10.0 | 0.0 | 250.0 | + | 2 | 29 | 01 March 2024 | | 500.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + | 3 | 31 | 01 April 2024 | | 250.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + | 4 | 30 | 01 May 2024 | | 0.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 40.0 | 0.0 | 0.0 | 1040.0 | 10.0 | 10.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 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + | 15 January 2024 | Interest Payment Waiver | 10.0 | 0.0 | 10.0 | 0.0 | 0.0 | 1000.0 | + Then Loan Transactions tab has a "DISBURSEMENT" transaction with date "01 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | 1000.0 | | + | LIABILITY | 145023 | Suspense/Clearing account | | 1000.0 | + Then Loan Transactions tab has a "INTEREST_PAYMENT_WAIVER" transaction with date "15 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112603 | Interest/Fee Receivable | | 10.0 | + | INCOME | 404000 | Interest Income | 10.0 | | +# --- Repayment on due date for the remaining amount --- + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 250 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 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 750.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 260.0 | 10.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 500.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + | 3 | 31 | 01 April 2024 | | 250.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + | 4 | 30 | 01 May 2024 | | 0.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 40.0 | 0.0 | 0.0 | 1040.0 | 260.0 | 10.0 | 0.0 | 780.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + | 15 January 2024 | Interest Payment Waiver | 10.0 | 0.0 | 10.0 | 0.0 | 0.0 | 1000.0 | + | 01 February 2024 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 750.0 | + Then Loan Transactions tab has a "DISBURSEMENT" transaction with date "01 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | 1000.0 | | + | LIABILITY | 145023 | Suspense/Clearing account | | 1000.0 | + Then Loan Transactions tab has a "INTEREST_PAYMENT_WAIVER" transaction with date "15 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112603 | Interest/Fee Receivable | | 10.0 | + | INCOME | 404000 | Interest Income | 10.0 | | + Then Loan Transactions tab has a "REPAYMENT" transaction with date "01 February 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | | 250.0 | + | LIABILITY | 145023 | Suspense/Clearing account | 250.0 | | +# --- Chargeback for Interest Payment waiver --- + And Customer makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" repayment on "01 February 2024" with 10 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 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 750.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 260.0 | 10.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 500.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 10.0 | 10.0 | 0.0 | 250.0 | + | 3 | 31 | 01 April 2024 | | 250.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + | 4 | 30 | 01 May 2024 | | 0.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 40.0 | 0.0 | 0.0 | 1040.0 | 270.0 | 20.0 | 0.0 | 770.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | + | 15 January 2024 | Interest Payment Waiver | 10.0 | 0.0 | 10.0 | 0.0 | 0.0 | 1000.0 | false | false | + | 01 February 2024 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 750.0 | false | false | + | 01 February 2024 | Repayment | 10.0 | 0.0 | 10.0 | 0.0 | 0.0 | 750.0 | false | false | + Then Loan Transactions tab has a "DISBURSEMENT" transaction with date "01 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | 1000.0 | | + | LIABILITY | 145023 | Suspense/Clearing account | | 1000.0 | + Then Loan Transactions tab has a "INTEREST_PAYMENT_WAIVER" transaction with date "15 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112603 | Interest/Fee Receivable | | 10.0 | + | INCOME | 404000 | Interest Income | 10.0 | | + Then Loan Transactions tab has a "REPAYMENT" transaction with date "01 February 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | | 250.0 | + | LIABILITY | 145023 | Suspense/Clearing account | 250.0 | | + Then Loan Transactions tab has a "REPAYMENT" transaction with date "01 February 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112603 | Interest/Fee Receivable | | 10.0 | + | LIABILITY | 145023 | Suspense/Clearing account | 10.0 | | + + @TestRailId:C3147 + Scenario: Verify Interest Payment Waiver transaction - UC7: LP1 product, cumulative schedule, flat interest, allocation: interest-principal, interestPaymentWaiver puts loan in overpaid status when transaction amount is greater than balance + When Admin sets the business date to "01 January 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 | + | LP1_INTEREST_FLAT | 01 January 2024 | 1000 | 12 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | INTEREST_PRINCIPAL_PENALTIES_FEES_ORDER | + And Admin successfully approves the loan on "01 January 2024" with "1000" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "1000" EUR transaction amount + When Admin sets the business date to "01 February 2024" + When Admin makes "INTEREST_PAYMENT_WAIVER" transaction with "AUTOPAY" payment type on "01 February 2024" with 1100 EUR transaction amount + Then Loan status will be "OVERPAID" + Then Loan has 0 outstanding amount + Then Loan has 60 overpaid 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 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 750.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 260.0 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 February 2024 | 500.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 260.0 | 260.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 01 February 2024 | 250.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 260.0 | 260.0 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | 01 February 2024 | 0.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 260.0 | 260.0 | 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 | 40.0 | 0.0 | 0.0 | 1040.0 | 1040.0 | 780.0 | 0.0 | 0.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + | 01 February 2024 | Interest Payment Waiver | 1100.0 | 1000.0 | 40.0 | 0.0 | 0.0 | 0.0 | + | 01 February 2024 | Accrual | 40.0 | 0.0 | 40.0 | 0.0 | 0.0 | 0.0 | + Then Loan Transactions tab has a "DISBURSEMENT" transaction with date "01 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | 1000.0 | | + | LIABILITY | 145023 | Suspense/Clearing account | | 1000.0 | + Then Loan Transactions tab has a "INTEREST_PAYMENT_WAIVER" transaction with date "01 February 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | | 1000.0 | + | ASSET | 112603 | Interest/Fee Receivable | | 40.0 | + | LIABILITY | l1 | Overpayment account | | 60.0 | + | INCOME | 404000 | Interest Income | 1100.0 | | + Then Loan Transactions tab has a "ACCRUAL" transaction with date "01 February 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112603 | Interest/Fee Receivable | 40.0 | | + | INCOME | 404000 | Interest Income | | 40.0 | + + @TestRailId:C3148 + Scenario: Verify Interest Payment Waiver transaction - UC8: LP1 product, cumulative schedule, flat interest, allocation: interest-principal, interestPaymentWaiver puts loan from closed to overpaid status + When Admin sets the business date to "01 January 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 | + | LP1_INTEREST_FLAT | 01 January 2024 | 1000 | 12 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | INTEREST_PRINCIPAL_PENALTIES_FEES_ORDER | + And Admin successfully approves the loan on "01 January 2024" with "1000" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "1000" EUR transaction amount + When Admin sets the business date to "15 January 2024" + And Customer makes "AUTOPAY" repayment on "15 January 2024" with 1040 EUR transaction amount + Then Loan status will be "CLOSED_OBLIGATIONS_MET" + Then Loan has 0 outstanding amount + When Admin sets the business date to "01 February 2024" + When Admin makes "INTEREST_PAYMENT_WAIVER" transaction with "AUTOPAY" payment type on "01 February 2024" with 100 EUR transaction amount + Then Loan status will be "OVERPAID" + Then Loan has 0 outstanding amount + Then Loan has 100 overpaid 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 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 15 January 2024 | 750.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 260.0 | 260.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 January 2024 | 500.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 260.0 | 260.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 15 January 2024 | 250.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 260.0 | 260.0 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | 15 January 2024 | 0.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 260.0 | 260.0 | 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 | 40.0 | 0.0 | 0.0 | 1040.0 | 1040.0 | 1040.0 | 0.0 | 0.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + | 15 January 2024 | Repayment | 1040.0 | 1000.0 | 40.0 | 0.0 | 0.0 | 0.0 | + | 15 January 2024 | Accrual | 40.0 | 0.0 | 40.0 | 0.0 | 0.0 | 0.0 | + | 01 February 2024 | Interest Payment Waiver | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + Then Loan Transactions tab has a "DISBURSEMENT" transaction with date "01 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | 1000.0 | | + | LIABILITY | 145023 | Suspense/Clearing account | | 1000.0 | + Then Loan Transactions tab has a "REPAYMENT" transaction with date "15 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | | 1000.0 | + | ASSET | 112603 | Interest/Fee Receivable | | 40.0 | + | LIABILITY | 145023 | Suspense/Clearing account | 1040.0 | | + Then Loan Transactions tab has a "ACCRUAL" transaction with date "15 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112603 | Interest/Fee Receivable | 40.0 | | + | INCOME | 404000 | Interest Income | | 40.0 | + Then Loan Transactions tab has a "INTEREST_PAYMENT_WAIVER" transaction with date "01 February 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | LIABILITY | l1 | Overpayment account | | 100.0 | + | INCOME | 404000 | Interest Income | 100.0 | | + + @TestRailId:C3149 + Scenario: Verify Interest Payment Waiver transaction - UC9: LP1 product, cumulative schedule, flat interest, allocation: interest-principal, loan overdue calculation is updated upon interestPaymentWaiver transaction + When Admin sets the business date to "01 January 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 | + | LP1_INTEREST_FLAT | 01 January 2024 | 1000 | 12 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | INTEREST_PRINCIPAL_PENALTIES_FEES_ORDER | + And Admin successfully approves the loan on "01 January 2024" with "1000" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "1000" EUR transaction amount + When Admin sets the business date to "01 June 2024" + When Admin runs inline COB job for Loan + Then Admin checks that delinquency range is: "RANGE_90" and has delinquentDate "2024-02-04" + Then Loan status will be "ACTIVE" + Then Loan has 1040 outstanding amount + When Admin sets the business date to "02 June 2024" + When Admin makes "INTEREST_PAYMENT_WAIVER" transaction with "AUTOPAY" payment type on "02 June 2024" with 1040 EUR transaction amount + Then Admin checks that delinquency range is: "NO_DELINQUENCY" and has delinquentDate "" + Then Loan status will be "CLOSED_OBLIGATIONS_MET" + Then Loan has 0 outstanding 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 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 02 June 2024 | 750.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 260.0 | 0.0 | 260.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 02 June 2024 | 500.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 260.0 | 0.0 | 260.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 02 June 2024 | 250.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 260.0 | 0.0 | 260.0 | 0.0 | + | 4 | 30 | 01 May 2024 | 02 June 2024 | 0.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 260.0 | 0.0 | 260.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 | 40.0 | 0.0 | 0.0 | 1040.0 | 1040.0 | 0.0 | 1040.0 | 0.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + | 01 February 2024 | Accrual | 10.0 | 0.0 | 10.0 | 0.0 | 0.0 | 0.0 | + | 01 March 2024 | Accrual | 10.0 | 0.0 | 10.0 | 0.0 | 0.0 | 0.0 | + | 01 April 2024 | Accrual | 10.0 | 0.0 | 10.0 | 0.0 | 0.0 | 0.0 | + | 01 May 2024 | Accrual | 10.0 | 0.0 | 10.0 | 0.0 | 0.0 | 0.0 | + | 02 June 2024 | Interest Payment Waiver | 1040.0 | 1000.0 | 40.0 | 0.0 | 0.0 | 0.0 | + Then Loan Transactions tab has a "DISBURSEMENT" transaction with date "01 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | 1000.0 | | + | LIABILITY | 145023 | Suspense/Clearing account | | 1000.0 | + Then Loan Transactions tab has a "ACCRUAL" transaction with date "01 February 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112603 | Interest/Fee Receivable | 10.0 | | + | INCOME | 404000 | Interest Income | | 10.0 | + Then Loan Transactions tab has a "ACCRUAL" transaction with date "01 March 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112603 | Interest/Fee Receivable | 10.0 | | + | INCOME | 404000 | Interest Income | | 10.0 | + Then Loan Transactions tab has a "ACCRUAL" transaction with date "01 April 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112603 | Interest/Fee Receivable | 10.0 | | + | INCOME | 404000 | Interest Income | | 10.0 | + Then Loan Transactions tab has a "ACCRUAL" transaction with date "01 May 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112603 | Interest/Fee Receivable | 10.0 | | + | INCOME | 404000 | Interest Income | | 10.0 | + Then Loan Transactions tab has a "INTEREST_PAYMENT_WAIVER" transaction with date "02 June 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | | 1000.0 | + | ASSET | 112603 | Interest/Fee Receivable | | 40.0 | + | INCOME | 404000 | Interest Income | 1040.0 | | + + @TestRailId:C3150 + Scenario: Verify Interest Payment Waiver transaction - UC10: LP1 product, cumulative schedule, flat interest, allocation: interest-principal, interestPaymentWaiver and charge-off + When Admin sets the business date to "01 January 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 | + | LP1_INTEREST_FLAT | 01 January 2024 | 1000 | 12 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | INTEREST_PRINCIPAL_PENALTIES_FEES_ORDER | + And Admin successfully approves the loan on "01 January 2024" with "1000" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "1000" EUR transaction amount + When Admin sets the business date to "01 February 2024" + When Admin makes "INTEREST_PAYMENT_WAIVER" transaction with "AUTOPAY" payment type on "01 February 2024" with 260 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 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 750.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 260.0 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 500.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + | 3 | 31 | 01 April 2024 | | 250.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + | 4 | 30 | 01 May 2024 | | 0.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 40.0 | 0.0 | 0.0 | 1040.0 | 260.0 | 0.0 | 0.0 | 780.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + | 01 February 2024 | Interest Payment Waiver | 260.0 | 250.0 | 10.0 | 0.0 | 0.0 | 750.0 | + Then Loan Transactions tab has a "DISBURSEMENT" transaction with date "01 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | 1000.0 | | + | LIABILITY | 145023 | Suspense/Clearing account | | 1000.0 | + Then Loan Transactions tab has a "INTEREST_PAYMENT_WAIVER" transaction with date "01 February 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | | 250.0 | + | ASSET | 112603 | Interest/Fee Receivable | | 10.0 | + | INCOME | 404000 | Interest Income | 260.0 | | + When Admin sets the business date to "02 February 2024" + And Admin does charge-off the loan on "02 February 2024" + 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 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 750.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 260.0 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 500.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + | 3 | 31 | 01 April 2024 | | 250.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + | 4 | 30 | 01 May 2024 | | 0.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 40.0 | 0.0 | 0.0 | 1040.0 | 260.0 | 0.0 | 0.0 | 780.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + | 01 February 2024 | Interest Payment Waiver | 260.0 | 250.0 | 10.0 | 0.0 | 0.0 | 750.0 | + | 02 February 2024 | Charge-off | 780.0 | 750.0 | 30.0 | 0.0 | 0.0 | 0.0 | + Then Loan Transactions tab has a "DISBURSEMENT" transaction with date "01 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | 1000.0 | | + | LIABILITY | 145023 | Suspense/Clearing account | | 1000.0 | + Then Loan Transactions tab has a "INTEREST_PAYMENT_WAIVER" transaction with date "01 February 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | | 250.0 | + | ASSET | 112603 | Interest/Fee Receivable | | 10.0 | + | INCOME | 404000 | Interest Income | 260.0 | | + Then Loan Transactions tab has a "CHARGE_OFF" transaction with date "02 February 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | | 750.0 | + | ASSET | 112603 | Interest/Fee Receivable | | 30.0 | + | EXPENSE | 744007 | Credit Loss/Bad Debt | 750.0 | | + | INCOME | 404001 | Interest Income Charge Off | 30.0 | | + + @TestRailId:C3151 + Scenario: Verify Interest Payment Waiver transaction - UC11: LP1 product, cumulative schedule, flat interest, allocation: interest-principal, interestPaymentWaiver after charge-off + When Admin sets the business date to "01 January 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 | + | LP1_INTEREST_FLAT | 01 January 2024 | 1000 | 12 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | INTEREST_PRINCIPAL_PENALTIES_FEES_ORDER | + And Admin successfully approves the loan on "01 January 2024" with "1000" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "1000" EUR transaction amount + When Admin sets the business date to "15 January 2024" + And Admin does charge-off the loan on "15 January 2024" + 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 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 750.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + | 2 | 29 | 01 March 2024 | | 500.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + | 3 | 31 | 01 April 2024 | | 250.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + | 4 | 30 | 01 May 2024 | | 0.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 40.0 | 0.0 | 0.0 | 1040.0 | 0.0 | 0.0 | 0.0 | 1040.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + | 15 January 2024 | Charge-off | 1040.0 | 1000.0 | 40.0 | 0.0 | 0.0 | 0.0 | + Then Loan Transactions tab has a "DISBURSEMENT" transaction with date "01 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | 1000.0 | | + | LIABILITY | 145023 | Suspense/Clearing account | | 1000.0 | + Then Loan Transactions tab has a "CHARGE_OFF" transaction with date "15 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | | 1000.0 | + | ASSET | 112603 | Interest/Fee Receivable | | 40.0 | + | EXPENSE | 744007 | Credit Loss/Bad Debt | 1000.0 | | + | INCOME | 404001 | Interest Income Charge Off | 40.0 | | + When Admin sets the business date to "01 February 2024" + When Admin makes "INTEREST_PAYMENT_WAIVER" transaction with "AUTOPAY" payment type on "01 February 2024" with 260 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 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 750.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 260.0 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 500.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + | 3 | 31 | 01 April 2024 | | 250.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + | 4 | 30 | 01 May 2024 | | 0.0 | 250.0 | 10.0 | 0.0 | 0.0 | 260.0 | 0.0 | 0.0 | 0.0 | 260.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000 | 40.0 | 0.0 | 0.0 | 1040.0 | 260.0 | 0.0 | 0.0 | 780.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + | 15 January 2024 | Charge-off | 1040.0 | 1000.0 | 40.0 | 0.0 | 0.0 | 0.0 | + | 01 February 2024 | Interest Payment Waiver | 260.0 | 250.0 | 10.0 | 0.0 | 0.0 | 750.0 | + Then Loan Transactions tab has a "DISBURSEMENT" transaction with date "01 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | 1000.0 | | + | LIABILITY | 145023 | Suspense/Clearing account | | 1000.0 | + Then Loan Transactions tab has a "CHARGE_OFF" transaction with date "15 January 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | | 1000.0 | + | ASSET | 112603 | Interest/Fee Receivable | | 40.0 | + | EXPENSE | 744007 | Credit Loss/Bad Debt | 1000.0 | | + | INCOME | 404001 | Interest Income Charge Off | 40.0 | | + Then Loan Transactions tab has a "INTEREST_PAYMENT_WAIVER" transaction with date "01 February 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | INCOME | 404001 | Interest Income Charge Off | | 260.0 | + | INCOME | 404000 | Interest Income | 260.0 | | diff --git a/fineract-e2e-tests-runner/src/test/resources/features/LoanProduct.feature b/fineract-e2e-tests-runner/src/test/resources/features/LoanProduct.feature index 49ac3a303..271f79471 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/LoanProduct.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/LoanProduct.feature @@ -1,7 +1,7 @@ @Product Feature: LoanProduct - @Scenario1 + @Scenario1 @TestRailId:C52 Scenario: As a user I would like to fully repay the loan in time When Admin sets the business date to "12 December 2021" When Admin creates a client with random data @@ -14,7 +14,7 @@ Feature: LoanProduct Then Repayment transaction is created with 1000 amount and "AUTOPAY" type Then Loan has 0 outstanding amount - @Scenario2 + @Scenario2 @TestRailId:C53 Scenario: As a user I would like to fully repay a loan which was disbursed 2 times When Admin sets the business date to "1 June 2022" When Admin creates a client with random data @@ -30,7 +30,7 @@ Feature: LoanProduct Then Repayment transaction is created with 1500 amount and "AUTOPAY" type Then Loan has 0 outstanding amount - @Scenario3 + @Scenario3 @TestRailId:C54 Scenario: As a user I would like to fully repay a multi disbursed loan with 2 repayments When Admin sets the business date to "1 June 2022" When Admin creates a client with random data @@ -49,7 +49,7 @@ Feature: LoanProduct And Customer makes "AUTOPAY" repayment on "15 July 2022" with 1000 EUR transaction amount Then Loan has 0 outstanding amount - @Scenario4 + @Scenario4 @TestRailId:C55 Scenario: As a user I would like to multi disburse a loan which was previously fully paid When Admin sets the business date to "1 June 2022" When Admin creates a client with random data @@ -68,7 +68,7 @@ Feature: LoanProduct And Customer makes "AUTOPAY" repayment on "15 July 2022" with 500 EUR transaction amount Then Loan has 0 outstanding amount - @Scenario5 + @Scenario5 @TestRailId:C57 Scenario: As a user I would like to fully repay a loan and check a repayment reversal with NSF fee When Admin sets the business date to "1 June 2022" When Admin creates a client with random data @@ -88,7 +88,7 @@ Feature: LoanProduct And Customer makes "AUTOPAY" repayment on "18 June 2022" with 1010 EUR transaction amount Then Loan has 0 outstanding amount - @Scenario6 + @Scenario6 @TestRailId:C58 Scenario: As a user I would like to repay the half amount of the loan and check a repayment reversal with NSF fee When Admin sets the business date to "1 June 2022" When Admin creates a client with random data @@ -108,7 +108,7 @@ Feature: LoanProduct And Customer makes "AUTOPAY" repayment on "18 June 2022" with 1010 EUR transaction amount Then Loan has 0 outstanding amount - @Scenario7 + @Scenario7 @TestRailId:C59 Scenario: As a user I would like to fully repay a loan then reverse the repayment + add an NSF fee after the 1 month period When Admin sets the business date to "1 June 2022" When Admin creates a client with random data @@ -128,7 +128,7 @@ Feature: LoanProduct And Customer makes "AUTOPAY" repayment on "5 July 2022" with 1010 EUR transaction amount Then Loan has 0 outstanding amount - @Scenario8 + @Scenario8 @TestRailId:C60 Scenario: As a user I would like to repay the half amount of the loan and do a refund When Admin sets the business date to "1 June 2022" When Admin creates a client with random data @@ -144,7 +144,7 @@ Feature: LoanProduct When Refund happens on "1 July 2022" with 500 EUR transaction amount Then Loan has 0 outstanding amount - @Scenario9 + @Scenario9 @TestRailId:C61 Scenario: As a user I would like to repay the half amount of the loan and do a refund + repayment reversal on the repayment When Admin sets the business date to "1 June 2022" When Admin creates a client with random data @@ -162,7 +162,7 @@ Feature: LoanProduct When Customer makes a repayment undo on "25 June 2022" Then Loan has 500 outstanding amount - @Scenario10 + @Scenario10 @TestRailId:C62 Scenario: As a user I would like to repay the half amount of the loan and do a refund + repayment reversal + refund reversal When Admin sets the business date to "1 June 2022" When Admin creates a client with random data