diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/MathUtil.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/MathUtil.java index a60b7e736f1..abfc246fb50 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/MathUtil.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/MathUtil.java @@ -269,9 +269,13 @@ public static BigDecimal add(BigDecimal first, BigDecimal second, MathContext mc /** @return sum the values considering null values */ public static BigDecimal add(BigDecimal... amounts) { + return add(MoneyHelper.getMathContext(), amounts); + } + + public static BigDecimal add(MathContext mc, BigDecimal... amounts) { BigDecimal result = null; for (BigDecimal amount : amounts) { - result = add(result, amount, MoneyHelper.getMathContext()); + result = add(result, amount, mc); } return result; } diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/MoneyHelper.java b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/MoneyHelper.java index 1a99e73117e..8300a463b5e 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/MoneyHelper.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/MoneyHelper.java @@ -33,7 +33,7 @@ public class MoneyHelper { private static RoundingMode roundingMode = null; private static MathContext mathContext; - private static final int PRECISION = 12; + public static final int PRECISION = 19; private static ConfigurationDomainService staticConfigurationDomainService; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/loanproduct/DefaultLoanProduct.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/loanproduct/DefaultLoanProduct.java index 7b3557afa8e..3ec0f6c15f2 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/loanproduct/DefaultLoanProduct.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/loanproduct/DefaultLoanProduct.java @@ -93,6 +93,8 @@ public enum DefaultLoanProduct implements LoanProduct { LP2_ADV_PYMNT_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR, // LP2_NO_INTEREST_RECALCULATION_CHARGEBACK_ALLOCATION_INTEREST_FIRST, // LP2_NO_INTEREST_RECALCULATION_CHARGEBACK_ALLOCATION_PRINCIPAL_FIRST, // + LP2_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR_LAST_INSTALLMENT_STRATEGY, // + LP2_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR_LAST_INSTALLMENT_STRATEGY, // ; @Override diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/global/LoanProductGlobalInitializerStep.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/global/LoanProductGlobalInitializerStep.java index a2d2c0b8b76..ccbea541b5e 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/global/LoanProductGlobalInitializerStep.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/global/LoanProductGlobalInitializerStep.java @@ -1267,7 +1267,7 @@ public void initialize() throws Exception { LoanProductPaymentAllocationRule.AllocationTypesEnum.DUE_INTEREST, // LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_PENALTY, // LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_FEE, // - LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_PRINCIPAL, + LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_PRINCIPAL, // LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_INTEREST), // createPaymentAllocation("GOODWILL_CREDIT", "LAST_INSTALLMENT"), // createPaymentAllocation("MERCHANT_ISSUED_REFUND", "REAMORTIZATION"), // @@ -1645,6 +1645,77 @@ public void initialize() throws Exception { .createLoanProduct(loanProductsRequestChargebackAllocationPrincipalFirst).execute(); TestContext.INSTANCE.set(TestContextKey.LP2_NO_INTEREST_RECALCULATION_CHARGEBACK_ALLOCATION_PRINCIPAL_FIRST_RESPONSE, loanProductsResponseChargebackAllocationPrincipalFirst); + + // LP2 with progressive loan schedule + horizontal + interest EMI + 360/30 + + // accelerate-maturity chargeOff behaviour + last installment strategy + // (LP2_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR_LAST_INSTALLMENT_STRATEGY) + final String name71 = DefaultLoanProduct.LP2_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR_LAST_INSTALLMENT_STRATEGY + .getName(); + + final PostLoanProductsRequest loanProductsRequestAdvCustomInterestRecalculationAccelerateMaturityChargeOffBehaviourLastInstallmentStrategyProgressiveLoanSchedule = loanProductsRequestFactory + .defaultLoanProductsRequestLP2InterestDailyRecalculation()// + .name(name71)// + .paymentAllocation(List.of(// + createPaymentAllocation("DEFAULT", "LAST_INSTALLMENT", + LoanProductPaymentAllocationRule.AllocationTypesEnum.PAST_DUE_PENALTY, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.PAST_DUE_FEE, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.PAST_DUE_INTEREST, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.PAST_DUE_PRINCIPAL, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.DUE_PENALTY, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.DUE_FEE, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.DUE_PRINCIPAL, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.DUE_INTEREST, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_PENALTY, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_FEE, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_INTEREST, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_PRINCIPAL))) // + .chargeOffBehaviour("ACCELERATE_MATURITY");// + final Response responseLoanProductsRequestAdvCustomInterestRecalculationAccelerateMaturityChargeOffBehaviourLastInstallmentStrategyProgressiveLoanSchedule = loanProductsApi + .createLoanProduct( + loanProductsRequestAdvCustomInterestRecalculationAccelerateMaturityChargeOffBehaviourLastInstallmentStrategyProgressiveLoanSchedule) + .execute(); + TestContext.INSTANCE.set( + TestContextKey.DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR_LAST_INSTALLMENT_STRATEGY, + responseLoanProductsRequestAdvCustomInterestRecalculationAccelerateMaturityChargeOffBehaviourLastInstallmentStrategyProgressiveLoanSchedule); + + // LP2 with progressive loan schedule + horizontal + accelerate-maturity chargeOff behaviour + last installment + // strategy + // (LP2_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR_LAST_INSTALLMENT_STRATEGY) + final String name72 = DefaultLoanProduct.LP2_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR_LAST_INSTALLMENT_STRATEGY.getName(); + + final PostLoanProductsRequest loanProductsRequestAdvCustomAccelerateMaturityChargeOffBehaviourLastInstallmentStrategyProgressiveLoanSchedule = loanProductsRequestFactory + .defaultLoanProductsRequestLP2()// + .name(name72)// + .enableDownPayment(false)// + .enableAutoRepaymentForDownPayment(null)// + .disbursedAmountPercentageForDownPayment(null)// + .transactionProcessingStrategyCode(ADVANCED_PAYMENT_ALLOCATION.getValue())// + .loanScheduleType("PROGRESSIVE") // + .loanScheduleProcessingType("HORIZONTAL")// + .interestRateFrequencyType(3)// + .maxInterestRatePerPeriod(10.0)// + .paymentAllocation(List.of(// + createPaymentAllocation("DEFAULT", "LAST_INSTALLMENT", + LoanProductPaymentAllocationRule.AllocationTypesEnum.PAST_DUE_PENALTY, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.PAST_DUE_FEE, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.PAST_DUE_INTEREST, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.PAST_DUE_PRINCIPAL, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.DUE_PENALTY, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.DUE_FEE, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.DUE_PRINCIPAL, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.DUE_INTEREST, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_PENALTY, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_FEE, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_INTEREST, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_PRINCIPAL))) // + .chargeOffBehaviour("ACCELERATE_MATURITY");// + final Response responseLoanProductsRequestAdvCustomAccelerateMaturityChargeOffBehaviourLastInstallmentStrategyProgressiveLoanSchedule = loanProductsApi + .createLoanProduct( + loanProductsRequestAdvCustomAccelerateMaturityChargeOffBehaviourLastInstallmentStrategyProgressiveLoanSchedule) + .execute(); + TestContext.INSTANCE.set( + TestContextKey.DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR_LAST_INSTALLMENT_STRATEGY, + responseLoanProductsRequestAdvCustomAccelerateMaturityChargeOffBehaviourLastInstallmentStrategyProgressiveLoanSchedule); } public static AdvancedPaymentData createPaymentAllocation(String transactionType, String futureInstallmentAllocationRule, 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 1d1185cc892..9e452146796 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 @@ -19,6 +19,7 @@ package org.apache.fineract.test.stepdef.loan; import static org.apache.fineract.test.data.TransactionProcessingStrategyCode.ADVANCED_PAYMENT_ALLOCATION; +import static org.apache.fineract.test.data.loanproduct.DefaultLoanProduct.LP2_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR_LAST_INSTALLMENT_STRATEGY; import static org.apache.fineract.test.data.loanproduct.DefaultLoanProduct.LP2_ADV_PYMNT_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR; import static org.apache.fineract.test.data.loanproduct.DefaultLoanProduct.LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF_BEHAVIOUR; import static org.apache.fineract.test.data.loanproduct.DefaultLoanProduct.LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF_BEHAVIOUR; @@ -3018,6 +3019,13 @@ public void createLoanWithoutInterestRecalculationAndAccelerateMaturityChargeOff DefaultLoanProduct.valueOf(LP2_ADV_PYMNT_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR.getName())); } + @When("Admin creates a new accelerate maturity charge-off Loan with last installment strategy, without interest recalculation and with date: {string}") + public void createLoanWithoutInterestRecalculationAndAccelerateMaturityChargeOffBehaviourLastInstallmentStrategy(final String date) + throws IOException { + createLoanWithLoanBehaviour(date, false, + DefaultLoanProduct.valueOf(LP2_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR_LAST_INSTALLMENT_STRATEGY.getName())); + } + private void createLoanWithLoanBehaviour(final String date, final boolean isInterestRecalculation, final DefaultLoanProduct product) throws IOException { final Response clientResponse = testContext().get(TestContextKey.CLIENT_CREATE_RESPONSE); diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/TestContextKey.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/TestContextKey.java index d7f5c0872cc..0be61204421 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/TestContextKey.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/TestContextKey.java @@ -123,6 +123,8 @@ public abstract class TestContextKey { public static final String DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR = "loanProductCreateResponseLP2AdvancedPaymentAccelerateMaturityChargeOffBehaviour"; public static final String LP2_NO_INTEREST_RECALCULATION_CHARGEBACK_ALLOCATION_INTEREST_FIRST_RESPONSE = "loanProductCreateResponseLP2NoInterestRecalculationChargebackAllocationInterestFirst"; public static final String LP2_NO_INTEREST_RECALCULATION_CHARGEBACK_ALLOCATION_PRINCIPAL_FIRST_RESPONSE = "loanProductCreateResponseLP2NoInterestRecalculationChargebackAllocationPrincipalFirst"; + public static final String DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR_LAST_INSTALLMENT_STRATEGY = "loanProductCreateResponseLP2AdvancedPaymentInterestDailyInterestRecalculationAccelerateMaturityChargeOffBehaviourLastInstallmentStrategy"; + public static final String DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR_LAST_INSTALLMENT_STRATEGY = "loanProductCreateResponseLP2AdvancedPaymentAccelerateMaturityChargeOffBehaviourLastInstallmentStrategy"; public static final String CHARGE_FOR_LOAN_PERCENT_LATE_CREATE_RESPONSE = "ChargeForLoanPercentLateCreateResponse"; public static final String CHARGE_FOR_LOAN_PERCENT_LATE_AMOUNT_PLUS_INTEREST_CREATE_RESPONSE = "ChargeForLoanPercentLateAmountPlusInterestCreateResponse"; public static final String CHARGE_FOR_LOAN_PERCENT_PROCESSING_CREATE_RESPONSE = "ChargeForLoanPercentProcessingCreateResponse"; diff --git a/fineract-e2e-tests-runner/src/test/resources/features/0_COB.feature b/fineract-e2e-tests-runner/src/test/resources/features/0_COB.feature index afefc07b64f..b0c932a0282 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/0_COB.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/0_COB.feature @@ -1,7 +1,7 @@ @COBFeature Feature: COBFeature - @TestRailId:C2501 + @Skip @TestRailId:C2501 Scenario: As an admin I would like to see that last closed business date got updated after COB catch up job finished When Admin sets the business date to "01 January 2022" When Admin creates a client with random data diff --git a/fineract-e2e-tests-runner/src/test/resources/features/EMICalculation.feature b/fineract-e2e-tests-runner/src/test/resources/features/EMICalculation.feature index e9ae211dbef..0fdd9a7baf0 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/EMICalculation.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/EMICalculation.feature @@ -4557,240 +4557,701 @@ Feature: EMI calculation and repayment schedule checks for interest bearing loan | 11 May 2024 | Credit Balance Refund | 514.01 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | Then Loan status will be "CLOSED_OBLIGATIONS_MET" - @TestRailId:C3288 - Scenario: Verify the recalculated EMI after interest rate change on the repayment schedule + @TestRailId:C3304 + Scenario: UC11 - Single disbursement, multiple partial refund within first installment period When Admin sets the business date to "01 January 2024" When Admin creates a client with random data - When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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 - When Admin runs inline COB job for Loan - When Admin sets the business date to "15 January 2024" - 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 - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 33.91 EUR transaction amount - When Admin creates and approves Loan reschedule with the following data: - | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | - | 02 February 2024 | 01 February 2024 | | | | | 4 | - When Admin runs inline COB job for Loan - When Admin sets the business date to "02 February 2024" - When Admin runs inline COB job for Loan - 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 66.56 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 16.9 | 16.9 | 0.0 | 0.11 | - | 3 | 31 | 01 April 2024 | | 50.17 | 16.39 | 0.44 | 0.0 | 0.0 | 16.83 | 0.0 | 0.0 | 0.0 | 16.83 | - | 4 | 30 | 01 May 2024 | | 33.51 | 16.66 | 0.17 | 0.0 | 0.0 | 16.83 | 0.0 | 0.0 | 0.0 | 16.83 | - | 5 | 31 | 01 June 2024 | | 16.79 | 16.72 | 0.11 | 0.0 | 0.0 | 16.83 | 0.0 | 0.0 | 0.0 | 16.83 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.79 | 0.06 | 0.0 | 0.0 | 16.85 | 0.0 | 0.0 | 0.0 | 16.85 | + | 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_INTEREST_REFUND_FULL | 01 January 2024 | 1000 | 9.9 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 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 sets the business date to "14 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 | | 753.25 | 246.75 | 8.39 | 0.0 | 0.0 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | + | 2 | 29 | 01 March 2024 | | 504.02 | 249.23 | 5.91 | 0.0 | 0.0 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | + | 3 | 31 | 01 April 2024 | | 253.11 | 250.91 | 4.23 | 0.0 | 0.0 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | + | 4 | 30 | 01 May 2024 | | 0.0 | 253.11 | 2.05 | 0.0 | 0.0 | 255.16 | 0.0 | 0.0 | 0.0 | 255.16 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.36 | 0.0 | 0.0 | 101.36 | 33.91 | 16.9 | 0.0 | 67.45 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 20.58 | 0.0 | 0.0 | 1020.58 | 0.0 | 0.0 | 0.0 | 1020.58 | 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 | - | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 15 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 16 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 17 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 18 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 19 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 20 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 21 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 22 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 23 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 24 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 25 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 26 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 27 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 28 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 29 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 30 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 31 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 01 February 2024 | Repayment | 33.91 | 33.33 | 0.58 | 0.0 | 0.0 | 66.67 | false | false | - | 01 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | + When Customer makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "14 January 2024" with 500 EUR transaction amount and system-generated Idempotency key + When Admin sets the business date to "22 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 | 14 January 2024 | 748.38 | 251.62 | 3.52 | 0.0 | 0.0 | 255.14 | 255.14 | 255.14 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 499.62 | 248.76 | 6.38 | 0.0 | 0.0 | 255.14 | 246.62 | 246.62 | 0.0 | 8.52 | + | 3 | 31 | 01 April 2024 | | 248.67 | 250.95 | 4.19 | 0.0 | 0.0 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | + | 4 | 30 | 01 May 2024 | | 0.0 | 248.67 | 2.02 | 0.0 | 0.0 | 250.69 | 0.0 | 0.0 | 0.0 | 250.69 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 16.11 | 0.0 | 0.0 | 1016.11 | 501.76 | 501.76 | 0.0 | 514.35 | + 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 | + | 14 January 2024 | Merchant Issued Refund | 500.0 | 496.48 | 3.52 | 0.0 | 0.0 | 503.52 | false | false | + | 14 January 2024 | Interest Refund | 1.76 | 1.76 | 0.0 | 0.0 | 0.0 | 501.76 | false | false | + When Customer makes "PAYOUT_REFUND" transaction with "AUTOPAY" payment type on "22 January 2024" with 500 EUR transaction amount and system-generated Idempotency key + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 14 January 2024 | 748.38 | 251.62 | 3.52 | 0.0 | 0.0 | 255.14 | 255.14 | 255.14 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 22 January 2024 | 494.33 | 254.05 | 1.09 | 0.0 | 0.0 | 255.14 | 255.14 | 255.14 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 22 January 2024 | 239.19 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | 255.14 | 255.14 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | 22 January 2024 | 0.0 | 239.19 | 0.0 | 0.0 | 0.0 | 239.19 | 239.19 | 239.19 | 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.0 | 4.61 | 0.0 | 0.0 | 1004.61 | 1004.61 | 1004.61 | 0.0 | 0.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 | + | 14 January 2024 | Merchant Issued Refund | 500.0 | 496.48 | 3.52 | 0.0 | 0.0 | 503.52 | false | false | + | 14 January 2024 | Interest Refund | 1.76 | 1.76 | 0.0 | 0.0 | 0.0 | 501.76 | false | false | + | 22 January 2024 | Payout Refund | 500.0 | 498.91 | 1.09 | 0.0 | 0.0 | 2.85 | false | false | + | 22 January 2024 | Interest Refund | 2.85 | 2.85 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | + | 22 January 2024 | Accrual | 4.61 | 0.0 | 4.61 | 0.0 | 0.0 | 0.0 | false | false | + Then Loan status will be "CLOSED_OBLIGATIONS_MET" - @TestRailId:C3289 - Scenario: Verify Interest recalculation - EARLY repayment, adjust LAST installment - UC1: 360/30, early repayment with amount less then emi amount + @TestRailId:C3305 + Scenario: UC12 - Single disbursement, multiple partial refund after first installment period When Admin sets the business date to "01 January 2024" When Admin creates a client with random data - When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "LAST_INSTALLMENT" future installment allocation rule When Admin creates a fully customized loan with the following data: - | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | - | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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 - When Admin runs inline COB job for Loan + | 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_INTEREST_REFUND_FULL | 01 January 2024 | 1000 | 9.9 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 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 | | 836.9 | 163.1 | 8.39 | 0.0 | 0.0 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | + | 2 | 29 | 01 March 2024 | | 671.97 | 164.93 | 6.56 | 0.0 | 0.0 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | + | 3 | 31 | 01 April 2024 | | 506.11 | 165.86 | 5.63 | 0.0 | 0.0 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | + | 4 | 30 | 01 May 2024 | | 338.73 | 167.38 | 4.11 | 0.0 | 0.0 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | + | 5 | 31 | 01 June 2024 | | 170.08 | 168.65 | 2.84 | 0.0 | 0.0 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | + | 6 | 30 | 01 July 2024 | | 0.0 | 170.08 | 1.38 | 0.0 | 0.0 | 171.46 | 0.0 | 0.0 | 0.0 | 171.46 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 28.91 | 0.0 | 0.0 | 1028.91 | 0.0 | 0.0 | 0.0 | 1028.91 | 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 | -# --- Early repayment with 15 EUR on 15 Jan --- - When Admin sets the business date to "15 January 2024" - And Customer makes "AUTOPAY" repayment on "15 January 2024" with 15 EUR transaction amount - When Admin runs inline COB job for Loan + | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 171.49 EUR transaction amount + When Admin sets the business date to "09 February 2024" + When Customer makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "09 February 2024" with 500 EUR transaction amount and system-generated Idempotency key 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.52 | 16.48 | 0.53 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 66.91 | 16.61 | 0.4 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.2 | 16.71 | 0.3 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.4 | 16.8 | 0.21 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.5 | 16.9 | 0.11 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.5 | 0.01 | 0.0 | 0.0 | 16.51 | 15.0 | 15.0 | 0.0 | 1.51 | + | 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 | 836.9 | 163.1 | 8.39 | 0.0 | 0.0 | 171.49 | 171.49 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 09 February 2024 | 667.22 | 169.68 | 1.81 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 09 February 2024 | 495.73 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | | 331.64 | 164.09 | 7.4 | 0.0 | 0.0 | 171.49 | 162.31 | 162.31 | 0.0 | 9.18 | + | 5 | 31 | 01 June 2024 | | 162.93 | 168.71 | 2.78 | 0.0 | 0.0 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | + | 6 | 30 | 01 July 2024 | | 0.0 | 162.93 | 1.32 | 0.0 | 0.0 | 164.25 | 0.0 | 0.0 | 0.0 | 164.25 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.56 | 0.0 | 0.0 | 101.56 | 15 | 15 | 0.0 | 86.56 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 21.7 | 0.0 | 0.0 | 1021.7 | 676.78 | 505.29 | 0.0 | 344.92 | 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 | - | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 15 January 2024 | Repayment | 15.0 | 15.0 | 0.0 | 0.0 | 0.0 | 85.0 | false | false | - When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + | 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 | + | 01 February 2024 | Repayment | 171.49 | 163.1 | 8.39 | 0.0 | 0.0 | 836.9 | false | false | + | 09 February 2024 | Merchant Issued Refund | 500.0 | 498.19 | 1.81 | 0.0 | 0.0 | 338.71 | false | false | + | 09 February 2024 | Interest Refund | 5.29 | 5.29 | 0.0 | 0.0 | 0.0 | 333.42 | false | false | + When Admin sets the business date to "25 February 2024" + When Customer makes "PAYOUT_REFUND" transaction with "AUTOPAY" payment type on "25 February 2024" with 250 EUR transaction amount and system-generated Idempotency key + When Admin sets the business date to "01 March 2024" + And Customer makes "AUTOPAY" repayment on "01 March 2024" with 81.24 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 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 836.9 | 163.1 | 8.39 | 0.0 | 0.0 | 171.49 | 171.49 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 09 February 2024 | 667.22 | 169.68 | 1.81 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 09 February 2024 | 495.73 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | 25 February 2024 | 325.68 | 170.05 | 1.44 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | + | 5 | 31 | 01 June 2024 | 25 February 2024 | 154.19 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | + | 6 | 30 | 01 July 2024 | 01 March 2024 | 0.0 | 154.19 | 0.11 | 0.0 | 0.0 | 154.3 | 154.3 | 154.3 | 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.0 | 11.75 | 0.0 | 0.0 | 1011.75 | 1011.75 | 840.26 | 0.0 | 0.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 | + | 01 February 2024 | Repayment | 171.49 | 163.1 | 8.39 | 0.0 | 0.0 | 836.9 | false | false | + | 09 February 2024 | Merchant Issued Refund | 500.0 | 498.19 | 1.81 | 0.0 | 0.0 | 338.71 | false | false | + | 09 February 2024 | Interest Refund | 5.29 | 5.29 | 0.0 | 0.0 | 0.0 | 333.42 | false | false | + | 25 February 2024 | Payout Refund | 250.0 | 248.56 | 1.44 | 0.0 | 0.0 | 84.86 | false | false | + | 25 February 2024 | Interest Refund | 3.73 | 3.73 | 0.0 | 0.0 | 0.0 | 81.13 | false | false | + | 01 March 2024 | Repayment | 81.24 | 81.13 | 0.11 | 0.0 | 0.0 | 0.0 | false | false | + | 01 March 2024 | Accrual | 11.75 | 0.0 | 11.75 | 0.0 | 0.0 | 0.0 | false | false | + Then Loan status will be "CLOSED_OBLIGATIONS_MET" - @TestRailId:C3290 - Scenario: Verify Interest recalculation - EARLY repayment, adjust LAST installment - UC2: 360/30, early repayment emi amount paid + @TestRailId:C3306 + Scenario: UC13 - Multi disbursements, same days, multiple partial refund within first installment period When Admin sets the business date to "01 January 2024" When Admin creates a client with random data - When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "LAST_INSTALLMENT" future installment allocation rule - When Admin creates a fully customized loan with the following data: - | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | - | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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 - When Admin runs inline COB job for Loan + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_REFUND_FULL | 01 January 2024 | 1000 | 9.9 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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" + And Admin successfully disburse the loan on "01 January 2024" with "250" EUR transaction amount + And Admin successfully disburse the loan on "01 January 2024" with "750" 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | | | 01 January 2024 | | 750.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 836.91 | 163.09 | 8.39 | 0.0 | 0.0 | 171.48 | 0.0 | 0.0 | 0.0 | 171.48 | + | 2 | 29 | 01 March 2024 | | 671.99 | 164.92 | 6.56 | 0.0 | 0.0 | 171.48 | 0.0 | 0.0 | 0.0 | 171.48 | + | 3 | 31 | 01 April 2024 | | 506.14 | 165.85 | 5.63 | 0.0 | 0.0 | 171.48 | 0.0 | 0.0 | 0.0 | 171.48 | + | 4 | 30 | 01 May 2024 | | 338.77 | 167.37 | 4.11 | 0.0 | 0.0 | 171.48 | 0.0 | 0.0 | 0.0 | 171.48 | + | 5 | 31 | 01 June 2024 | | 170.13 | 168.64 | 2.84 | 0.0 | 0.0 | 171.48 | 0.0 | 0.0 | 0.0 | 171.48 | + | 6 | 30 | 01 July 2024 | | 0.0 | 170.13 | 1.38 | 0.0 | 0.0 | 171.51 | 0.0 | 0.0 | 0.0 | 171.51 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 28.91 | 0.0 | 0.0 | 1028.91 | 0.0 | 0.0 | 0.0 | 1028.91 | 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 | -# --- Early repayment with 17.01 EUR on 15 Jan --- - When Admin sets the business date to "15 January 2024" - And Customer makes "AUTOPAY" repayment on "15 January 2024" with 17.01 EUR transaction amount - When Admin runs inline COB job for Loan + | 01 January 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | + | 01 January 2024 | Disbursement | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | + When Admin sets the business date to "22 January 2024" + And Customer makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "22 January 2024" with 500 EUR transaction amount and system-generated Idempotency key 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.52 | 16.48 | 0.53 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 66.9 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.18 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.36 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 17.01 | 16.35 | 0.1 | 0.0 | 0.0 | 16.45 | 0.0 | 0.0 | 0.0 | 16.45 | - | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01| 17.01 | 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 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | | | 01 January 2024 | | 750.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 22 January 2024 | 834.2 | 165.8 | 5.68 | 0.0 | 0.0 | 171.48 | 171.48 | 171.48 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 22 January 2024 | 662.72 | 171.48 | 0.0 | 0.0 | 0.0 | 171.48 | 171.48 | 171.48 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | | 500.76 | 161.96 | 9.52 | 0.0 | 0.0 | 171.48 | 159.88 | 159.88 | 0.0 | 11.6 | + | 4 | 30 | 01 May 2024 | | 333.34 | 167.42 | 4.06 | 0.0 | 0.0 | 171.48 | 0.0 | 0.0 | 0.0 | 171.48 | + | 5 | 31 | 01 June 2024 | | 164.66 | 168.68 | 2.8 | 0.0 | 0.0 | 171.48 | 0.0 | 0.0 | 0.0 | 171.48 | + | 6 | 30 | 01 July 2024 | | 0.0 | 164.66 | 1.34 | 0.0 | 0.0 | 166.0 | 0.0 | 0.0 | 0.0 | 166.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 | 1.5 | 0.0 | 0.0 | 101.5 | 17.01| 17.01 | 0.0 | 84.49 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 23.4 | 0.0 | 0.0 | 1023.4 | 502.84 | 502.84 | 0.0 | 520.56 | 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 | - | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 15 January 2024 | Repayment | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 82.99 | false | false | - When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | + | 01 January 2024 | Disbursement | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | + | 22 January 2024 | Merchant Issued Refund | 500.0 | 494.32 | 5.68 | 0.0 | 0.0 | 505.68 | false | false | + | 22 January 2024 | Interest Refund | 2.84 | 2.84 | 0.0 | 0.0 | 0.0 | 502.84 | false | false | + When Admin sets the business date to "26 January 2024" + And Customer makes "PAYOUT_REFUND" transaction with "AUTOPAY" payment type on "26 January 2024" with 400 EUR transaction amount and system-generated Idempotency key + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 100.84 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 January 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | | | 01 January 2024 | | 750.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 22 January 2024 | 834.2 | 165.8 | 5.68 | 0.0 | 0.0 | 171.48 | 171.48 | 171.48 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 22 January 2024 | 662.72 | 171.48 | 0.0 | 0.0 | 0.0 | 171.48 | 171.48 | 171.48 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 26 January 2024 | 491.78 | 170.94 | 0.54 | 0.0 | 0.0 | 171.48 | 171.48 | 171.48 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | 26 January 2024 | 320.3 | 171.48 | 0.0 | 0.0 | 0.0 | 171.48 | 171.48 | 171.48 | 0.0 | 0.0 | + | 5 | 31 | 01 June 2024 | 26 January 2024 | 148.82 | 171.48 | 0.0 | 0.0 | 0.0 | 171.48 | 171.48 | 171.48 | 0.0 | 0.0 | + | 6 | 30 | 01 July 2024 | 01 February 2024 | 0.0 | 148.82 | 0.16 | 0.0 | 0.0 | 148.98 | 148.98 | 148.98 | 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.0 | 6.38 | 0.0 | 0.0 | 1006.38 | 1006.38 | 1006.38 | 0.0 | 0.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 | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | + | 01 January 2024 | Disbursement | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | + | 22 January 2024 | Merchant Issued Refund | 500.0 | 494.32 | 5.68 | 0.0 | 0.0 | 505.68 | false | false | + | 22 January 2024 | Interest Refund | 2.84 | 2.84 | 0.0 | 0.0 | 0.0 | 502.84 | false | false | + | 26 January 2024 | Payout Refund | 400.0 | 399.46 | 0.54 | 0.0 | 0.0 | 103.38 | false | false | + | 26 January 2024 | Interest Refund | 2.7 | 2.7 | 0.0 | 0.0 | 0.0 | 100.68 | false | false | + | 01 February 2024 | Repayment | 100.84 | 100.68 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 01 February 2024 | Accrual | 6.38 | 0.0 | 6.38 | 0.0 | 0.0 | 0.0 | false | false | + Then Loan status will be "CLOSED_OBLIGATIONS_MET" - @TestRailId:C3291 - Scenario: Verify Interest recalculation - EARLY repayment, adjust LAST installment - UC3: 360/30, early repayment with excess emi amount paid + @TestRailId:C3307 + Scenario: UC14 - Multi disbursements, different days, multiple partial refunds within first installment period When Admin sets the business date to "01 January 2024" When Admin creates a client with random data - When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "LAST_INSTALLMENT" future installment allocation rule - When Admin creates a fully customized loan with the following data: - | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | - | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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 - When Admin runs inline COB job for Loan + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_REFUND_FULL | 01 January 2024 | 1000 | 9.9 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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" + And Admin successfully disburse the loan on "01 January 2024" with "250" EUR transaction amount + And Admin successfully disburse the loan on "01 January 2024" with "250" EUR transaction amount + When Admin sets the business date to "05 January 2024" + And Admin successfully disburse the loan on "05 January 2024" with "500" EUR transaction amount + When Admin sets the business date to "22 January 2024" 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | | | 01 January 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | | | 05 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 836.45 | 163.55 | 7.84 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | + | 2 | 29 | 01 March 2024 | | 671.62 | 164.83 | 6.56 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | + | 3 | 31 | 01 April 2024 | | 505.86 | 165.76 | 5.63 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | + | 4 | 30 | 01 May 2024 | | 338.57 | 167.29 | 4.1 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | + | 5 | 31 | 01 June 2024 | | 170.02 | 168.55 | 2.84 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | + | 6 | 30 | 01 July 2024 | | 0.0 | 170.02 | 1.38 | 0.0 | 0.0 | 171.4 | 0.0 | 0.0 | 0.0 | 171.4 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 28.35 | 0.0 | 0.0 | 1028.35 | 0.0 | 0.0 | 0.0 | 1028.35 | 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 | -# --- Early repayment with 34.02 EUR on 15 Jan --- + | 01 January 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | + | 01 January 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | false | false | + | 05 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | + And Customer makes "PAYOUT_REFUND" transaction with "AUTOPAY" payment type on "22 January 2024" with 250 EUR transaction amount and system-generated Idempotency key + When Admin sets the business date to "26 January 2024" + 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 January 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | | | 01 January 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | | | 05 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 22 January 2024 | 833.75 | 166.25 | 5.14 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 670.31 | 163.44 | 7.95 | 0.0 | 0.0 | 171.39 | 80.03 | 80.03 | 0.0 | 91.36 | + | 3 | 31 | 01 April 2024 | | 504.54 | 165.77 | 5.62 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | + | 4 | 30 | 01 May 2024 | | 337.24 | 167.3 | 4.09 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | + | 5 | 31 | 01 June 2024 | | 168.68 | 168.56 | 2.83 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | + | 6 | 30 | 01 July 2024 | | 0.0 | 168.68 | 1.37 | 0.0 | 0.0 | 170.05 | 0.0 | 0.0 | 0.0 | 170.05 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 27.0 | 0.0 | 0.0 | 1027.0 | 251.42 | 251.42 | 0.0 | 775.58 | + 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 | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | + | 01 January 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | false | false | + | 05 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | + | 22 January 2024 | Payout Refund | 250.0 | 244.86 | 5.14 | 0.0 | 0.0 | 755.14 | false | false | + | 22 January 2024 | Interest Refund | 1.42 | 1.42 | 0.0 | 0.0 | 0.0 | 753.72 | false | false | + And Customer makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "26 January 2024" with 400 EUR transaction amount and system-generated Idempotency key + When Admin sets the business date to "01 February 2024" + 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 January 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | | | 01 January 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | | | 05 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 22 January 2024 | 833.75 | 166.25 | 5.14 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 26 January 2024 | 663.18 | 170.57 | 0.82 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 26 January 2024 | 491.79 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | | 329.54 | 162.25 | 9.14 | 0.0 | 0.0 | 171.39 | 139.8 | 139.8 | 0.0 | 31.59 | + | 5 | 31 | 01 June 2024 | | 160.91 | 168.63 | 2.76 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | + | 6 | 30 | 01 July 2024 | | 0.0 | 160.91 | 1.31 | 0.0 | 0.0 | 162.22 | 0.0 | 0.0 | 0.0 | 162.22 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 19.17 | 0.0 | 0.0 | 1019.17 | 653.97 | 653.97 | 0.0 | 365.2 | + 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 | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | + | 01 January 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | false | false | + | 05 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | + | 22 January 2024 | Payout Refund | 250.0 | 244.86 | 5.14 | 0.0 | 0.0 | 755.14 | false | false | + | 22 January 2024 | Interest Refund | 1.42 | 1.42 | 0.0 | 0.0 | 0.0 | 753.72 | false | false | + | 26 January 2024 | Merchant Issued Refund | 400.0 | 399.18 | 0.82 | 0.0 | 0.0 | 354.54 | false | false | + | 26 January 2024 | Interest Refund | 2.55 | 2.55 | 0.0 | 0.0 | 0.0 | 351.99 | false | false | + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 31.59 EUR transaction amount + When Admin sets the business date to "01 March 2024" + And Customer makes "AUTOPAY" repayment on "01 March 2024" with 171.39 EUR transaction amount + When Admin sets the business date to "01 April 2024" + And Customer makes "AUTOPAY" repayment on "01 April 2024" with 153.38 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 January 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | | | 01 January 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | | | 05 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 22 January 2024 | 833.75 | 166.25 | 5.14 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 26 January 2024 | 663.18 | 170.57 | 0.82 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 26 January 2024 | 491.79 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | 01 February 2024 | 320.97 | 170.82 | 0.57 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | + | 5 | 31 | 01 June 2024 | 01 March 2024 | 152.1 | 168.87 | 2.52 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | + | 6 | 30 | 01 July 2024 | 01 April 2024 | 0.0 | 152.1 | 1.28 | 0.0 | 0.0 | 153.38 | 153.38 | 153.38 | 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.0 | 10.33 | 0.0 | 0.0 | 1010.33 | 1010.33 | 1010.33 | 0.0 | 0.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 | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | + | 01 January 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | false | false | + | 05 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | + | 22 January 2024 | Payout Refund | 250.0 | 244.86 | 5.14 | 0.0 | 0.0 | 755.14 | false | false | + | 22 January 2024 | Interest Refund | 1.42 | 1.42 | 0.0 | 0.0 | 0.0 | 753.72 | false | false | + | 26 January 2024 | Merchant Issued Refund | 400.0 | 399.18 | 0.82 | 0.0 | 0.0 | 354.54 | false | false | + | 26 January 2024 | Interest Refund | 2.55 | 2.55 | 0.0 | 0.0 | 0.0 | 351.99 | false | false | + | 01 February 2024 | Repayment | 31.59 | 31.02 | 0.57 | 0.0 | 0.0 | 320.97 | false | false | + | 01 March 2024 | Repayment | 171.39 | 168.87 | 2.52 | 0.0 | 0.0 | 152.1 | false | false | + | 01 April 2024 | Repayment | 153.38 | 152.1 | 1.28 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Accrual | 10.33 | 0.0 | 10.33 | 0.0 | 0.0 | 0.0 | false | false | + Then Loan status will be "CLOSED_OBLIGATIONS_MET" + + @TestRailId:C3308 + Scenario: UC15 - Multi disbursements, different days, multiple partial refunds after first installment period + When Admin sets the business date to "01 January 2024" + When Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_REFUND_FULL | 01 January 2024 | 1000 | 9.9 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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" + And Admin successfully disburse the loan on "01 January 2024" with "500" EUR transaction amount + When Admin sets the business date to "05 January 2024" + And Admin successfully disburse the loan on "05 January 2024" with "500" 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 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 836.45 | 163.55 | 7.84 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | + | 2 | 29 | 01 March 2024 | | 671.62 | 164.83 | 6.56 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | + | 3 | 31 | 01 April 2024 | | 505.86 | 165.76 | 5.63 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | + | 4 | 30 | 01 May 2024 | | 338.57 | 167.29 | 4.1 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | + | 5 | 31 | 01 June 2024 | | 170.02 | 168.55 | 2.84 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | + | 6 | 30 | 01 July 2024 | | 0.0 | 170.02 | 1.38 | 0.0 | 0.0 | 171.4 | 0.0 | 0.0 | 0.0 | 171.4 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 28.35 | 0.0 | 0.0 | 1028.35 | 0.0 | 0.0 | 0.0 | 1028.35 | + 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 | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | false | false | + | 05 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 171.39 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 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 836.45 | 163.55 | 7.84 | 0.0 | 0.0 | 171.39 | 171.39 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 671.62 | 164.83 | 6.56 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | + | 3 | 31 | 01 April 2024 | | 505.86 | 165.76 | 5.63 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | + | 4 | 30 | 01 May 2024 | | 338.57 | 167.29 | 4.1 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | + | 5 | 31 | 01 June 2024 | | 170.02 | 168.55 | 2.84 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | + | 6 | 30 | 01 July 2024 | | 0.0 | 170.02 | 1.38 | 0.0 | 0.0 | 171.4 | 0.0 | 0.0 | 0.0 | 171.4 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 28.35 | 0.0 | 0.0 | 1028.35 | 171.39 | 0.0 | 0.0 | 856.96 | + 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 | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | false | false | + | 05 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | + | 01 February 2024 | Repayment | 171.39 | 163.55 | 7.84 | 0.0 | 0.0 | 836.45 | false | false | + When Admin sets the business date to "13 February 2024" + And Customer makes "PAYOUT_REFUND" transaction with "AUTOPAY" payment type on "13 February 2024" with 250 EUR transaction amount and system-generated Idempotency key + 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 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 836.45 | 163.55 | 7.84 | 0.0 | 0.0 | 171.39 | 171.39 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 13 February 2024 | 667.78 | 168.67 | 2.72 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | | 504.01 | 163.77 | 7.62 | 0.0 | 0.0 | 171.39 | 81.52 | 81.52 | 0.0 | 89.87 | + | 4 | 30 | 01 May 2024 | | 336.71 | 167.3 | 4.09 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | + | 5 | 31 | 01 June 2024 | | 168.14 | 168.57 | 2.82 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | + | 6 | 30 | 01 July 2024 | | 0.0 | 168.14 | 1.36 | 0.0 | 0.0 | 169.5 | 0.0 | 0.0 | 0.0 | 169.5 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 26.45 | 0.0 | 0.0 | 1026.45 | 424.3 | 252.91 | 0.0 | 602.15 | + 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 | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | false | false | + | 05 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | + | 01 February 2024 | Repayment | 171.39 | 163.55 | 7.84 | 0.0 | 0.0 | 836.45 | false | false | + | 13 February 2024 | Payout Refund | 250.0 | 247.28 | 2.72 | 0.0 | 0.0 | 589.17 | false | false | + | 13 February 2024 | Interest Refund | 2.91 | 2.91 | 0.0 | 0.0 | 0.0 | 586.26 | false | false | + When Admin sets the business date to "24 February 2024" + And Customer makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "24 February 2024" with 400 EUR transaction amount and system-generated Idempotency key + 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 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 836.45 | 163.55 | 7.84 | 0.0 | 0.0 | 171.39 | 171.39 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 13 February 2024 | 667.78 | 168.67 | 2.72 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 24 February 2024 | 498.13 | 169.65 | 1.74 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | 24 February 2024 | 326.74 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | + | 5 | 31 | 01 June 2024 | | 160.19 | 166.55 | 4.84 | 0.0 | 0.0 | 171.39 | 144.44 | 144.44 | 0.0 | 26.95 | + | 6 | 30 | 01 July 2024 | | 0.0 | 160.19 | 1.3 | 0.0 | 0.0 | 161.49 | 0.0 | 0.0 | 0.0 | 161.49 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 18.44 | 0.0 | 0.0 | 1018.44 | 830.0 | 658.61 | 0.0 | 188.44 | + 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 | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | false | false | + | 05 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | + | 01 February 2024 | Repayment | 171.39 | 163.55 | 7.84 | 0.0 | 0.0 | 836.45 | false | false | + | 13 February 2024 | Payout Refund | 250.0 | 247.28 | 2.72 | 0.0 | 0.0 | 589.17 | false | false | + | 13 February 2024 | Interest Refund | 2.91 | 2.91 | 0.0 | 0.0 | 0.0 | 586.26 | false | false | + | 24 February 2024 | Merchant Issued Refund | 400.0 | 398.26 | 1.74 | 0.0 | 0.0 | 188.0 | false | false | + | 24 February 2024 | Interest Refund | 5.7 | 5.7 | 0.0 | 0.0 | 0.0 | 182.3 | false | false | + When Admin sets the business date to "01 March 2024" + And Customer makes "AUTOPAY" repayment on "01 March 2024" with 26.95 EUR transaction amount + When Admin sets the business date to "01 April 2024" + And Customer makes "AUTOPAY" repayment on "01 April 2024" with 156.96 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 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 836.45 | 163.55 | 7.84 | 0.0 | 0.0 | 171.39 | 171.39 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 13 February 2024 | 667.78 | 168.67 | 2.72 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 24 February 2024 | 498.13 | 169.65 | 1.74 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | 24 February 2024 | 326.74 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | + | 5 | 31 | 01 June 2024 | 01 March 2024 | 155.65 | 171.09 | 0.3 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | + | 6 | 30 | 01 July 2024 | 01 April 2024 | 0.0 | 155.65 | 1.31 | 0.0 | 0.0 | 156.96 | 156.96 | 156.96 | 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.0 | 13.91 | 0.0 | 0.0 | 1013.91 | 1013.91 | 842.52 | 0.0 | 0.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 | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | false | false | + | 05 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | + | 01 February 2024 | Repayment | 171.39 | 163.55 | 7.84 | 0.0 | 0.0 | 836.45 | false | false | + | 13 February 2024 | Payout Refund | 250.0 | 247.28 | 2.72 | 0.0 | 0.0 | 589.17 | false | false | + | 13 February 2024 | Interest Refund | 2.91 | 2.91 | 0.0 | 0.0 | 0.0 | 586.26 | false | false | + | 24 February 2024 | Merchant Issued Refund | 400.0 | 398.26 | 1.74 | 0.0 | 0.0 | 188.0 | false | false | + | 24 February 2024 | Interest Refund | 5.7 | 5.7 | 0.0 | 0.0 | 0.0 | 182.3 | false | false | + | 01 March 2024 | Repayment | 26.95 | 26.65 | 0.3 | 0.0 | 0.0 | 155.65 | false | false | + | 01 April 2024 | Repayment | 156.96 | 155.65 | 1.31 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Accrual | 13.91 | 0.0 | 13.91 | 0.0 | 0.0 | 0.0 | false | false | + Then Loan status will be "CLOSED_OBLIGATIONS_MET" + + @TestRailId:C3309 + Scenario: UC16 - Multi disbursements, different days, multiple partial refunds crossing multiple installment periods + When Admin sets the business date to "01 January 2024" + When Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_REFUND_FULL | 01 January 2024 | 1000 | 9.9 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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" + And Admin successfully disburse the loan on "01 January 2024" with "500" EUR transaction amount + When Admin sets the business date to "05 January 2024" + And Admin successfully disburse the loan on "05 January 2024" with "500" 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 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | | | 05 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 836.45 | 163.55 | 7.84 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | + | 2 | 29 | 01 March 2024 | | 671.62 | 164.83 | 6.56 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | + | 3 | 31 | 01 April 2024 | | 505.86 | 165.76 | 5.63 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | + | 4 | 30 | 01 May 2024 | | 338.57 | 167.29 | 4.1 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | + | 5 | 31 | 01 June 2024 | | 170.02 | 168.55 | 2.84 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | + | 6 | 30 | 01 July 2024 | | 0.0 | 170.02 | 1.38 | 0.0 | 0.0 | 171.4 | 0.0 | 0.0 | 0.0 | 171.4 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 28.35 | 0.0 | 0.0 | 1028.35 | 0.0 | 0.0 | 0.0 | 1028.35 | + 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 | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | false | false | + | 05 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 171.39 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 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | | | 05 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 836.45 | 163.55 | 7.84 | 0.0 | 0.0 | 171.39 | 171.39 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 671.62 | 164.83 | 6.56 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | + | 3 | 31 | 01 April 2024 | | 505.86 | 165.76 | 5.63 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | + | 4 | 30 | 01 May 2024 | | 338.57 | 167.29 | 4.1 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | + | 5 | 31 | 01 June 2024 | | 170.02 | 168.55 | 2.84 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | + | 6 | 30 | 01 July 2024 | | 0.0 | 170.02 | 1.38 | 0.0 | 0.0 | 171.4 | 0.0 | 0.0 | 0.0 | 171.4 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 28.35 | 0.0 | 0.0 | 1028.35 | 171.39 | 0.0 | 0.0 | 856.96 | + 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 | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | false | false | + | 05 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | + | 01 February 2024 | Repayment | 171.39 | 163.55 | 7.84 | 0.0 | 0.0 | 836.45 | false | false | + When Admin sets the business date to "13 February 2024" + And Customer makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "13 February 2024" with 400 EUR transaction amount and system-generated Idempotency key + 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 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | | | 05 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 836.45 | 163.55 | 7.84 | 0.0 | 0.0 | 171.39 | 171.39 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 13 February 2024 | 667.78 | 168.67 | 2.72 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 13 February 2024 | 496.39 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | | 334.17 | 162.22 | 9.17 | 0.0 | 0.0 | 171.39 | 61.88 | 61.88 | 0.0 | 109.51 | + | 5 | 31 | 01 June 2024 | | 165.58 | 168.59 | 2.8 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | + | 6 | 30 | 01 July 2024 | | 0.0 | 165.58 | 1.34 | 0.0 | 0.0 | 166.92 | 0.0 | 0.0 | 0.0 | 166.92 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 23.87 | 0.0 | 0.0 | 1023.87 | 576.05 | 404.66 | 0.0 | 447.82 | + 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 | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | false | false | + | 05 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | + | 01 February 2024 | Repayment | 171.39 | 163.55 | 7.84 | 0.0 | 0.0 | 836.45 | false | false | + | 13 February 2024 | Merchant Issued Refund | 400.0 | 397.28 | 2.72 | 0.0 | 0.0 | 439.17 | false | false | + | 13 February 2024 | Interest Refund | 4.66 | 4.66 | 0.0 | 0.0 | 0.0 | 434.51 | false | false | + When Admin sets the business date to "01 March 2024" + And Customer makes "AUTOPAY" repayment on "01 March 2024" with 109.62 EUR transaction amount + When Admin sets the business date to "01 April 2024" + And Customer makes "AUTOPAY" repayment on "01 April 2024" with 171.39 EUR transaction amount + When Admin sets the business date to "06 April 2024" + And Customer makes "PAYOUT_REFUND" transaction with "AUTOPAY" payment type on "06 April 2024" with 400 EUR transaction amount and system-generated Idempotency key + 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 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | | | 05 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 836.45 | 163.55 | 7.84 | 0.0 | 0.0 | 171.39 | 171.39 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 13 February 2024 | 667.78 | 168.67 | 2.72 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 13 February 2024 | 496.39 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | 01 March 2024 | 327.0 | 169.39 | 2.0 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | + | 5 | 31 | 01 June 2024 | 01 April 2024 | 158.35 | 168.65 | 2.74 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | + | 6 | 30 | 01 July 2024 | 06 April 2024 | 0.0 | 158.35 | 0.21 | 0.0 | 0.0 | 158.56 | 158.56 | 158.56 | 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.0 | 15.51 | 0.0 | 0.0 | 1015.51 | 1015.51 | 844.12 | 0.0 | 0.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 | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | false | false | + | 05 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | + | 01 February 2024 | Repayment | 171.39 | 163.55 | 7.84 | 0.0 | 0.0 | 836.45 | false | false | + | 13 February 2024 | Merchant Issued Refund | 400.0 | 397.28 | 2.72 | 0.0 | 0.0 | 439.17 | false | false | + | 13 February 2024 | Interest Refund | 4.66 | 4.66 | 0.0 | 0.0 | 0.0 | 434.51 | false | false | + | 01 March 2024 | Repayment | 109.62 | 107.62 | 2.0 | 0.0 | 0.0 | 326.89 | false | false | + | 01 April 2024 | Repayment | 171.39 | 168.65 | 2.74 | 0.0 | 0.0 | 158.24 | false | false | + | 06 April 2024 | Payout Refund | 400.0 | 158.24 | 0.21 | 0.0 | 0.0 | 0.0 | false | false | + | 06 April 2024 | Interest Refund | 9.15 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | + | 06 April 2024 | Accrual | 15.51 | 0.0 | 15.51 | 0.0 | 0.0 | 0.0 | false | false | + When Admin sets the business date to "07 April 2024" + When Admin makes Credit Balance Refund transaction on "07 April 2024" with 250.7 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 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | | | 05 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 836.45 | 163.55 | 7.84 | 0.0 | 0.0 | 171.39 | 171.39 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 13 February 2024 | 667.78 | 168.67 | 2.72 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 13 February 2024 | 496.39 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | 01 March 2024 | 327.0 | 169.39 | 2.0 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | + | 5 | 31 | 01 June 2024 | 01 April 2024 | 158.35 | 168.65 | 2.74 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | + | 6 | 30 | 01 July 2024 | 06 April 2024 | 0.0 | 158.35 | 0.21 | 0.0 | 0.0 | 158.56 | 158.56 | 158.56 | 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.0 | 15.51 | 0.0 | 0.0 | 1015.51 | 1015.51 | 844.12 | 0.0 | 0.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 | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | false | false | + | 05 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | + | 01 February 2024 | Repayment | 171.39 | 163.55 | 7.84 | 0.0 | 0.0 | 836.45 | false | false | + | 13 February 2024 | Merchant Issued Refund | 400.0 | 397.28 | 2.72 | 0.0 | 0.0 | 439.17 | false | false | + | 13 February 2024 | Interest Refund | 4.66 | 4.66 | 0.0 | 0.0 | 0.0 | 434.51 | false | false | + | 01 March 2024 | Repayment | 109.62 | 107.62 | 2.0 | 0.0 | 0.0 | 326.89 | false | false | + | 01 April 2024 | Repayment | 171.39 | 168.65 | 2.74 | 0.0 | 0.0 | 158.24 | false | false | + | 06 April 2024 | Payout Refund | 400.0 | 158.24 | 0.21 | 0.0 | 0.0 | 0.0 | false | false | + | 06 April 2024 | Interest Refund | 9.15 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | + | 06 April 2024 | Accrual | 15.51 | 0.0 | 15.51 | 0.0 | 0.0 | 0.0 | false | false | + | 07 April 2024 | Credit Balance Refund | 250.7 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | + Then Loan status will be "CLOSED_OBLIGATIONS_MET" + + @TestRailId:C3310 + Scenario: UC17 - Single disbursement, multiple partial refund within first installment period, one time payment prior to refund + When Admin sets the business date to "01 January 2024" + When Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_REFUND_FULL | 01 January 2024 | 1000 | 9.9 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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" + And Admin successfully disburse the loan on "01 January 2024" with "1000" EUR transaction amount + When Admin sets the business date to "12 January 2024" + And Customer makes "PAYOUT_REFUND" transaction with "AUTOPAY" payment type on "12 January 2024" with 400 EUR transaction amount and system-generated Idempotency key + 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 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 12 January 2024 | 831.49 | 168.51 | 2.98 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 12 January 2024 | 660.0 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | | 501.54 | 158.46 | 13.03 | 0.0 | 0.0 | 171.49 | 58.21 | 58.21 | 0.0 | 113.28 | + | 4 | 30 | 01 May 2024 | | 334.12 | 167.42 | 4.07 | 0.0 | 0.0 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | + | 5 | 31 | 01 June 2024 | | 165.43 | 168.69 | 2.8 | 0.0 | 0.0 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | + | 6 | 30 | 01 July 2024 | | 0.0 | 165.43 | 1.34 | 0.0 | 0.0 | 166.77 | 0.0 | 0.0 | 0.0 | 166.77 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 24.22 | 0.0 | 0.0 | 1024.22 | 401.19 | 401.19 | 0.0 | 623.03 | + 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 | + | 12 January 2024 | Payout Refund | 400.0 | 397.02 | 2.98 | 0.0 | 0.0 | 602.98 | false | false | + | 12 January 2024 | Interest Refund | 1.19 | 1.19 | 0.0 | 0.0 | 0.0 | 601.79 | false | false | + When Admin sets the business date to "17 January 2024" + And Customer makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "17 January 2024" with 150 EUR transaction amount and system-generated Idempotency key + 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 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 12 January 2024 | 831.49 | 168.51 | 2.98 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 12 January 2024 | 660.0 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 17 January 2024 | 489.32 | 170.68 | 0.81 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | | 330.67 | 158.65 | 12.84 | 0.0 | 0.0 | 171.49 | 37.37 | 37.37 | 0.0 | 134.12 | + | 5 | 31 | 01 June 2024 | | 161.95 | 168.72 | 2.77 | 0.0 | 0.0 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | + | 6 | 30 | 01 July 2024 | | 0.0 | 161.95 | 1.31 | 0.0 | 0.0 | 163.26 | 0.0 | 0.0 | 0.0 | 163.26 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 20.71 | 0.0 | 0.0 | 1020.71 | 551.84 | 551.84 | 0.0 | 468.87 | + 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 | + | 12 January 2024 | Payout Refund | 400.0 | 397.02 | 2.98 | 0.0 | 0.0 | 602.98 | false | false | + | 12 January 2024 | Interest Refund | 1.19 | 1.19 | 0.0 | 0.0 | 0.0 | 601.79 | false | false | + | 17 January 2024 | Merchant Issued Refund | 150.0 | 149.19 | 0.81 | 0.0 | 0.0 | 452.6 | false | false | + | 17 January 2024 | Interest Refund | 0.65 | 0.65 | 0.0 | 0.0 | 0.0 | 451.95 | false | false | + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 134.11 EUR transaction amount + When Admin sets the business date to "08 February 2024" + And Customer makes "PAYOUT_REFUND" transaction with "AUTOPAY" payment type on "01 February 2024" with 250 EUR transaction amount and system-generated Idempotency key + 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 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 12 January 2024 | 831.49 | 168.51 | 2.98 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 12 January 2024 | 660.0 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 17 January 2024 | 489.32 | 170.68 | 0.81 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | 01 February 2024 | 319.66 | 169.66 | 1.83 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | + | 5 | 31 | 01 June 2024 | 01 February 2024 | 148.17 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | + | 6 | 30 | 01 July 2024 | | 0.0 | 148.17 | 2.77 | 0.0 | 0.0 | 150.94 | 80.6 | 80.6 | 0.0 | 70.34 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 8.39 | 0.0 | 0.0 | 1008.39 | 938.05 | 938.05 | 0.0 | 70.34 | + 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 | + | 12 January 2024 | Payout Refund | 400.0 | 397.02 | 2.98 | 0.0 | 0.0 | 602.98 | false | false | + | 12 January 2024 | Interest Refund | 1.19 | 1.19 | 0.0 | 0.0 | 0.0 | 601.79 | false | false | + | 17 January 2024 | Merchant Issued Refund | 150.0 | 149.19 | 0.81 | 0.0 | 0.0 | 452.6 | false | false | + | 17 January 2024 | Interest Refund | 0.65 | 0.65 | 0.0 | 0.0 | 0.0 | 451.95 | false | false | + | 01 February 2024 | Repayment | 134.11 | 132.29 | 1.82 | 0.0 | 0.0 | 319.66 | false | false | + | 01 February 2024 | Payout Refund | 250.0 | 249.99 | 0.01 | 0.0 | 0.0 | 69.67 | false | false | + | 01 February 2024 | Interest Refund | 2.1 | 2.1 | 0.0 | 0.0 | 0.0 | 67.57 | false | false | + When Admin sets the business date to "01 March 2024" + And Customer makes "AUTOPAY" repayment on "01 March 2024" with 68.1 EUR transaction amount + Then Loan status will be "CLOSED_OBLIGATIONS_MET" + + @TestRailId:C3288 + Scenario: Verify the recalculated EMI after interest rate change on the repayment schedule + When Admin sets the business date to "01 January 2024" + When Admin creates a client with random data + When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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 + When Admin runs inline COB job for Loan When Admin sets the business date to "15 January 2024" - And Customer makes "AUTOPAY" repayment on "15 January 2024" with 34.02 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 + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 33.91 EUR transaction amount + When Admin creates and approves Loan reschedule with the following data: + | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | + | 02 February 2024 | 01 February 2024 | | | | | 4 | + When Admin runs inline COB job for Loan + When Admin sets the business date to "02 February 2024" When Admin runs inline COB job for Loan 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.46 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 66.74 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 49.92 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 34.02 | 15.9 | 0.09 | 0.0 | 0.0 | 15.99 | 0.0 | 0.0 | 0.0 | 15.99 | - | 5 | 31 | 01 June 2024 | 15 January 2024 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01| 17.01 | 0.0 | 0.0 | - | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01| 17.01 | 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 66.56 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 16.9 | 16.9 | 0.0 | 0.11 | + | 3 | 31 | 01 April 2024 | | 50.17 | 16.39 | 0.44 | 0.0 | 0.0 | 16.83 | 0.0 | 0.0 | 0.0 | 16.83 | + | 4 | 30 | 01 May 2024 | | 33.51 | 16.66 | 0.17 | 0.0 | 0.0 | 16.83 | 0.0 | 0.0 | 0.0 | 16.83 | + | 5 | 31 | 01 June 2024 | | 16.79 | 16.72 | 0.11 | 0.0 | 0.0 | 16.83 | 0.0 | 0.0 | 0.0 | 16.83 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.79 | 0.06 | 0.0 | 0.0 | 16.85 | 0.0 | 0.0 | 0.0 | 16.85 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.04 | 0.0 | 0.0 | 101.04 | 34.02| 34.02 | 0.0 | 67.02 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.36 | 0.0 | 0.0 | 101.36 | 33.91 | 16.9 | 0.0 | 67.45 | 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 | @@ -4807,11 +5268,28 @@ Feature: EMI calculation and repayment schedule checks for interest bearing loan | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 15 January 2024 | Repayment | 34.02 | 34.02 | 0.0 | 0.0 | 0.0 | 65.98 | false | false | - When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + | 15 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 16 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 17 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 18 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 19 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 20 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 21 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 22 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 23 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 24 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 25 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 26 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 27 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 28 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 29 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 30 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 31 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 01 February 2024 | Repayment | 33.91 | 33.33 | 0.58 | 0.0 | 0.0 | 66.67 | false | false | + | 01 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - @TestRailId:C3292 - Scenario: Verify Interest recalculation - EARLY repayment, adjust LAST installment - UC4: 360/30, pre-closure after early payment + @TestRailId:C3289 + Scenario: Verify Interest recalculation - EARLY repayment, adjust LAST installment - UC1: 360/30, early repayment with amount less then emi amount When Admin sets the business date to "01 January 2024" When Admin creates a client with random data When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "LAST_INSTALLMENT" future installment allocation rule @@ -4836,28 +5314,27 @@ Feature: EMI calculation and repayment schedule checks for interest bearing loan 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 | -# --- Early repayment with 17.01 EUR on 15 Jan --- +# --- Early repayment with 15 EUR on 15 Jan --- When Admin sets the business date to "15 January 2024" - And Customer makes "AUTOPAY" repayment on "15 January 2024" with 17.01 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "15 January 2024" with 15 EUR transaction amount When Admin runs inline COB job for Loan -# --- schedule allocation before pre-closure --- 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.52 | 16.48 | 0.53 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 66.9 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.18 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.36 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 17.01 | 16.35 | 0.1 | 0.0 | 0.0 | 16.45 | 0.0 | 0.0 | 0.0 | 16.45 | - | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01| 17.01 | 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 | 1.5 | 0.0 | 0.0 | 101.5 | 17.01| 17.01 | 0.0 | 84.49 | - 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 | - | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 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 | 31 | 01 February 2024 | | 83.52 | 16.48 | 0.53 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 66.91 | 16.61 | 0.4 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.2 | 16.71 | 0.3 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.4 | 16.8 | 0.21 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.5 | 16.9 | 0.11 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.5 | 0.01 | 0.0 | 0.0 | 16.51 | 15.0 | 15.0 | 0.0 | 1.51 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.56 | 0.0 | 0.0 | 101.56 | 15 | 15 | 0.0 | 86.56 | + 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 | + | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | @@ -4869,24 +5346,51 @@ Feature: EMI calculation and repayment schedule checks for interest bearing loan | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 15 January 2024 | Repayment | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 82.99 | false | false | -# --- Early repayment with 83.07 EUR on 20 Jan --- - When Admin sets the business date to "20 January 2024" - And Customer makes "AUTOPAY" repayment on "20 January 2024" with 83.33 EUR transaction amount + | 15 January 2024 | Repayment | 15.0 | 15.0 | 0.0 | 0.0 | 0.0 | 85.0 | false | false | + When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + + @TestRailId:C3290 + Scenario: Verify Interest recalculation - EARLY repayment, adjust LAST installment - UC2: 360/30, early repayment emi amount paid + When Admin sets the business date to "01 January 2024" + When Admin creates a client with random data + When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "LAST_INSTALLMENT" future installment allocation rule + When Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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 When Admin runs inline COB job for Loan -# --- schedule allocation after pre-closure --- 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 20 January 2024 | 85.05 | 14.95 | 0.34 | 0.0 | 0.0 | 15.29 | 15.29| 15.29 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 20 January 2024 | 68.04 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01| 17.01 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | 20 January 2024 | 51.03 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01| 17.01 | 0.0 | 0.0 | - | 4 | 30 | 01 May 2024 | 20 January 2024 | 34.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01| 17.01 | 0.0 | 0.0 | - | 5 | 31 | 01 June 2024 | 20 January 2024 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01| 17.01 | 0.0 | 0.0 | - | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01| 17.01 | 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 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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.34 | 0.0 | 0.0 | 100.34 | 100.34| 100.34 | 0.0 | 0.0 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + 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 | +# --- Early repayment with 17.01 EUR on 15 Jan --- + When Admin sets the business date to "15 January 2024" + And Customer makes "AUTOPAY" repayment on "15 January 2024" with 17.01 EUR transaction amount + When Admin runs inline COB job for Loan + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.52 | 16.48 | 0.53 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 66.9 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.18 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.36 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 17.01 | 16.35 | 0.1 | 0.0 | 0.0 | 16.45 | 0.0 | 0.0 | 0.0 | 16.45 | + | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 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 | 1.5 | 0.0 | 0.0 | 101.5 | 17.01 | 17.01 | 0.0 | 84.49 | 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 | @@ -4904,19 +5408,19 @@ Feature: EMI calculation and repayment schedule checks for interest bearing loan | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | | 15 January 2024 | Repayment | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 82.99 | false | false | - | 20 January 2024 | Repayment | 83.33 | 82.99 | 0.34 | 0.0 | 0.0 | 0.0 | false | false | - | 20 January 2024 | Accrual | 0.1 | 0.0 | 0.1 | 0.0 | 0.0 | 0.0 | false | false | When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - @TestRailId:C3297 - Scenario: Verify the Loan reschedule - Interest modification - UC1: Interest modification after early payment with Adjustment to NEXT installment + @TestRailId:C3291 + Scenario: Verify Interest recalculation - EARLY repayment, adjust LAST installment - UC3: 360/30, early repayment with excess emi amount paid When Admin sets the business date to "01 January 2024" When Admin creates a client with random data + When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "LAST_INSTALLMENT" future installment allocation rule When Admin creates a fully customized loan with the following data: | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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 + When Admin runs inline COB job for Loan 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -4932,61 +5436,52 @@ Feature: EMI calculation and repayment schedule checks for interest bearing loan 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 | -# --- 1st installment paid on due date --- +# --- Early repayment with 34.02 EUR on 15 Jan --- When Admin sets the business date to "15 January 2024" - And Customer makes "AUTOPAY" repayment on "15 January 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 15 January 2024 | 83.25 | 16.75 | 0.26 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.0 | 16.25 | 0.76 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.38 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.66 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.85 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.85 | 0.1 | 0.0 | 0.0 | 16.95 | 0.0 | 0.0 | 0.0 | 16.95 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.0 | 0.0 | 0.0 | 102.0 | 17.01 | 17.01 | 0.0 | 84.99 | - 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 | - | 15 January 2024 | Repayment | 17.01 | 16.75 | 0.26 | 0.0 | 0.0 | 83.25 | false | false | -# --- Loan reschedule: Interest rate modification between two installments --- - When Admin sets the business date to "19 January 2024" - When Admin creates and approves Loan reschedule with the following data: - | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | - | 20 January 2024 | 19 January 2024 | | | | | 4 | - When Admin runs inline COB job for Loan - When Admin sets the business date to "20 January 2024" + And Customer makes "AUTOPAY" repayment on "15 January 2024" with 34.02 EUR transaction amount When Admin runs inline COB job for Loan - 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 15 January 2024 | 83.25 | 16.75 | 0.26 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 66.86 | 16.39 | 0.46 | 0.0 | 0.0 | 16.85 | 0.0 | 0.0 | 0.0 | 16.85 | - | 3 | 31 | 01 April 2024 | | 50.23 | 16.63 | 0.22 | 0.0 | 0.0 | 16.85 | 0.0 | 0.0 | 0.0 | 16.85 | - | 4 | 30 | 01 May 2024 | | 33.55 | 16.68 | 0.17 | 0.0 | 0.0 | 16.85 | 0.0 | 0.0 | 0.0 | 16.85 | - | 5 | 31 | 01 June 2024 | | 16.81 | 16.74 | 0.11 | 0.0 | 0.0 | 16.85 | 0.0 | 0.0 | 0.0 | 16.85 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.81 | 0.06 | 0.0 | 0.0 | 16.87 | 0.0 | 0.0 | 0.0 | 16.87 | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.46 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 66.74 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 49.92 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 34.02 | 15.9 | 0.09 | 0.0 | 0.0 | 15.99 | 0.0 | 0.0 | 0.0 | 15.99 | + | 5 | 31 | 01 June 2024 | 15 January 2024 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | + | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 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 | 1.28 | 0.0 | 0.0 | 101.28 | 17.01 | 17.01 | 0.0 | 84.27 | + | 100.0 | 1.04 | 0.0 | 0.0 | 101.04 | 34.02 | 34.02 | 0.0 | 67.02 | 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 | - | 15 January 2024 | Repayment | 17.01 | 16.75 | 0.26 | 0.0 | 0.0 | 83.25 | false | false | - | 18 January 2024 | Accrual | 0.31 | 0.0 | 0.31 | 0.0 | 0.0 | 0.0 | false | false | - | 19 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2024 | Repayment | 34.02 | 34.02 | 0.0 | 0.0 | 0.0 | 65.98 | false | false | + When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - @TestRailId:C3298 - Scenario: Verify the Loan reschedule - Interest modification - UC2: Interest modification after early partial payment with Adjustment to NEXT installment + @TestRailId:C3292 + Scenario: Verify Interest recalculation - EARLY repayment, adjust LAST installment - UC4: 360/30, pre-closure after early payment When Admin sets the business date to "01 January 2024" When Admin creates a client with random data + When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "LAST_INSTALLMENT" future installment allocation rule When Admin creates a fully customized loan with the following data: | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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 + When Admin runs inline COB job for Loan 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -5002,54 +5497,80 @@ Feature: EMI calculation and repayment schedule checks for interest bearing loan 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 | -# --- 1st installment paid on due date --- +# --- Early repayment with 17.01 EUR on 15 Jan --- When Admin sets the business date to "15 January 2024" - And Customer makes "AUTOPAY" repayment on "15 January 2024" with 17.0 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "15 January 2024" with 17.01 EUR transaction amount + When Admin runs inline COB job for Loan +# --- schedule allocation before pre-closure --- 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.24 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 17.0 | 17.0 | 0.0 | 0.01 | - | 2 | 29 | 01 March 2024 | | 67.0 | 16.24 | 0.77 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.38 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.66 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.85 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.85 | 0.1 | 0.0 | 0.0 | 16.95 | 0.0 | 0.0 | 0.0 | 16.95 | + | 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 | 31 | 01 February 2024 | | 83.52 | 16.48 | 0.53 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 66.9 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.18 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.36 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 17.01 | 16.35 | 0.1 | 0.0 | 0.0 | 16.45 | 0.0 | 0.0 | 0.0 | 16.45 | + | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 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 | 2.0 | 0.0 | 0.0 | 102.0 | 17.0 | 17.0 | 0.0 | 85.0 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.5 | 0.0 | 0.0 | 101.5 | 17.01 | 17.01 | 0.0 | 84.49 | 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 | - | 15 January 2024 | Repayment | 17.0 | 16.75 | 0.25 | 0.0 | 0.0 | 83.25 | false | false | -# --- Loan reschedule: Interest rate modification between two installments --- - When Admin sets the business date to "19 January 2024" - When Admin creates and approves Loan reschedule with the following data: - | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | - | 20 January 2024 | 19 January 2024 | | | | | 4 | - When Admin runs inline COB job for Loan + | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2024 | Repayment | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 82.99 | false | false | +# --- Early repayment with 83.07 EUR on 20 Jan --- When Admin sets the business date to "20 January 2024" + And Customer makes "AUTOPAY" repayment on "20 January 2024" with 83.33 EUR transaction amount When Admin runs inline COB job for Loan - 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.24 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 17.0 | 17.0 | 0.0 | 0.01 | - | 2 | 29 | 01 March 2024 | | 66.86 | 16.38 | 0.47 | 0.0 | 0.0 | 16.85 | 0.0 | 0.0 | 0.0 | 16.85 | - | 3 | 31 | 01 April 2024 | | 50.23 | 16.63 | 0.22 | 0.0 | 0.0 | 16.85 | 0.0 | 0.0 | 0.0 | 16.85 | - | 4 | 30 | 01 May 2024 | | 33.55 | 16.68 | 0.17 | 0.0 | 0.0 | 16.85 | 0.0 | 0.0 | 0.0 | 16.85 | - | 5 | 31 | 01 June 2024 | | 16.81 | 16.74 | 0.11 | 0.0 | 0.0 | 16.85 | 0.0 | 0.0 | 0.0 | 16.85 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.81 | 0.06 | 0.0 | 0.0 | 16.87 | 0.0 | 0.0 | 0.0 | 16.87 | +# --- schedule allocation after pre-closure --- + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 20 January 2024 | 85.05 | 14.95 | 0.34 | 0.0 | 0.0 | 15.29 | 15.29 | 15.29 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 20 January 2024 | 68.04 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 20 January 2024 | 51.03 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | 20 January 2024 | 34.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | + | 5 | 31 | 01 June 2024 | 20 January 2024 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | + | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 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 | 1.28 | 0.0 | 0.0 | 101.28 | 17.0 | 17.0 | 0.0 | 84.28 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 0.34 | 0.0 | 0.0 | 100.34 | 100.34 | 100.34 | 0.0 | 0.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 | - | 15 January 2024 | Repayment | 17.0 | 16.75 | 0.25 | 0.0 | 0.0 | 83.25 | false | false | - | 18 January 2024 | Accrual | 0.31 | 0.0 | 0.31 | 0.0 | 0.0 | 0.0 | false | false | - | 19 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2024 | Repayment | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 82.99 | false | false | + | 20 January 2024 | Repayment | 83.33 | 82.99 | 0.34 | 0.0 | 0.0 | 0.0 | false | false | + | 20 January 2024 | Accrual | 0.1 | 0.0 | 0.1 | 0.0 | 0.0 | 0.0 | false | false | + When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - @TestRailId:C3311 - Scenario: Verify the Loan reschedule - Interest modification - UC2: Interest modification after early partial payment with Adjustment to LAST installment + @TestRailId:C3312 + Scenario: Verify Interest recalculation - EARLY repayment, adjust LAST installment - UC5: 360/30, interest modification after early payment When Admin sets the business date to "01 January 2024" When Admin creates a client with random data When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "LAST_INSTALLMENT" future installment allocation rule @@ -5058,6 +5579,7 @@ Feature: EMI calculation and repayment schedule checks for interest bearing loan | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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 + When Admin runs inline COB job for Loan 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -5073,58 +5595,85 @@ Feature: EMI calculation and repayment schedule checks for interest bearing loan 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 | -# --- 1st installment paid on due date --- +# --- Early repayment with 17.01 EUR on 15 Jan --- When Admin sets the business date to "15 January 2024" And Customer makes "AUTOPAY" repayment on "15 January 2024" with 17.01 EUR transaction amount + When Admin runs inline COB job for Loan 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.52 | 16.48 | 0.53 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 66.9 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.18 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.36 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 17.01 | 16.35 | 0.1 | 0.0 | 0.0 | 16.45 | 0.0 | 0.0 | 0.0 | 16.45 | - | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 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 | 31 | 01 February 2024 | | 83.52 | 16.48 | 0.53 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 66.9 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.18 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.36 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 17.01 | 16.35 | 0.1 | 0.0 | 0.0 | 16.45 | 0.0 | 0.0 | 0.0 | 16.45 | + | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 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 | 1.5 | 0.0 | 0.0 | 101.5 | 17.01 | 17.01 | 0.0 | 84.49 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.5 | 0.0 | 0.0 | 101.5 | 17.01 | 17.01 | 0.0 | 84.49 | 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 | + | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | | 15 January 2024 | Repayment | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 82.99 | false | false | -# --- Loan reschedule: Interest rate modification between two installments --- - When Admin sets the business date to "19 January 2024" - When Admin creates and approves Loan reschedule with the following data: - | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | - | 20 January 2024 | 19 January 2024 | | | | | 4 | - When Admin runs inline COB job for Loan +# --- interest change to 0.04(4%) on 20 Jan --- When Admin sets the business date to "20 January 2024" + When Admin creates and approves Loan reschedule with the following data: + | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | + | 21 January 2024 | 20 January 2024 | | | | | 4 | When Admin runs inline COB job for Loan - 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.64 | 16.36 | 0.44 | 0.0 | 0.0 | 16.8 | 0.0 | 0.0 | 0.0 | 16.8 | - | 2 | 29 | 01 March 2024 | | 67.06 | 16.58 | 0.22 | 0.0 | 0.0 | 16.8 | 0.0 | 0.0 | 0.0 | 16.8 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.63 | 0.17 | 0.0 | 0.0 | 16.8 | 0.0 | 0.0 | 0.0 | 16.8 | - | 4 | 30 | 01 May 2024 | | 33.74 | 16.69 | 0.11 | 0.0 | 0.0 | 16.8 | 0.0 | 0.0 | 0.0 | 16.8 | - | 5 | 31 | 01 June 2024 | | 17.01 | 16.73 | 0.06 | 0.0 | 0.0 | 16.79 | 0.0 | 0.0 | 0.0 | 16.79 | - | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.65 | 16.35 | 0.45 | 0.0 | 0.0 | 16.8 | 0.0 | 0.0 | 0.0 | 16.8 | + | 2 | 29 | 01 March 2024 | | 67.07 | 16.58 | 0.22 | 0.0 | 0.0 | 16.8 | 0.0 | 0.0 | 0.0 | 16.8 | + | 3 | 31 | 01 April 2024 | | 50.44 | 16.63 | 0.17 | 0.0 | 0.0 | 16.8 | 0.0 | 0.0 | 0.0 | 16.8 | + | 4 | 30 | 01 May 2024 | | 33.75 | 16.69 | 0.11 | 0.0 | 0.0 | 16.8 | 0.0 | 0.0 | 0.0 | 16.8 | + | 5 | 31 | 01 June 2024 | | 17.01 | 16.74 | 0.06 | 0.0 | 0.0 | 16.8 | 0.0 | 0.0 | 0.0 | 16.8 | + | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 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 | 1.0 | 0.0 | 0.0 | 101.0 | 17.01 | 17.01 | 0.0 | 83.99 | + | 100.0 | 1.01 | 0.0 | 0.0 | 101.01 | 17.01 | 17.01 | 0.0 | 84.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 | + | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | | 15 January 2024 | Repayment | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 82.99 | false | false | - | 18 January 2024 | Accrual | 0.31 | 0.0 | 0.31 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 16 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 17 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 18 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | | 19 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - @TestRailId:C3299 - Scenario: Verify the Loan reschedule - Interest modification - UC2: Interest modification after first installment with Adjustment to NEXT installment + @TestRailId:C3297 + Scenario: Verify the Loan reschedule - Interest modification - UC1: Interest modification after early payment with Adjustment to NEXT installment When Admin sets the business date to "01 January 2024" When Admin creates a client with random data - When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | @@ -5149,38 +5698,251 @@ Feature: EMI calculation and repayment schedule checks for interest bearing loan When Admin sets the business date to "15 January 2024" And Customer makes "AUTOPAY" repayment on "15 January 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 15 January 2024 | 83.25 | 16.75 | 0.26 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.0 | 16.25 | 0.76 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.38 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.66 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.85 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.85 | 0.1 | 0.0 | 0.0 | 16.95 | 0.0 | 0.0 | 0.0 | 16.95 | + | 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 | 31 | 01 February 2024 | 15 January 2024 | 83.25 | 16.75 | 0.26 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.0 | 16.25 | 0.76 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.38 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.66 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.85 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.85 | 0.1 | 0.0 | 0.0 | 16.95 | 0.0 | 0.0 | 0.0 | 16.95 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.0 | 0.0 | 0.0 | 102.0 | 17.01 | 17.01 | 0.0 | 84.99 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.0 | 0.0 | 0.0 | 102.0 | 17.01 | 17.01 | 0.0 | 84.99 | 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 | | 15 January 2024 | Repayment | 17.01 | 16.75 | 0.26 | 0.0 | 0.0 | 83.25 | false | false | -# --- Loan reschedule: Interest rate modification on Feb 15 --- - When Admin sets the business date to "15 February 2024" +# --- Loan reschedule: Interest rate modification between two installments --- + When Admin sets the business date to "19 January 2024" When Admin creates and approves Loan reschedule with the following data: - | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | - | 16 February 2024 | 15 February 2024 | | | | | 4 | + | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | + | 20 January 2024 | 19 January 2024 | | | | | 4 | When Admin runs inline COB job for Loan - When Admin sets the business date to "16 February 2024" + When Admin sets the business date to "20 January 2024" When Admin runs inline COB job for Loan 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 15 January 2024 | 83.25 | 16.75 | 0.26 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.0 | 16.25 | 0.64 | 0.0 | 0.0 | 16.89 | 0.0 | 0.0 | 0.0 | 16.89 | - | 3 | 31 | 01 April 2024 | | 50.33 | 16.67 | 0.22 | 0.0 | 0.0 | 16.89 | 0.0 | 0.0 | 0.0 | 16.89 | - | 4 | 30 | 01 May 2024 | | 33.61 | 16.72 | 0.17 | 0.0 | 0.0 | 16.89 | 0.0 | 0.0 | 0.0 | 16.89 | - | 5 | 31 | 01 June 2024 | | 16.83 | 16.78 | 0.11 | 0.0 | 0.0 | 16.89 | 0.0 | 0.0 | 0.0 | 16.89 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.83 | 0.06 | 0.0 | 0.0 | 16.89 | 0.0 | 0.0 | 0.0 | 16.89 | + | 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 | 31 | 01 February 2024 | 15 January 2024 | 83.25 | 16.75 | 0.26 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 66.86 | 16.39 | 0.46 | 0.0 | 0.0 | 16.85 | 0.0 | 0.0 | 0.0 | 16.85 | + | 3 | 31 | 01 April 2024 | | 50.23 | 16.63 | 0.22 | 0.0 | 0.0 | 16.85 | 0.0 | 0.0 | 0.0 | 16.85 | + | 4 | 30 | 01 May 2024 | | 33.55 | 16.68 | 0.17 | 0.0 | 0.0 | 16.85 | 0.0 | 0.0 | 0.0 | 16.85 | + | 5 | 31 | 01 June 2024 | | 16.81 | 16.74 | 0.11 | 0.0 | 0.0 | 16.85 | 0.0 | 0.0 | 0.0 | 16.85 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.81 | 0.06 | 0.0 | 0.0 | 16.87 | 0.0 | 0.0 | 0.0 | 16.87 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.28 | 0.0 | 0.0 | 101.28 | 17.01 | 17.01 | 0.0 | 84.27 | + 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 | + | 15 January 2024 | Repayment | 17.01 | 16.75 | 0.26 | 0.0 | 0.0 | 83.25 | false | false | + | 18 January 2024 | Accrual | 0.31 | 0.0 | 0.31 | 0.0 | 0.0 | 0.0 | false | false | + | 19 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + + @TestRailId:C3298 + Scenario: Verify the Loan reschedule - Interest modification - UC2: Interest modification after early partial payment with Adjustment to NEXT installment + 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + 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 | +# --- 1st installment paid on due date --- + When Admin sets the business date to "15 January 2024" + And Customer makes "AUTOPAY" repayment on "15 January 2024" with 17.0 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.24 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 17.0 | 17.0 | 0.0 | 0.01 | + | 2 | 29 | 01 March 2024 | | 67.0 | 16.24 | 0.77 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.38 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.66 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.85 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.85 | 0.1 | 0.0 | 0.0 | 16.95 | 0.0 | 0.0 | 0.0 | 16.95 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.0 | 0.0 | 0.0 | 102.0 | 17.0 | 17.0 | 0.0 | 85.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 | + | 15 January 2024 | Repayment | 17.0 | 16.75 | 0.25 | 0.0 | 0.0 | 83.25 | false | false | +# --- Loan reschedule: Interest rate modification between two installments --- + When Admin sets the business date to "19 January 2024" + When Admin creates and approves Loan reschedule with the following data: + | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | + | 20 January 2024 | 19 January 2024 | | | | | 4 | + When Admin runs inline COB job for Loan + When Admin sets the business date to "20 January 2024" + When Admin runs inline COB job for Loan + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.24 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 17.0 | 17.0 | 0.0 | 0.01 | + | 2 | 29 | 01 March 2024 | | 66.86 | 16.38 | 0.47 | 0.0 | 0.0 | 16.85 | 0.0 | 0.0 | 0.0 | 16.85 | + | 3 | 31 | 01 April 2024 | | 50.23 | 16.63 | 0.22 | 0.0 | 0.0 | 16.85 | 0.0 | 0.0 | 0.0 | 16.85 | + | 4 | 30 | 01 May 2024 | | 33.55 | 16.68 | 0.17 | 0.0 | 0.0 | 16.85 | 0.0 | 0.0 | 0.0 | 16.85 | + | 5 | 31 | 01 June 2024 | | 16.81 | 16.74 | 0.11 | 0.0 | 0.0 | 16.85 | 0.0 | 0.0 | 0.0 | 16.85 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.81 | 0.06 | 0.0 | 0.0 | 16.87 | 0.0 | 0.0 | 0.0 | 16.87 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.28 | 0.0 | 0.0 | 101.28 | 17.0 | 17.0 | 0.0 | 84.28 | + 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 | + | 15 January 2024 | Repayment | 17.0 | 16.75 | 0.25 | 0.0 | 0.0 | 83.25 | false | false | + | 18 January 2024 | Accrual | 0.31 | 0.0 | 0.31 | 0.0 | 0.0 | 0.0 | false | false | + | 19 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + + @TestRailId:C3311 + Scenario: Verify the Loan reschedule - Interest modification - UC2: Interest modification after early partial payment with Adjustment to LAST installment + When Admin sets the business date to "01 January 2024" + When Admin creates a client with random data + When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "LAST_INSTALLMENT" future installment allocation rule + When Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + 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 | +# --- 1st installment paid on due date --- + When Admin sets the business date to "15 January 2024" + And Customer makes "AUTOPAY" repayment on "15 January 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.52 | 16.48 | 0.53 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 66.9 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.18 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.36 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 17.01 | 16.35 | 0.1 | 0.0 | 0.0 | 16.45 | 0.0 | 0.0 | 0.0 | 16.45 | + | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 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 | 1.5 | 0.0 | 0.0 | 101.5 | 17.01 | 17.01 | 0.0 | 84.49 | + 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 | + | 15 January 2024 | Repayment | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 82.99 | false | false | +# --- Loan reschedule: Interest rate modification between two installments --- + When Admin sets the business date to "19 January 2024" + When Admin creates and approves Loan reschedule with the following data: + | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | + | 20 January 2024 | 19 January 2024 | | | | | 4 | + When Admin runs inline COB job for Loan + When Admin sets the business date to "20 January 2024" + When Admin runs inline COB job for Loan + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.64 | 16.36 | 0.44 | 0.0 | 0.0 | 16.8 | 0.0 | 0.0 | 0.0 | 16.8 | + | 2 | 29 | 01 March 2024 | | 67.06 | 16.58 | 0.22 | 0.0 | 0.0 | 16.8 | 0.0 | 0.0 | 0.0 | 16.8 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.63 | 0.17 | 0.0 | 0.0 | 16.8 | 0.0 | 0.0 | 0.0 | 16.8 | + | 4 | 30 | 01 May 2024 | | 33.74 | 16.69 | 0.11 | 0.0 | 0.0 | 16.8 | 0.0 | 0.0 | 0.0 | 16.8 | + | 5 | 31 | 01 June 2024 | | 17.01 | 16.73 | 0.06 | 0.0 | 0.0 | 16.79 | 0.0 | 0.0 | 0.0 | 16.79 | + | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 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 | 1.0 | 0.0 | 0.0 | 101.0 | 17.01 | 17.01 | 0.0 | 83.99 | + 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 | + | 15 January 2024 | Repayment | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 82.99 | false | false | + | 18 January 2024 | Accrual | 0.31 | 0.0 | 0.31 | 0.0 | 0.0 | 0.0 | false | false | + | 19 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + + @TestRailId:C3299 + Scenario: Verify the Loan reschedule - Interest modification - UC2: Interest modification after first installment with Adjustment to NEXT installment + When Admin sets the business date to "01 January 2024" + When Admin creates a client with random data + When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + 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 | +# --- 1st installment paid on due date --- + When Admin sets the business date to "15 January 2024" + And Customer makes "AUTOPAY" repayment on "15 January 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 15 January 2024 | 83.25 | 16.75 | 0.26 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.0 | 16.25 | 0.76 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.38 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.66 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.85 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.85 | 0.1 | 0.0 | 0.0 | 16.95 | 0.0 | 0.0 | 0.0 | 16.95 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.0 | 0.0 | 0.0 | 102.0 | 17.01 | 17.01 | 0.0 | 84.99 | + 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 | + | 15 January 2024 | Repayment | 17.01 | 16.75 | 0.26 | 0.0 | 0.0 | 83.25 | false | false | +# --- Loan reschedule: Interest rate modification on Feb 15 --- + When Admin sets the business date to "15 February 2024" + When Admin creates and approves Loan reschedule with the following data: + | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | + | 16 February 2024 | 15 February 2024 | | | | | 4 | + When Admin runs inline COB job for Loan + When Admin sets the business date to "16 February 2024" + When Admin runs inline COB job for Loan + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 15 January 2024 | 83.25 | 16.75 | 0.26 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.0 | 16.25 | 0.64 | 0.0 | 0.0 | 16.89 | 0.0 | 0.0 | 0.0 | 16.89 | + | 3 | 31 | 01 April 2024 | | 50.33 | 16.67 | 0.22 | 0.0 | 0.0 | 16.89 | 0.0 | 0.0 | 0.0 | 16.89 | + | 4 | 30 | 01 May 2024 | | 33.61 | 16.72 | 0.17 | 0.0 | 0.0 | 16.89 | 0.0 | 0.0 | 0.0 | 16.89 | + | 5 | 31 | 01 June 2024 | | 16.83 | 16.78 | 0.11 | 0.0 | 0.0 | 16.89 | 0.0 | 0.0 | 0.0 | 16.89 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.83 | 0.06 | 0.0 | 0.0 | 16.89 | 0.0 | 0.0 | 0.0 | 16.89 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100.0 | 1.46 | 0.0 | 0.0 | 101.46 | 17.01 | 17.01 | 0.0 | 84.45 | @@ -5204,34 +5966,34 @@ Feature: EMI calculation and repayment schedule checks for interest bearing loan When Admin sets the business date to "22 January 2021" When Customer makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "22 January 2021" with 1000 EUR transaction amount and system-generated Idempotency key Then Loan Repayment schedule has 1 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 2021 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2021 | 22 January 2021 | 0.0 | 1000.0 | 5.7 | 0.0 | 0.0 | 1005.7 | 1005.7 | 1005.7 | 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.0 | 5.7 | 0.0 | 0.0 | 1005.7 | 1005.7 | 1005.7 | 0.0 | 0.0 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2021 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | - | 22 January 2021 | Merchant Issued Refund | 1000.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | - | 22 January 2021 | Interest Refund | 5.7 | 0.0 | 5.7 | 0.0 | 0.0 | 0.0 | false | false | - | 22 January 2021 | Accrual | 5.7 | 0.0 | 5.7 | 0.0 | 0.0 | 0.0 | false | false | + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2021 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2021 | 22 January 2021 | 0.0 | 1000.0 | 5.7 | 0.0 | 0.0 | 1005.7 | 1005.7 | 1005.7 | 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.0 | 5.7 | 0.0 | 0.0 | 1005.7 | 1005.7 | 1005.7 | 0.0 | 0.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2021 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | + | 22 January 2021 | Merchant Issued Refund | 1000.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | + | 22 January 2021 | Interest Refund | 5.7 | 0.0 | 5.7 | 0.0 | 0.0 | 0.0 | false | false | + | 22 January 2021 | Accrual | 5.7 | 0.0 | 5.7 | 0.0 | 0.0 | 0.0 | false | false | And Customer makes "AUTOPAY" repayment on "10 January 2021" with 85.63 EUR transaction amount Then Loan Repayment schedule has 1 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 2021 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2021 | 22 January 2021 | 0.0 | 1000.0 | 5.42 | 0.0 | 0.0 | 1005.42 | 1005.42 | 1005.42 | 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 2021 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2021 | 22 January 2021 | 0.0 | 1000.0 | 5.42 | 0.0 | 0.0 | 1005.42 | 1005.42 | 1005.42 | 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.0 | 5.42 | 0.0 | 0.0 | 1005.42 | 1005.42 | 1005.42 | 0.0 | 0.0 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 5.42 | 0.0 | 0.0 | 1005.42 | 1005.42 | 1005.42 | 0.0 | 0.0 | Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2021 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | - | 10 January 2021 | Repayment | 85.63 | 85.63 | 0.0 | 0.0 | 0.0 | 914.37 | false | false | - | 22 January 2021 | Accrual | 5.7 | 0.0 | 5.7 | 0.0 | 0.0 | 0.0 | false | false | - | 22 January 2021 | Merchant Issued Refund | 1000.0 | 914.37 | 5.42 | 0.0 | 0.0 | 0.0 | false | true | - | 22 January 2021 | Interest Refund | 5.42 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | true | - | 22 January 2021 | Accrual Adjustment | 0.28 | 0.0 | 0.28 | 0.0 | 0.0 | 0.0 | false | false | + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2021 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | + | 10 January 2021 | Repayment | 85.63 | 85.63 | 0.0 | 0.0 | 0.0 | 914.37 | false | false | + | 22 January 2021 | Accrual | 5.7 | 0.0 | 5.7 | 0.0 | 0.0 | 0.0 | false | false | + | 22 January 2021 | Merchant Issued Refund | 1000.0 | 914.37 | 5.42 | 0.0 | 0.0 | 0.0 | false | true | + | 22 January 2021 | Interest Refund | 5.42 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | true | + | 22 January 2021 | Accrual Adjustment | 0.28 | 0.0 | 0.28 | 0.0 | 0.0 | 0.0 | false | false | @TestRailId:C3302 Scenario: UC18-2 - In case of repayment reversal the Interest Refund transaction needs to be recalculated @@ -5246,50 +6008,50 @@ Feature: EMI calculation and repayment schedule checks for interest bearing loan When Admin sets the business date to "10 January 2021" And Customer makes "AUTOPAY" repayment on "10 January 2021" with 85.63 EUR transaction amount Then Loan Repayment schedule has 1 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 2021 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2021 | | 0.0 | 1000.0 | 7.9 | 0.0 | 0.0 | 1007.9 | 85.63 | 85.63 | 0.0 | 922.27 | + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2021 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2021 | | 0.0 | 1000.0 | 7.9 | 0.0 | 0.0 | 1007.9 | 85.63 | 85.63 | 0.0 | 922.27 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 1000.0 | 7.9 | 0.0 | 0.0 | 1007.9 | 85.63 | 85.63 | 0.0 | 922.27 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 7.9 | 0.0 | 0.0 | 1007.9 | 85.63 | 85.63 | 0.0 | 922.27 | Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2021 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | - | 10 January 2021 | Repayment | 85.63 | 85.63 | 0.0 | 0.0 | 0.0 | 914.37 | false | false | + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2021 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | + | 10 January 2021 | Repayment | 85.63 | 85.63 | 0.0 | 0.0 | 0.0 | 914.37 | false | false | When Admin sets the business date to "22 January 2021" When Customer makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "22 January 2021" with 1000 EUR transaction amount and system-generated Idempotency key Then Loan Repayment schedule has 1 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 2021 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2021 | 22 January 2021 | 0.0 | 1000.0 | 5.42 | 0.0 | 0.0 | 1005.42 | 1005.42 | 1005.42 | 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.0 | 5.42 | 0.0 | 0.0 | 1005.42 | 1005.42 | 1005.42 | 0.0 | 0.0 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2021 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | - | 10 January 2021 | Repayment | 85.63 | 85.63 | 0.0 | 0.0 | 0.0 | 914.37 | false | false | - | 22 January 2021 | Merchant Issued Refund | 1000.0 | 914.37 | 5.42 | 0.0 | 0.0 | 0.0 | false | false | - | 22 January 2021 | Interest Refund | 5.42 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | - | 22 January 2021 | Accrual | 5.42 | 0.0 | 5.42 | 0.0 | 0.0 | 0.0 | false | false | + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2021 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2021 | 22 January 2021 | 0.0 | 1000.0 | 5.42 | 0.0 | 0.0 | 1005.42 | 1005.42 | 1005.42 | 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.0 | 5.42 | 0.0 | 0.0 | 1005.42 | 1005.42 | 1005.42 | 0.0 | 0.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2021 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | + | 10 January 2021 | Repayment | 85.63 | 85.63 | 0.0 | 0.0 | 0.0 | 914.37 | false | false | + | 22 January 2021 | Merchant Issued Refund | 1000.0 | 914.37 | 5.42 | 0.0 | 0.0 | 0.0 | false | false | + | 22 January 2021 | Interest Refund | 5.42 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | + | 22 January 2021 | Accrual | 5.42 | 0.0 | 5.42 | 0.0 | 0.0 | 0.0 | false | false | When Admin sets the business date to "23 January 2021" And Admin makes Credit Balance Refund transaction on "23 January 2021" with 85.63 EUR transaction amount When Customer undo "1"th "Repayment" transaction made on "10 January 2021" Then Loan Repayment schedule has 1 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 2021 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2021 | | 0.0 | 1085.63 | 5.7 | 0.0 | 0.0 | 1091.33 | 1005.7 | 1005.7 | 0.0 | 85.63 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 1085.63 | 5.7 | 0.0 | 0.0 | 1091.33 | 1005.7 | 1005.7 | 0.0 | 85.63 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2021 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | - | 10 January 2021 | Repayment | 85.63 | 85.63 | 0.0 | 0.0 | 0.0 | 914.37 | true | false | - | 22 January 2021 | Merchant Issued Refund | 1000.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | true | - | 22 January 2021 | Interest Refund | 5.7 | 0.0 | 5.7 | 0.0 | 0.0 | 0.0 | false | true | - | 23 January 2021 | Credit Balance Refund | 85.63 | 85.63 | 0.0 | 0.0 | 0.0 | 85.63 | false | true | - | 22 January 2021 | Accrual | 5.42 | 0.0 | 5.42 | 0.0 | 0.0 | 0.0 | false | false | + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2021 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2021 | | 0.0 | 1085.63 | 5.7 | 0.0 | 0.0 | 1091.33 | 1005.7 | 1005.7 | 0.0 | 85.63 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1085.63 | 5.7 | 0.0 | 0.0 | 1091.33 | 1005.7 | 1005.7 | 0.0 | 85.63 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2021 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | + | 10 January 2021 | Repayment | 85.63 | 85.63 | 0.0 | 0.0 | 0.0 | 914.37 | true | false | + | 22 January 2021 | Merchant Issued Refund | 1000.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | true | + | 22 January 2021 | Interest Refund | 5.7 | 0.0 | 5.7 | 0.0 | 0.0 | 0.0 | false | true | + | 23 January 2021 | Credit Balance Refund | 85.63 | 85.63 | 0.0 | 0.0 | 0.0 | 85.63 | false | true | + | 22 January 2021 | Accrual | 5.42 | 0.0 | 5.42 | 0.0 | 0.0 | 0.0 | false | false | And In Loan Transactions the "2"th Transaction has Transaction type="Repayment" and is reverted @TestRailId:C3303 @@ -5305,40 +6067,39 @@ Feature: EMI calculation and repayment schedule checks for interest bearing loan When Admin sets the business date to "22 January 2021" When Customer makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "22 January 2021" with 1000 EUR transaction amount and system-generated Idempotency key Then Loan Repayment schedule has 1 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 2021 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2021 | 22 January 2021 | 0.0 | 1000.0 | 5.7 | 0.0 | 0.0 | 1005.7 | 1005.7 | 1005.7 | 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.0 | 5.7 | 0.0 | 0.0 | 1005.7 | 1005.7 | 1005.7 | 0.0 | 0.0 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2021 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | - | 22 January 2021 | Merchant Issued Refund | 1000.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | - | 22 January 2021 | Interest Refund | 5.7 | 0.0 | 5.7 | 0.0 | 0.0 | 0.0 | false | false | - | 22 January 2021 | Accrual | 5.7 | 0.0 | 5.7 | 0.0 | 0.0 | 0.0 | false | false | + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2021 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2021 | 22 January 2021 | 0.0 | 1000.0 | 5.7 | 0.0 | 0.0 | 1005.7 | 1005.7 | 1005.7 | 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.0 | 5.7 | 0.0 | 0.0 | 1005.7 | 1005.7 | 1005.7 | 0.0 | 0.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2021 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | + | 22 January 2021 | Merchant Issued Refund | 1000.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | + | 22 January 2021 | Interest Refund | 5.7 | 0.0 | 5.7 | 0.0 | 0.0 | 0.0 | false | false | + | 22 January 2021 | Accrual | 5.7 | 0.0 | 5.7 | 0.0 | 0.0 | 0.0 | false | false | When Customer undo "1"th "Merchant Issued Refund" transaction made on "22 January 2021" When Admin sets the business date to "23 January 2021" When Admin runs inline COB job for Loan Then Loan Repayment schedule has 1 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 2021 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2021 | | 0.0 | 1000.0 | 8.41 | 0.0 | 0.0 | 1008.41 | 0.0 | 0.0 | 0.0 | 1008.41 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 1000.0 | 8.41 | 0.0 | 0.0 | 1008.41 | 0.0 | 0.0 | 0.0 | 1008.41 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2021 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | - | 22 January 2021 | Merchant Issued Refund | 1000.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | true | false | - | 22 January 2021 | Interest Refund | 5.7 | 0.0 | 5.7 | 0.0 | 0.0 | 0.0 | true | false | - | 22 January 2021 | Accrual | 5.7 | 0.0 | 5.7 | 0.0 | 0.0 | 0.0 | false | false | + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2021 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2021 | | 0.0 | 1000.0 | 8.41 | 0.0 | 0.0 | 1008.41 | 0.0 | 0.0 | 0.0 | 1008.41 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 8.41 | 0.0 | 0.0 | 1008.41 | 0.0 | 0.0 | 0.0 | 1008.41 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2021 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | + | 22 January 2021 | Merchant Issued Refund | 1000.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | true | false | + | 22 January 2021 | Interest Refund | 5.7 | 0.0 | 5.7 | 0.0 | 0.0 | 0.0 | true | false | + | 22 January 2021 | Accrual | 5.7 | 0.0 | 5.7 | 0.0 | 0.0 | 0.0 | false | false | Then In Loan Transactions the "2"th Transaction has Transaction type="Merchant Issued Refund" and is reverted Then In Loan Transactions the "3"th Transaction has Transaction type="Interest Refund" and is reverted @TestRailId:C3313 Scenario: Verify that due date charges after maturity date is recognized on repayment schedule - When Global config "charge-accrual-date" value set to "submitted-date" When Admin sets the business date to "01 January 2024" And Admin creates a client with random data And Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule @@ -5360,7 +6121,9 @@ Feature: EMI calculation and repayment schedule checks for interest bearing loan And 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 | - When Admin sets the business date to "1 May 2024" + When Admin sets the business date to "20 April 2024" + And Admin runs inline COB job for Loan + When Admin sets the business date to "15 May 2024" And Admin runs inline COB job for Loan And Admin adds "LOAN_NSF_FEE" due date charge with "15 May 2024" due date and 10 EUR transaction amount Then Loan Repayment schedule has 5 periods, with the following data for periods: @@ -5377,17 +6140,22 @@ Feature: EMI calculation and repayment schedule checks for interest bearing loan And 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 | - | 30 April 2024 | Accrual | 1.87 | 0.0 | 1.87 | 0.0 | 0.0 | 0.0 | false | false | + | 19 April 2024 | Accrual | 1.66 | 0.0 | 1.66 | 0.0 | 0.0 | 0.0 | false | false | + | 20 April 2024 | Accrual | 0.45 | 0.0 | 0.45 | 0.0 | 0.0 | 0.0 | false | false | + | 21 April 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 22 April 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 23 April 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 24 April 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 25 April 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 26 April 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 27 April 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 28 April 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 29 April 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 30 April 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 01 May 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | And Loan Charges tab has the following data: | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | | NSF fee | true | Specified due date | 15 May 2024 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | - When Admin sets the business date to "02 May 2024" - And Admin runs inline COB job for Loan - And 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 | - | 30 April 2024 | Accrual | 1.87 | 0.0 | 1.87 | 0.0 | 0.0 | 0.0 | false | false | - | 01 May 2024 | Accrual | 10.45 | 0.0 | 0.45 | 0.0 | 10.0 | 0.0 | false | false | @TestRailId:C3333 Scenario: Verify that due date charges after maturity date with inline COB run is recognized on repayment schedule @@ -5460,3 +6228,1323 @@ Feature: EMI calculation and repayment schedule checks for interest bearing loan And Loan Charges tab has the following data: | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | | NSF fee | true | Specified due date | 15 February 2024 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | + + @TestRailId:C3314 + Scenario: Verify that interest refund transaction won't be created and displayed when Merchant issued refund happens on disbursement date + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "MERCHANT_ISSUED_REFUND" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 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" + And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + And Admin runs inline COB job for Loan + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 75.21 | 24.79 | 0.58 | 0.0 | 0.0 | 25.37 | 0.0 | 0.0 | 0.0 | 25.37 | + | 2 | 29 | 01 March 2024 | | 50.28 | 24.93 | 0.44 | 0.0 | 0.0 | 25.37 | 0.0 | 0.0 | 0.0 | 25.37 | + | 3 | 31 | 01 April 2024 | | 25.2 | 25.08 | 0.29 | 0.0 | 0.0 | 25.37 | 0.0 | 0.0 | 0.0 | 25.37 | + | 4 | 30 | 01 May 2024 | | 0.0 | 25.2 | 0.15 | 0.0 | 0.0 | 25.35 | 0.0 | 0.0 | 0.0 | 25.35 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.46 | 0.0 | 0.0 | 101.46 | 0.0 | 0.0 | 0.0 | 101.46 | + And 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 | + When Admin makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type 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 | 31 | 01 February 2024 | 01 January 2024 | 74.63 | 25.37 | 0.0 | 0.0 | 0.0 | 25.37 | 25.37 | 25.37 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 January 2024 | 49.26 | 25.37 | 0.0 | 0.0 | 0.0 | 25.37 | 25.37 | 25.37 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 01 January 2024 | 23.89 | 25.37 | 0.0 | 0.0 | 0.0 | 25.37 | 25.37 | 25.37 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | 01 January 2024 | 0.0 | 23.89 | 0.0 | 0.0 | 0.0 | 23.89 | 23.89 | 23.89 | 0.0 | 0.0 | + And 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 | 100.0 | 100.0 | 0.0 | 0.0 | + And 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 | + | 01 January 2024 | Merchant Issued Refund | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | + And Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "MERCHANT_ISSUED_REFUND" transaction type to "REAMORTIZATION" future installment allocation rule + + @TestRailId:C3322 + Scenario: Verify accrual activity with amend rate factor after calculated interest for period was rounded - UC1: Preclose, with full disbursement at first day, accrual activity after month + 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 1000 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 1 | MONTHS | 1 | MONTHS | 1 | 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 + Then Loan Repayment schedule has 1 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 | | 0.0 | 1000.0 | 5.83 | 0.0 | 0.0 | 1005.83 | 0.0 | 0.0 | 0.0 | 1005.83 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 5.83 | 0.0 | 0.0 | 1005.83 | 0.0 | 0.0 | 0.0 | 1005.83 | + 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 | + When Admin sets the business date to "02 January 2024" + When Admin runs inline COB job for Loan +# --- Accrual activity --- + When Admin sets the business date to "02 February 2024" + When Admin runs inline COB job for Loan + Then Loan Repayment schedule has 1 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 | | 0.0 | 1000.0 | 5.83 | 0.0 | 0.0 | 1005.83 | 0.0 | 0.0 | 0.0 | 1005.83 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 5.83 | 0.0 | 0.0 | 1005.83 | 0.0 | 0.0 | 0.0 | 1005.83 | + 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 | + | 02 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 03 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 04 January 2024 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | + | 05 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 06 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 07 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 08 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 09 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 10 January 2024 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | + | 11 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 12 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 13 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 14 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 15 January 2024 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | + | 16 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 17 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 18 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 19 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 20 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 21 January 2024 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | + | 22 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 23 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 24 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 25 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 26 January 2024 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | + | 27 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 28 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 29 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 30 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 31 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 01 February 2024 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | + + @TestRailId:C3323 + Scenario: Verify accrual activity with amend rate factor after calculated interest for period was rounded - UC2: Preclose, with multi disbursements, accrual activity after month + 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_MULTIDISBURSE | 01 January 2024 | 2000 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 1 | MONTHS | 1 | MONTHS | 1 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "2000" amount and expected disbursement date on "01 January 2024" + Then Loan Repayment schedule has 1 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 | | 2000.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 0.0 | 2000.0 | 11.67 | 0.0 | 0.0 | 2011.67 | 0.0 | 0.0 | 0.0 | 2011.67 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 2000.0 | 11.67 | 0.0 | 0.0 | 2011.67 | 0.0 | 0.0 | 0.0 | 2011.67 | + When Admin successfully disburse the loan on "01 January 2024" with "1000" EUR transaction amount + Then Loan Repayment schedule has 1 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 | | 0.0 | 1000.0 | 5.83 | 0.0 | 0.0 | 1005.83 | 0.0 | 0.0 | 0.0 | 1005.83 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 5.83 | 0.0 | 0.0 | 1005.83 | 0.0 | 0.0 | 0.0 | 1005.83 | + 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 | + When Admin sets the business date to "02 January 2024" + When Admin runs inline COB job for Loan +# --- Accrual activity after first disbursement --- + When Admin sets the business date to "15 January 2024" + When Admin runs inline COB job for Loan + Then Loan Repayment schedule has 1 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 | | 0.0 | 1000.0 | 5.83 | 0.0 | 0.0 | 1005.83 | 0.0 | 0.0 | 0.0 | 1005.83 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 5.83 | 0.0 | 0.0 | 1005.83 | 0.0 | 0.0 | 0.0 | 1005.83 | + 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 | + | 02 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 03 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 04 January 2024 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | + | 05 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 06 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 07 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 08 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 09 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 10 January 2024 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | + | 11 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 12 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 13 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 14 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | +# --- Accrual activity after second disbursement --- + When Admin successfully disburse the loan on "15 January 2024" with "1000" EUR transaction amount + Then Loan Repayment schedule has 1 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 | | | | + | | | 15 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 0.0 | 2000.0 | 9.03 | 0.0 | 0.0 | 2009.03 | 0.0 | 0.0 | 0.0 | 2009.03 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 2000.0 | 9.03 | 0.0 | 0.0 | 2009.03 | 0.0 | 0.0 | 0.0 | 2009.03 | + When Admin sets the business date to "02 February 2024" + When Admin runs inline COB job for Loan + Then Loan Repayment schedule has 1 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 | | | | + | | | 15 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 0.0 | 2000.0 | 9.03 | 0.0 | 0.0 | 2009.03 | 0.0 | 0.0 | 0.0 | 2009.03 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 2000.0 | 9.03 | 0.0 | 0.0 | 2009.03 | 0.0 | 0.0 | 0.0 | 2009.03 | + 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 | + | 02 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 03 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 04 January 2024 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | + | 05 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 06 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 07 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 08 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 09 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 10 January 2024 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | + | 11 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 12 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 13 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 14 January 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | + | 15 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 2000.0 | + | 15 January 2024 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | + | 16 January 2024 | Accrual | 0.38 | 0.0 | 0.38 | 0.0 | 0.0 | 0.0 | + | 17 January 2024 | Accrual | 0.37 | 0.0 | 0.37 | 0.0 | 0.0 | 0.0 | + | 18 January 2024 | Accrual | 0.38 | 0.0 | 0.38 | 0.0 | 0.0 | 0.0 | + | 19 January 2024 | Accrual | 0.38 | 0.0 | 0.38 | 0.0 | 0.0 | 0.0 | + | 20 January 2024 | Accrual | 0.37 | 0.0 | 0.37 | 0.0 | 0.0 | 0.0 | + | 21 January 2024 | Accrual | 0.38 | 0.0 | 0.38 | 0.0 | 0.0 | 0.0 | + | 22 January 2024 | Accrual | 0.37 | 0.0 | 0.37 | 0.0 | 0.0 | 0.0 | + | 23 January 2024 | Accrual | 0.38 | 0.0 | 0.38 | 0.0 | 0.0 | 0.0 | + | 24 January 2024 | Accrual | 0.38 | 0.0 | 0.38 | 0.0 | 0.0 | 0.0 | + | 25 January 2024 | Accrual | 0.37 | 0.0 | 0.37 | 0.0 | 0.0 | 0.0 | + | 26 January 2024 | Accrual | 0.38 | 0.0 | 0.38 | 0.0 | 0.0 | 0.0 | + | 27 January 2024 | Accrual | 0.38 | 0.0 | 0.38 | 0.0 | 0.0 | 0.0 | + | 28 January 2024 | Accrual | 0.37 | 0.0 | 0.37 | 0.0 | 0.0 | 0.0 | + | 29 January 2024 | Accrual | 0.38 | 0.0 | 0.38 | 0.0 | 0.0 | 0.0 | + | 30 January 2024 | Accrual | 0.38 | 0.0 | 0.38 | 0.0 | 0.0 | 0.0 | + | 31 January 2024 | Accrual | 0.37 | 0.0 | 0.37 | 0.0 | 0.0 | 0.0 | + | 01 February 2024 | Accrual | 0.38 | 0.0 | 0.38 | 0.0 | 0.0 | 0.0 | + + @TestRailId:C3327 + Scenario: Verify accruals isn't reversed and replayed in COB for loan with disabled auto repayment for down payment + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_RECALCULATION_DAILY_EMI_360_30_MULTIDISBURSE_DOWNPAYMENT | 01 January 2024 | 800 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "800" amount and expected disbursement date on "01 January 2024" + 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 | | 800.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 0 | 01 January 2024 | | 600.0 | 200.0 | 0.0 | 0.0 | 0.0 | 200.0 | 0.0 | 0.0 | 0.0 | 200.0 | + | 2 | 31 | 01 February 2024 | | 451.31 | 148.69 | 3.5 | 0.0 | 0.0 | 152.19 | 0.0 | 0.0 | 0.0 | 152.19 | + | 3 | 29 | 01 March 2024 | | 301.75 | 149.56 | 2.63 | 0.0 | 0.0 | 152.19 | 0.0 | 0.0 | 0.0 | 152.19 | + | 4 | 31 | 01 April 2024 | | 151.32 | 150.43 | 1.76 | 0.0 | 0.0 | 152.19 | 0.0 | 0.0 | 0.0 | 152.19 | + | 5 | 30 | 01 May 2024 | | 0.0 | 151.32 | 0.88 | 0.0 | 0.0 | 152.2 | 0.0 | 0.0 | 0.0 | 152.2 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 800.0 | 8.77 | 0.0 | 0.0 | 808.77 | 0.0 | 0.0 | 0.0 | 808.77 | + When Admin sets the business date to "05 January 2024" + And Admin successfully disburse the loan on "03 January 2024" with "800" EUR transaction amount + And Customer makes "AUTOPAY" repayment on "03 January 2024" with 200 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 | + | | | 03 January 2024 | | 800.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 03 January 2024 | 03 January 2024 | 600.0 | 200.0 | 0.0 | 0.0 | 0.0 | 200.0 | 200.0 | 0.0 | 0.0 | 0.0 | + | 2 | 31 | 03 February 2024 | | 451.31 | 148.69 | 3.5 | 0.0 | 0.0 | 152.19 | 0.0 | 0.0 | 0.0 | 152.19 | + | 3 | 29 | 03 March 2024 | | 301.75 | 149.56 | 2.63 | 0.0 | 0.0 | 152.19 | 0.0 | 0.0 | 0.0 | 152.19 | + | 4 | 31 | 03 April 2024 | | 151.32 | 150.43 | 1.76 | 0.0 | 0.0 | 152.19 | 0.0 | 0.0 | 0.0 | 152.19 | + | 5 | 30 | 03 May 2024 | | 0.0 | 151.32 | 0.88 | 0.0 | 0.0 | 152.2 | 0.0 | 0.0 | 0.0 | 152.2 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 800.0 | 8.77 | 0.0 | 0.0 | 808.77 | 200.0 | 0.0 | 0.0 | 608.77 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 03 January 2024 | Disbursement | 800.0 | 0.0 | 0.0 | 0.0 | 0.0 | 800.0 | false | false | + | 03 January 2024 | Repayment | 200.0 | 200.0 | 0.0 | 0.0 | 0.0 | 600.0 | false | false | + And Admin runs inline COB job for Loan + 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 | + | | | 03 January 2024 | | 800.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 03 January 2024 | 03 January 2024 | 600.0 | 200.0 | 0.0 | 0.0 | 0.0 | 200.0 | 200.0 | 0.0 | 0.0 | 0.0 | + | 2 | 31 | 03 February 2024 | | 451.31 | 148.69 | 3.5 | 0.0 | 0.0 | 152.19 | 0.0 | 0.0 | 0.0 | 152.19 | + | 3 | 29 | 03 March 2024 | | 301.75 | 149.56 | 2.63 | 0.0 | 0.0 | 152.19 | 0.0 | 0.0 | 0.0 | 152.19 | + | 4 | 31 | 03 April 2024 | | 151.32 | 150.43 | 1.76 | 0.0 | 0.0 | 152.19 | 0.0 | 0.0 | 0.0 | 152.19 | + | 5 | 30 | 03 May 2024 | | 0.0 | 151.32 | 0.88 | 0.0 | 0.0 | 152.2 | 0.0 | 0.0 | 0.0 | 152.2 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 800.0 | 8.77 | 0.0 | 0.0 | 808.77 | 200.0 | 0.0 | 0.0 | 608.77 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 03 January 2024 | Disbursement | 800.0 | 0.0 | 0.0 | 0.0 | 0.0 | 800.0 | false | false | + | 03 January 2024 | Repayment | 200.0 | 200.0 | 0.0 | 0.0 | 0.0 | 600.0 | false | false | + | 04 January 2024 | Accrual | 0.11 | 0.0 | 0.11 | 0.0 | 0.0 | 0.0 | false | false | + + @TestRailId:C3328 + Scenario: Verify accruals isn't reversed and replayed in COB for loan with enabled auto repayment for down payment + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_RECALCULATION_DAILY_EMI_360_30_MULTIDISBURSE_AUTO_DOWNPAYMENT | 01 January 2024 | 800 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "800" amount and expected disbursement date on "01 January 2024" + 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 | | 800.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 0 | 01 January 2024 | | 600.0 | 200.0 | 0.0 | 0.0 | 0.0 | 200.0 | 0.0 | 0.0 | 0.0 | 200.0 | + | 2 | 31 | 01 February 2024 | | 451.31 | 148.69 | 3.5 | 0.0 | 0.0 | 152.19 | 0.0 | 0.0 | 0.0 | 152.19 | + | 3 | 29 | 01 March 2024 | | 301.75 | 149.56 | 2.63 | 0.0 | 0.0 | 152.19 | 0.0 | 0.0 | 0.0 | 152.19 | + | 4 | 31 | 01 April 2024 | | 151.32 | 150.43 | 1.76 | 0.0 | 0.0 | 152.19 | 0.0 | 0.0 | 0.0 | 152.19 | + | 5 | 30 | 01 May 2024 | | 0.0 | 151.32 | 0.88 | 0.0 | 0.0 | 152.2 | 0.0 | 0.0 | 0.0 | 152.2 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 800.0 | 8.77 | 0.0 | 0.0 | 808.77 | 0.0 | 0.0 | 0.0 | 808.77 | + When Admin sets the business date to "05 January 2024" + And Admin successfully disburse the loan on "03 January 2024" with "800" 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 | + | | | 03 January 2024 | | 800.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 03 January 2024 | 03 January 2024 | 600.0 | 200.0 | 0.0 | 0.0 | 0.0 | 200.0 | 200.0 | 0.0 | 0.0 | 0.0 | + | 2 | 31 | 03 February 2024 | | 451.31 | 148.69 | 3.5 | 0.0 | 0.0 | 152.19 | 0.0 | 0.0 | 0.0 | 152.19 | + | 3 | 29 | 03 March 2024 | | 301.75 | 149.56 | 2.63 | 0.0 | 0.0 | 152.19 | 0.0 | 0.0 | 0.0 | 152.19 | + | 4 | 31 | 03 April 2024 | | 151.32 | 150.43 | 1.76 | 0.0 | 0.0 | 152.19 | 0.0 | 0.0 | 0.0 | 152.19 | + | 5 | 30 | 03 May 2024 | | 0.0 | 151.32 | 0.88 | 0.0 | 0.0 | 152.2 | 0.0 | 0.0 | 0.0 | 152.2 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 800.0 | 8.77 | 0.0 | 0.0 | 808.77 | 200.0 | 0.0 | 0.0 | 608.77 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 03 January 2024 | Disbursement | 800.0 | 0.0 | 0.0 | 0.0 | 0.0 | 800.0 | false | false | + | 03 January 2024 | Down Payment | 200.0 | 200.0 | 0.0 | 0.0 | 0.0 | 600.0 | false | false | + And Admin runs inline COB job for Loan + 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 | + | | | 03 January 2024 | | 800.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 03 January 2024 | 03 January 2024 | 600.0 | 200.0 | 0.0 | 0.0 | 0.0 | 200.0 | 200.0 | 0.0 | 0.0 | 0.0 | + | 2 | 31 | 03 February 2024 | | 451.31 | 148.69 | 3.5 | 0.0 | 0.0 | 152.19 | 0.0 | 0.0 | 0.0 | 152.19 | + | 3 | 29 | 03 March 2024 | | 301.75 | 149.56 | 2.63 | 0.0 | 0.0 | 152.19 | 0.0 | 0.0 | 0.0 | 152.19 | + | 4 | 31 | 03 April 2024 | | 151.32 | 150.43 | 1.76 | 0.0 | 0.0 | 152.19 | 0.0 | 0.0 | 0.0 | 152.19 | + | 5 | 30 | 03 May 2024 | | 0.0 | 151.32 | 0.88 | 0.0 | 0.0 | 152.2 | 0.0 | 0.0 | 0.0 | 152.2 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 800.0 | 8.77 | 0.0 | 0.0 | 808.77 | 200.0 | 0.0 | 0.0 | 608.77 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 03 January 2024 | Disbursement | 800.0 | 0.0 | 0.0 | 0.0 | 0.0 | 800.0 | false | false | + | 03 January 2024 | Down Payment | 200.0 | 200.0 | 0.0 | 0.0 | 0.0 | 600.0 | false | false | + | 04 January 2024 | Accrual | 0.11 | 0.0 | 0.11 | 0.0 | 0.0 | 0.0 | false | false | + + @TestRailId:C3329 + Scenario: Verify interest rate should not be calculated on past due principle amount for progressive loans - case when lesser than EMI amount was paid + 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_NO_CALC_ON_PAST_DUE_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + 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 | + # --- 1st installment overdue --- + When Admin sets the business date to "02 February 2024" + When Admin runs inline COB job for Loan + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + 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 | + | 01 February 2024 | Accrual | 0.58 | 0.0 | 0.58 | 0.0 | 0.0 | 0.0 | false | false | + # --- late payment comes in lesser than EMI amount --- + When Admin sets the business date to "15 February 2024" + And Customer makes "AUTOPAY" repayment on "15 February 2024" with 15.0 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 15.0 | 0.0 | 15.0 | 2.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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 | 2.05 | 0.0 | 0.0 | 102.05 | 15.0 | 0.0 | 15.0 | 87.05 | + 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 | + | 01 February 2024 | Accrual | 0.58 | 0.0 | 0.58 | 0.0 | 0.0 | 0.0 | false | false | + | 15 February 2024 | Repayment | 15.0 | 15.0 | 0.0 | 0.0 | 0.0 | 85.0 | false | false | + + @TestRailId:C3330 + Scenario: Verify interest rate should not be calculated on past due principle amount for progressive loans - case when full EMI amount was paid + 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_NO_CALC_ON_PAST_DUE_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + 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 | + # --- 1st installment overdue --- + When Admin sets the business date to "02 February 2024" + When Admin runs inline COB job for Loan + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + 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 | + | 01 February 2024 | Accrual | 0.58 | 0.0 | 0.58 | 0.0 | 0.0 | 0.0 | false | false | + # --- late payment comes with correct EMI amount --- + When Admin sets the business date to "15 February 2024" + And Customer makes "AUTOPAY" repayment on "15 February 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 15 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 17.01 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 17.01 | 85.04 | + 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 | + | 01 February 2024 | Accrual | 0.58 | 0.0 | 0.58 | 0.0 | 0.0 | 0.0 | false | false | + | 15 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + + @TestRailId:C3331 + Scenario: Verify interest rate should not be calculated on past due principle amount for progressive loans - case when excess EMI amount was paid + 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_NO_CALC_ON_PAST_DUE_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + 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 | + # --- 1st installment overdue --- + When Admin sets the business date to "02 February 2024" + When Admin runs inline COB job for Loan + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + 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 | + | 01 February 2024 | Accrual | 0.58 | 0.0 | 0.58 | 0.0 | 0.0 | 0.0 | false | false | + # --- late payment comes in with excess EMI amount --- + When Admin sets the business date to "15 February 2024" + And Customer makes "AUTOPAY" repayment on "15 February 2024" with 34.02 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 15 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 17.01 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 February 2024 | 66.8 | 16.77 | 0.24 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | | 50.38 | 16.42 | 0.59 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.66 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.85 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.85 | 0.1 | 0.0 | 0.0 | 16.95 | 0.0 | 0.0 | 0.0 | 16.95 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.0 | 0.0 | 0.0 | 102.0 | 34.02 | 17.01 | 17.01 | 67.98 | + 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 | + | 01 February 2024 | Accrual | 0.58 | 0.0 | 0.58 | 0.0 | 0.0 | 0.0 | false | false | + | 15 February 2024 | Repayment | 34.02 | 33.2 | 0.82 | 0.0 | 0.0 | 66.8 | false | false | + + @TestRailId:C3332 + Scenario: Verify interest rate should not be calculated on past due principle amount for progressive loans - case when multiple disbursal occurred with full EMI amount was paid + 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_ADV_PAYMENT_ALLOC_INTEREST_RECALCULATION_DAILY_NO_CALC_ON_PAST_DUE_EMI_360_30_MULTIDISBURSE | 01 January 2024 | 200 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "200" 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 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + 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 | + # --- 2nd disbursement --- + When Admin sets the business date to "10 February 2024" + And Admin successfully disburse the loan on "10 February 2024" with "100" 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | | | 10 February 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 2 | 29 | 01 March 2024 | | 147.14 | 36.43 | 0.89 | 0.0 | 0.0 | 37.32 | 0.0 | 0.0 | 0.0 | 37.32 | + | 3 | 31 | 01 April 2024 | | 110.68 | 36.46 | 0.86 | 0.0 | 0.0 | 37.32 | 0.0 | 0.0 | 0.0 | 37.32 | + | 4 | 30 | 01 May 2024 | | 74.01 | 36.67 | 0.65 | 0.0 | 0.0 | 37.32 | 0.0 | 0.0 | 0.0 | 37.32 | + | 5 | 31 | 01 June 2024 | | 37.12 | 36.89 | 0.43 | 0.0 | 0.0 | 37.32 | 0.0 | 0.0 | 0.0 | 37.32 | + | 6 | 30 | 01 July 2024 | | 0.0 | 37.12 | 0.22 | 0.0 | 0.0 | 37.34 | 0.0 | 0.0 | 0.0 | 37.34 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 200.0 | 3.63 | 0.0 | 0.0 | 203.63 | 0.0 | 0.0 | 0.0 | 203.63 | + 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 | + | 10 February 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 200.0 | false | false | + # --- late payment comes with full amount --- + When Admin sets the business date to "15 March 2024" + And Customer makes "AUTOPAY" repayment on "15 March 2024" with 54.33 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 15 March 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 17.01 | 0.0 | + | | | 10 February 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 147.14 | 36.43 | 0.89 | 0.0 | 0.0 | 37.32 | 37.32 | 0.0 | 37.32 | 0.0 | + | 3 | 31 | 01 April 2024 | | 110.68 | 36.46 | 0.86 | 0.0 | 0.0 | 37.32 | 0.0 | 0.0 | 0.0 | 37.32 | + | 4 | 30 | 01 May 2024 | | 74.01 | 36.67 | 0.65 | 0.0 | 0.0 | 37.32 | 0.0 | 0.0 | 0.0 | 37.32 | + | 5 | 31 | 01 June 2024 | | 37.12 | 36.89 | 0.43 | 0.0 | 0.0 | 37.32 | 0.0 | 0.0 | 0.0 | 37.32 | + | 6 | 30 | 01 July 2024 | | 0.0 | 37.12 | 0.22 | 0.0 | 0.0 | 37.34 | 0.0 | 0.0 | 0.0 | 37.34 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 200.0 | 3.63 | 0.0 | 0.0 | 203.63 | 54.33 | 0.0 | 54.33 | 149.3 | + 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 | + | 10 February 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 200.0 | false | false | + | 15 March 2024 | Repayment | 54.33 | 52.86 | 1.47 | 0.0 | 0.0 | 147.14 | false | false | + + @TestRailId:C3334 + Scenario: Verify that COB works properly while creating accruals for a overpaid account (accruals created on COB not when charge is created) + When Admin sets the business date to "20 October 2024" + And Admin creates a client with random data + And Admin set "LP1_ADV_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "LAST_INSTALLMENT" future installment allocation rule + When Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP1_ADV_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 20 October 2024 | 100 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 30 | DAYS | 30 | DAYS | 1 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "20 October 2024" with "100" amount and expected disbursement date on "20 October 2024" + And Admin successfully disburse the loan on "20 October 2024" with "100" EUR transaction amount + And Admin runs inline COB job for Loan + And Admin sets the business date to "21 October 2024" + And Admin runs inline COB job for Loan + And Admin sets the business date to "22 October 2024" + And Customer makes "AUTOPAY" repayment on "22 October 2024" with 102 EUR transaction amount + Then Loan status will be "OVERPAID" + And Loan has 2 overpaid amount + When Admin sets the business date to "23 October 2024" + And Admin runs inline COB job for Loan + Then Loan Repayment schedule has 1 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 | + | | | 20 October 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 19 November 2024 | 22 October 2024 | 0.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | 100.0 | 100.0 | 0.0 | 0.0 | + And 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 | 100.0 | 100.0 | 0.0 | 0.0 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 20 October 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 22 October 2024 | Repayment | 102.0 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | + When Admin adds "LOAN_NSF_FEE" due date charge with "23 October 2024" due date and 20 EUR transaction amount + Then Loan status will be "ACTIVE" + And Loan Repayment schedule has 1 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 | + | | | 20 October 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 19 November 2024 | | 0.0 | 100.0 | 0.0 | 0.0 | 20.0 | 120.0 | 102.0 | 102.0 | 0.0 | 18.0 | + And 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 | 20.0 | 120.0 | 102.0 | 102.0 | 0.0 | 18.0 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 20 October 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 22 October 2024 | Repayment | 102.0 | 100.0 | 0.0 | 0.0 | 2.0 | 0.0 | false | true | + And Loan Charges tab has the following data: + | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | + | NSF fee | true | Specified due date | 23 October 2024 | Flat | 20.0 | 2.0 | 0.0 | 18.0 | + When Admin sets the business date to "24 October 2024" + And Admin runs inline COB job for Loan + Then Loan status will be "ACTIVE" + Then Loan Repayment schedule has 1 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 | + | | | 20 October 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 19 November 2024 | | 0.0 | 100.0 | 0.0 | 0.0 | 20.0 | 120.0 | 102.0 | 102.0 | 0.0 | 18.0 | + And 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 | 20.0 | 120.0 | 102.0 | 102.0 | 0.0 | 18.0 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 20 October 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 22 October 2024 | Repayment | 102.0 | 100.0 | 0.0 | 0.0 | 2.0 | 0.0 | false | true | + | 23 October 2024 | Accrual | 20.0 | 0.0 | 0.0 | 0.0 | 20.0 | 0.0 | false | false | + And Loan Charges tab has the following data: + | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | + | NSF fee | true | Specified due date | 23 October 2024 | Flat | 20.0 | 2.0 | 0.0 | 18.0 | + When Admin set "LP1_ADV_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + + @TestRailId:C3384 + Scenario: Verify the repayment schedule in case of interest bearing loan, interest recalculation enabled, 12 months loan, Merchant issued refund (next installment) on disbursement date + When Admin sets the business date to "01 January 2025" + And Admin creates a client with random data + And Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE_PMT_ALLOC_1" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE_PMT_ALLOC_1" loan product "MERCHANT_ISSUED_REFUND" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE_PMT_ALLOC_1 | 01 January 2025 | 1000 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 12 | MONTHS | 1 | MONTHS | 12 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2025" with "1000" amount and expected disbursement date on "01 January 2025" + And Admin successfully disburse the loan on "01 January 2025" with "1000" EUR transaction amount + And Admin runs inline COB job for Loan + Then Loan Repayment schedule has 12 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 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2025 | | 919.3 | 80.7 | 5.83 | 0.0 | 0.0 | 86.53 | 0.0 | 0.0 | 0.0 | 86.53 | + | 2 | 28 | 01 March 2025 | | 838.13 | 81.17 | 5.36 | 0.0 | 0.0 | 86.53 | 0.0 | 0.0 | 0.0 | 86.53 | + | 3 | 31 | 01 April 2025 | | 756.49 | 81.64 | 4.89 | 0.0 | 0.0 | 86.53 | 0.0 | 0.0 | 0.0 | 86.53 | + | 4 | 30 | 01 May 2025 | | 674.37 | 82.12 | 4.41 | 0.0 | 0.0 | 86.53 | 0.0 | 0.0 | 0.0 | 86.53 | + | 5 | 31 | 01 June 2025 | | 591.77 | 82.6 | 3.93 | 0.0 | 0.0 | 86.53 | 0.0 | 0.0 | 0.0 | 86.53 | + | 6 | 30 | 01 July 2025 | | 508.69 | 83.08 | 3.45 | 0.0 | 0.0 | 86.53 | 0.0 | 0.0 | 0.0 | 86.53 | + | 7 | 31 | 01 August 2025 | | 425.13 | 83.56 | 2.97 | 0.0 | 0.0 | 86.53 | 0.0 | 0.0 | 0.0 | 86.53 | + | 8 | 31 | 01 September 2025 | | 341.08 | 84.05 | 2.48 | 0.0 | 0.0 | 86.53 | 0.0 | 0.0 | 0.0 | 86.53 | + | 9 | 30 | 01 October 2025 | | 256.54 | 84.54 | 1.99 | 0.0 | 0.0 | 86.53 | 0.0 | 0.0 | 0.0 | 86.53 | + | 10 | 31 | 01 November 2025 | | 171.51 | 85.03 | 1.5 | 0.0 | 0.0 | 86.53 | 0.0 | 0.0 | 0.0 | 86.53 | + | 11 | 30 | 01 December 2025 | | 85.98 | 85.53 | 1.0 | 0.0 | 0.0 | 86.53 | 0.0 | 0.0 | 0.0 | 86.53 | + | 12 | 31 | 01 January 2026 | | 0.0 | 85.98 | 0.5 | 0.0 | 0.0 | 86.48 | 0.0 | 0.0 | 0.0 | 86.48 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 38.31 | 0.0 | 0.0 | 1038.31 | 0.0 | 0.0 | 0.0 | 1038.31 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | + When Customer makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "01 January 2025" with 1000 EUR transaction amount and system-generated Idempotency key + Then Loan Repayment schedule has 12 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 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2025 | 01 January 2025 | 913.47 | 86.53 | 0.0 | 0.0 | 0.0 | 86.53 | 86.53 | 86.53 | 0.0 | 0.0 | + | 2 | 28 | 01 March 2025 | 01 January 2025 | 826.94 | 86.53 | 0.0 | 0.0 | 0.0 | 86.53 | 86.53 | 86.53 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2025 | 01 January 2025 | 740.41 | 86.53 | 0.0 | 0.0 | 0.0 | 86.53 | 86.53 | 86.53 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2025 | 01 January 2025 | 653.88 | 86.53 | 0.0 | 0.0 | 0.0 | 86.53 | 86.53 | 86.53 | 0.0 | 0.0 | + | 5 | 31 | 01 June 2025 | 01 January 2025 | 567.35 | 86.53 | 0.0 | 0.0 | 0.0 | 86.53 | 86.53 | 86.53 | 0.0 | 0.0 | + | 6 | 30 | 01 July 2025 | 01 January 2025 | 480.82 | 86.53 | 0.0 | 0.0 | 0.0 | 86.53 | 86.53 | 86.53 | 0.0 | 0.0 | + | 7 | 31 | 01 August 2025 | 01 January 2025 | 394.29 | 86.53 | 0.0 | 0.0 | 0.0 | 86.53 | 86.53 | 86.53 | 0.0 | 0.0 | + | 8 | 31 | 01 September 2025 | 01 January 2025 | 307.76 | 86.53 | 0.0 | 0.0 | 0.0 | 86.53 | 86.53 | 86.53 | 0.0 | 0.0 | + | 9 | 30 | 01 October 2025 | 01 January 2025 | 221.23 | 86.53 | 0.0 | 0.0 | 0.0 | 86.53 | 86.53 | 86.53 | 0.0 | 0.0 | + | 10 | 31 | 01 November 2025 | 01 January 2025 | 134.7 | 86.53 | 0.0 | 0.0 | 0.0 | 86.53 | 86.53 | 86.53 | 0.0 | 0.0 | + | 11 | 30 | 01 December 2025 | 01 January 2025 | 48.17 | 86.53 | 0.0 | 0.0 | 0.0 | 86.53 | 86.53 | 86.53 | 0.0 | 0.0 | + | 12 | 31 | 01 January 2026 | 01 January 2025 | 0.0 | 48.17 | 0.0 | 0.0 | 0.0 | 48.17 | 48.17 | 48.17 | 0.0 | 0.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 1000.0 | 1000.0 | 0.0 | 0.0 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | + | 01 January 2025 | Merchant Issued Refund | 1000.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | + And Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE_PMT_ALLOC_1" loan product "MERCHANT_ISSUED_REFUND" transaction type to "REAMORTIZATION" future installment allocation rule + + @TestRailId:C3385 + Scenario: Verify the repayment schedule in case of interest bearing loan, interest recalculation enabled, 12 months loan, Merchant issued refund (reamortization) on disbursement date + When Admin sets the business date to "01 January 2025" + And Admin creates a client with random data + And Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE_PMT_ALLOC_1" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE_PMT_ALLOC_1" loan product "MERCHANT_ISSUED_REFUND" transaction type to "REAMORTIZATION" future installment allocation rule + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE_PMT_ALLOC_1 | 01 January 2025 | 1000 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 12 | MONTHS | 1 | MONTHS | 12 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2025" with "1000" amount and expected disbursement date on "01 January 2025" + And Admin successfully disburse the loan on "01 January 2025" with "1000" EUR transaction amount + And Admin runs inline COB job for Loan + Then Loan Repayment schedule has 12 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 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2025 | | 919.3 | 80.7 | 5.83 | 0.0 | 0.0 | 86.53 | 0.0 | 0.0 | 0.0 | 86.53 | + | 2 | 28 | 01 March 2025 | | 838.13 | 81.17 | 5.36 | 0.0 | 0.0 | 86.53 | 0.0 | 0.0 | 0.0 | 86.53 | + | 3 | 31 | 01 April 2025 | | 756.49 | 81.64 | 4.89 | 0.0 | 0.0 | 86.53 | 0.0 | 0.0 | 0.0 | 86.53 | + | 4 | 30 | 01 May 2025 | | 674.37 | 82.12 | 4.41 | 0.0 | 0.0 | 86.53 | 0.0 | 0.0 | 0.0 | 86.53 | + | 5 | 31 | 01 June 2025 | | 591.77 | 82.6 | 3.93 | 0.0 | 0.0 | 86.53 | 0.0 | 0.0 | 0.0 | 86.53 | + | 6 | 30 | 01 July 2025 | | 508.69 | 83.08 | 3.45 | 0.0 | 0.0 | 86.53 | 0.0 | 0.0 | 0.0 | 86.53 | + | 7 | 31 | 01 August 2025 | | 425.13 | 83.56 | 2.97 | 0.0 | 0.0 | 86.53 | 0.0 | 0.0 | 0.0 | 86.53 | + | 8 | 31 | 01 September 2025 | | 341.08 | 84.05 | 2.48 | 0.0 | 0.0 | 86.53 | 0.0 | 0.0 | 0.0 | 86.53 | + | 9 | 30 | 01 October 2025 | | 256.54 | 84.54 | 1.99 | 0.0 | 0.0 | 86.53 | 0.0 | 0.0 | 0.0 | 86.53 | + | 10 | 31 | 01 November 2025 | | 171.51 | 85.03 | 1.5 | 0.0 | 0.0 | 86.53 | 0.0 | 0.0 | 0.0 | 86.53 | + | 11 | 30 | 01 December 2025 | | 85.98 | 85.53 | 1.0 | 0.0 | 0.0 | 86.53 | 0.0 | 0.0 | 0.0 | 86.53 | + | 12 | 31 | 01 January 2026 | | 0.0 | 85.98 | 0.5 | 0.0 | 0.0 | 86.48 | 0.0 | 0.0 | 0.0 | 86.48 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 38.31 | 0.0 | 0.0 | 1038.31 | 0.0 | 0.0 | 0.0 | 1038.31 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | + When Customer makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "01 January 2025" with 1000 EUR transaction amount and system-generated Idempotency key + Then Loan Repayment schedule has 12 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 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2025 | 01 January 2025 | 916.67 | 83.33 | 0.0 | 0.0 | 0.0 | 83.33 | 83.33 | 83.33 | 0.0 | 0.0 | + | 2 | 28 | 01 March 2025 | 01 January 2025 | 833.34 | 83.33 | 0.0 | 0.0 | 0.0 | 83.33 | 83.33 | 83.33 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2025 | 01 January 2025 | 750.01 | 83.33 | 0.0 | 0.0 | 0.0 | 83.33 | 83.33 | 83.33 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2025 | 01 January 2025 | 666.68 | 83.33 | 0.0 | 0.0 | 0.0 | 83.33 | 83.33 | 83.33 | 0.0 | 0.0 | + | 5 | 31 | 01 June 2025 | 01 January 2025 | 583.35 | 83.33 | 0.0 | 0.0 | 0.0 | 83.33 | 83.33 | 83.33 | 0.0 | 0.0 | + | 6 | 30 | 01 July 2025 | 01 January 2025 | 500.02 | 83.33 | 0.0 | 0.0 | 0.0 | 83.33 | 83.33 | 83.33 | 0.0 | 0.0 | + | 7 | 31 | 01 August 2025 | 01 January 2025 | 416.69 | 83.33 | 0.0 | 0.0 | 0.0 | 83.33 | 83.33 | 83.33 | 0.0 | 0.0 | + | 8 | 31 | 01 September 2025 | 01 January 2025 | 333.36 | 83.33 | 0.0 | 0.0 | 0.0 | 83.33 | 83.33 | 83.33 | 0.0 | 0.0 | + | 9 | 30 | 01 October 2025 | 01 January 2025 | 250.03 | 83.33 | 0.0 | 0.0 | 0.0 | 83.33 | 83.33 | 83.33 | 0.0 | 0.0 | + | 10 | 31 | 01 November 2025 | 01 January 2025 | 166.7 | 83.33 | 0.0 | 0.0 | 0.0 | 83.33 | 83.33 | 83.33 | 0.0 | 0.0 | + | 11 | 30 | 01 December 2025 | 01 January 2025 | 83.37 | 83.33 | 0.0 | 0.0 | 0.0 | 83.33 | 83.33 | 83.33 | 0.0 | 0.0 | + | 12 | 31 | 01 January 2026 | 01 January 2025 | 0.0 | 83.37 | 0.0 | 0.0 | 0.0 | 83.37 | 83.37 | 83.37 | 0.0 | 0.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 1000.0 | 1000.0 | 0.0 | 0.0 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | + | 01 January 2025 | Merchant Issued Refund | 1000.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | + + @TestRailId:C3387 + Scenario: Verify that no negative amount is calculated for Accruals + When Admin sets the business date to "09 December 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_ACTUAL_ACTUAL_ACCRUAL_ACTIVITY" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_ACTUAL_ACTUAL_ACCRUAL_ACTIVITY | 09 December 2024 | 800 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "09 December 2024" with "800" amount and expected disbursement date on "09 December 2024" + And Admin successfully disburse the loan on "09 December 2024" with "800" EUR transaction amount + And Admin runs inline COB job for Loan + And Admin sets the business date to "10 December 2024" + And Admin runs inline COB job for Loan + And Admin sets the business date to "11 December 2024" + And Admin runs inline COB job for Loan + 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 | + | | | 09 December 2024 | | 800.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 09 January 2025 | | 668.69 | 131.31 | 4.75 | 0.0 | 0.0 | 136.06 | 0.0 | 0.0 | 0.0 | 136.06 | + | 2 | 31 | 09 February 2025 | | 536.61 | 132.08 | 3.98 | 0.0 | 0.0 | 136.06 | 0.0 | 0.0 | 0.0 | 136.06 | + | 3 | 28 | 09 March 2025 | | 403.43 | 133.18 | 2.88 | 0.0 | 0.0 | 136.06 | 0.0 | 0.0 | 0.0 | 136.06 | + | 4 | 31 | 09 April 2025 | | 269.77 | 133.66 | 2.4 | 0.0 | 0.0 | 136.06 | 0.0 | 0.0 | 0.0 | 136.06 | + | 5 | 30 | 09 May 2025 | | 135.26 | 134.51 | 1.55 | 0.0 | 0.0 | 136.06 | 0.0 | 0.0 | 0.0 | 136.06 | + | 6 | 31 | 09 June 2025 | | 0.0 | 135.26 | 0.8 | 0.0 | 0.0 | 136.06 | 0.0 | 0.0 | 0.0 | 136.06 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 800.0 | 16.36 | 0.0 | 0.0 | 816.36 | 0.0 | 0.0 | 0.0 | 816.36 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 09 December 2024 | Disbursement | 800.0 | 0.0 | 0.0 | 0.0 | 0.0 | 800.0 | false | false | + | 10 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + When Admin sets the business date to "08 January 2025" + And Admin runs inline COB job for Loan + 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 | + | | | 09 December 2024 | | 800.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 09 January 2025 | | 668.69 | 131.31 | 4.75 | 0.0 | 0.0 | 136.06 | 0.0 | 0.0 | 0.0 | 136.06 | + | 2 | 31 | 09 February 2025 | | 536.61 | 132.08 | 3.98 | 0.0 | 0.0 | 136.06 | 0.0 | 0.0 | 0.0 | 136.06 | + | 3 | 28 | 09 March 2025 | | 403.43 | 133.18 | 2.88 | 0.0 | 0.0 | 136.06 | 0.0 | 0.0 | 0.0 | 136.06 | + | 4 | 31 | 09 April 2025 | | 269.77 | 133.66 | 2.4 | 0.0 | 0.0 | 136.06 | 0.0 | 0.0 | 0.0 | 136.06 | + | 5 | 30 | 09 May 2025 | | 135.26 | 134.51 | 1.55 | 0.0 | 0.0 | 136.06 | 0.0 | 0.0 | 0.0 | 136.06 | + | 6 | 31 | 09 June 2025 | | 0.0 | 135.26 | 0.8 | 0.0 | 0.0 | 136.06 | 0.0 | 0.0 | 0.0 | 136.06 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 800.0 | 16.36 | 0.0 | 0.0 | 816.36 | 0.0 | 0.0 | 0.0 | 816.36 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 09 December 2024 | Disbursement | 800.0 | 0.0 | 0.0 | 0.0 | 0.0 | 800.0 | false | false | + | 10 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 11 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 12 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 13 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 14 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 15 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 16 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 17 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 18 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 19 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 20 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 21 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 22 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 23 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 24 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 25 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 26 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 27 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 28 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 29 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 30 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 31 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 01 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 02 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + When Admin sets the business date to "09 January 2025" + And Customer makes "AUTOPAY" repayment on "09 January 2025" with 136.06 EUR transaction amount + And Admin runs inline COB job for Loan + 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 | + | | | 09 December 2024 | | 800.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 09 January 2025 | 09 January 2025 | 668.69 | 131.31 | 4.75 | 0.0 | 0.0 | 136.06 | 136.06 | 0.0 | 0.0 | 0.0 | + | 2 | 31 | 09 February 2025 | | 536.61 | 132.08 | 3.98 | 0.0 | 0.0 | 136.06 | 0.0 | 0.0 | 0.0 | 136.06 | + | 3 | 28 | 09 March 2025 | | 403.43 | 133.18 | 2.88 | 0.0 | 0.0 | 136.06 | 0.0 | 0.0 | 0.0 | 136.06 | + | 4 | 31 | 09 April 2025 | | 269.77 | 133.66 | 2.4 | 0.0 | 0.0 | 136.06 | 0.0 | 0.0 | 0.0 | 136.06 | + | 5 | 30 | 09 May 2025 | | 135.26 | 134.51 | 1.55 | 0.0 | 0.0 | 136.06 | 0.0 | 0.0 | 0.0 | 136.06 | + | 6 | 31 | 09 June 2025 | | 0.0 | 135.26 | 0.8 | 0.0 | 0.0 | 136.06 | 0.0 | 0.0 | 0.0 | 136.06 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 800.0 | 16.36 | 0.0 | 0.0 | 816.36 | 136.06 | 0.0 | 0.0 | 680.3 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 09 December 2024 | Disbursement | 800.0 | 0.0 | 0.0 | 0.0 | 0.0 | 800.0 | false | false | + | 10 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 11 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 12 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 13 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 14 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 15 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 16 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 17 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 18 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 19 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 20 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 21 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 22 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 23 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 24 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 25 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 26 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 27 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 28 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 29 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 30 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 31 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 01 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 02 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 08 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2025 | Repayment | 136.06 | 131.31 | 4.75 | 0.0 | 0.0 | 668.69 | false | false | + When Admin sets the business date to "10 January 2025" + And Admin runs inline COB job for Loan + 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 | + | | | 09 December 2024 | | 800.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 09 January 2025 | 09 January 2025 | 668.69 | 131.31 | 4.75 | 0.0 | 0.0 | 136.06 | 136.06 | 0.0 | 0.0 | 0.0 | + | 2 | 31 | 09 February 2025 | | 536.61 | 132.08 | 3.98 | 0.0 | 0.0 | 136.06 | 0.0 | 0.0 | 0.0 | 136.06 | + | 3 | 28 | 09 March 2025 | | 403.43 | 133.18 | 2.88 | 0.0 | 0.0 | 136.06 | 0.0 | 0.0 | 0.0 | 136.06 | + | 4 | 31 | 09 April 2025 | | 269.77 | 133.66 | 2.4 | 0.0 | 0.0 | 136.06 | 0.0 | 0.0 | 0.0 | 136.06 | + | 5 | 30 | 09 May 2025 | | 135.26 | 134.51 | 1.55 | 0.0 | 0.0 | 136.06 | 0.0 | 0.0 | 0.0 | 136.06 | + | 6 | 31 | 09 June 2025 | | 0.0 | 135.26 | 0.8 | 0.0 | 0.0 | 136.06 | 0.0 | 0.0 | 0.0 | 136.06 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 800.0 | 16.36 | 0.0 | 0.0 | 816.36 | 136.06 | 0.0 | 0.0 | 680.3 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 09 December 2024 | Disbursement | 800.0 | 0.0 | 0.0 | 0.0 | 0.0 | 800.0 | false | false | + | 10 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 11 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 12 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 13 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 14 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 15 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 16 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 17 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 18 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 19 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 20 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 21 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 22 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 23 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 24 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 25 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 26 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 27 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 28 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 29 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 30 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 31 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 01 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 02 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 08 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2025 | Repayment | 136.06 | 131.31 | 4.75 | 0.0 | 0.0 | 668.69 | false | false | + | 09 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2025 | Accrual Activity | 4.75 | 0.0 | 4.75 | 0.0 | 0.0 | 0.0 | false | false | + When Admin sets the business date to "10 January 2025" + And Admin runs inline COB job for Loan + 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 | + | | | 09 December 2024 | | 800.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 09 January 2025 | 09 January 2025 | 668.69 | 131.31 | 4.75 | 0.0 | 0.0 | 136.06 | 136.06 | 0.0 | 0.0 | 0.0 | + | 2 | 31 | 09 February 2025 | | 536.61 | 132.08 | 3.98 | 0.0 | 0.0 | 136.06 | 0.0 | 0.0 | 0.0 | 136.06 | + | 3 | 28 | 09 March 2025 | | 403.43 | 133.18 | 2.88 | 0.0 | 0.0 | 136.06 | 0.0 | 0.0 | 0.0 | 136.06 | + | 4 | 31 | 09 April 2025 | | 269.77 | 133.66 | 2.4 | 0.0 | 0.0 | 136.06 | 0.0 | 0.0 | 0.0 | 136.06 | + | 5 | 30 | 09 May 2025 | | 135.26 | 134.51 | 1.55 | 0.0 | 0.0 | 136.06 | 0.0 | 0.0 | 0.0 | 136.06 | + | 6 | 31 | 09 June 2025 | | 0.0 | 135.26 | 0.8 | 0.0 | 0.0 | 136.06 | 0.0 | 0.0 | 0.0 | 136.06 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 800.0 | 16.36 | 0.0 | 0.0 | 816.36 | 136.06 | 0.0 | 0.0 | 680.3 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 09 December 2024 | Disbursement | 800.0 | 0.0 | 0.0 | 0.0 | 0.0 | 800.0 | false | false | + | 10 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 11 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 12 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 13 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 14 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 15 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 16 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 17 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 18 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 19 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 20 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 21 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 22 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 23 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 24 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 25 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 26 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 27 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 28 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 29 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 30 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 31 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 01 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 02 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 08 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2025 | Repayment | 136.06 | 131.31 | 4.75 | 0.0 | 0.0 | 668.69 | false | false | + | 09 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2025 | Accrual Activity | 4.75 | 0.0 | 4.75 | 0.0 | 0.0 | 0.0 | false | false | + When Admin sets the business date to "11 January 2025" + And Admin runs inline COB job for Loan + 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 | + | | | 09 December 2024 | | 800.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 09 January 2025 | 09 January 2025 | 668.69 | 131.31 | 4.75 | 0.0 | 0.0 | 136.06 | 136.06 | 0.0 | 0.0 | 0.0 | + | 2 | 31 | 09 February 2025 | | 536.61 | 132.08 | 3.98 | 0.0 | 0.0 | 136.06 | 0.0 | 0.0 | 0.0 | 136.06 | + | 3 | 28 | 09 March 2025 | | 403.43 | 133.18 | 2.88 | 0.0 | 0.0 | 136.06 | 0.0 | 0.0 | 0.0 | 136.06 | + | 4 | 31 | 09 April 2025 | | 269.77 | 133.66 | 2.4 | 0.0 | 0.0 | 136.06 | 0.0 | 0.0 | 0.0 | 136.06 | + | 5 | 30 | 09 May 2025 | | 135.26 | 134.51 | 1.55 | 0.0 | 0.0 | 136.06 | 0.0 | 0.0 | 0.0 | 136.06 | + | 6 | 31 | 09 June 2025 | | 0.0 | 135.26 | 0.8 | 0.0 | 0.0 | 136.06 | 0.0 | 0.0 | 0.0 | 136.06 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 800.0 | 16.36 | 0.0 | 0.0 | 816.36 | 136.06 | 0.0 | 0.0 | 680.3 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 09 December 2024 | Disbursement | 800.0 | 0.0 | 0.0 | 0.0 | 0.0 | 800.0 | false | false | + | 10 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 11 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 12 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 13 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 14 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 15 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 16 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 17 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 18 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 19 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 20 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 21 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 22 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 23 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 24 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 25 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 26 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 27 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 28 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 29 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 30 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 31 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 01 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 02 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 08 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2025 | Repayment | 136.06 | 131.31 | 4.75 | 0.0 | 0.0 | 668.69 | false | false | + | 09 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2025 | Accrual Activity | 4.75 | 0.0 | 4.75 | 0.0 | 0.0 | 0.0 | false | false | + | 10 January 2025 | Accrual | 0.13 | 0.0 | 0.13 | 0.0 | 0.0 | 0.0 | false | false | + When Customer makes "AUTOPAY" repayment on "10 January 2025" with 680.3 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 | + | | | 09 December 2024 | | 800.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 09 January 2025 | 09 January 2025 | 668.69 | 131.31 | 4.75 | 0.0 | 0.0 | 136.06 | 136.06 | 0.0 | 0.0 | 0.0 | + | 2 | 31 | 09 February 2025 | 10 January 2025 | 536.61 | 132.08 | 3.98 | 0.0 | 0.0 | 136.06 | 136.06 | 136.06 | 0.0 | 0.0 | + | 3 | 28 | 09 March 2025 | 10 January 2025 | 403.43 | 133.18 | 2.88 | 0.0 | 0.0 | 136.06 | 136.06 | 136.06 | 0.0 | 0.0 | + | 4 | 31 | 09 April 2025 | 10 January 2025 | 269.77 | 133.66 | 2.4 | 0.0 | 0.0 | 136.06 | 136.06 | 136.06 | 0.0 | 0.0 | + | 5 | 30 | 09 May 2025 | 10 January 2025 | 135.26 | 134.51 | 1.55 | 0.0 | 0.0 | 136.06 | 136.06 | 136.06 | 0.0 | 0.0 | + | 6 | 31 | 09 June 2025 | 10 January 2025 | 0.0 | 135.26 | 0.8 | 0.0 | 0.0 | 136.06 | 136.06 | 136.06 | 0.0 | 0.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 800.0 | 16.36 | 0.0 | 0.0 | 816.36 | 816.36 | 680.3 | 0.0 | 0.0 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 09 December 2024 | Disbursement | 800.0 | 0.0 | 0.0 | 0.0 | 0.0 | 800.0 | false | false | + | 10 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 11 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 12 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 13 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 14 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 15 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 16 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 17 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 18 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 19 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 20 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 21 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 22 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 23 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 24 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 25 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 26 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 27 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 28 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 29 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 30 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 31 December 2024 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 01 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 02 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 08 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2025 | Repayment | 136.06 | 131.31 | 4.75 | 0.0 | 0.0 | 668.69 | false | false | + | 09 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2025 | Accrual Activity | 4.75 | 0.0 | 4.75 | 0.0 | 0.0 | 0.0 | false | false | + | 10 January 2025 | Accrual | 0.13 | 0.0 | 0.13 | 0.0 | 0.0 | 0.0 | false | false | + | 10 January 2025 | Repayment | 680.3 | 668.69 | 11.61 | 0.0 | 0.0 | 0.0 | false | false | + | 10 January 2025 | Accrual Activity | 11.61 | 0.0 | 11.61 | 0.0 | 0.0 | 0.0 | false | false | + | 11 January 2025 | Accrual | 11.48 | 0.0 | 11.48 | 0.0 | 0.0 | 0.0 | false | false | + + @TestRailId:C3433 + Scenario: Verify partial interest calculated on loan with disbursement date '12 December 2023' and 10000 amount - UC1 + When Admin sets the business date to "12 December 2023" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_RECALCULATION_DAILY | 12 December 2023 | 10000 | 9.482 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "12 December 2023" with "10000" amount and expected disbursement date on "12 December 2023" + And Admin successfully disburse the loan on "12 December 2023" with "10000" 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 | + | | | 12 December 2023 | | 10000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 12 January 2024 | | 8367.33 | 1632.67 | 80.45 | 0.0 | 0.0 | 1713.12 | 0.0 | 0.0 | 0.0 | 1713.12 | + | 2 | 31 | 12 February 2024 | | 6721.41 | 1645.92 | 67.2 | 0.0 | 0.0 | 1713.12 | 0.0 | 0.0 | 0.0 | 1713.12 | + | 3 | 29 | 12 March 2024 | | 5058.79 | 1662.62 | 50.5 | 0.0 | 0.0 | 1713.12 | 0.0 | 0.0 | 0.0 | 1713.12 | + | 4 | 31 | 12 April 2024 | | 3386.3 | 1672.49 | 40.63 | 0.0 | 0.0 | 1713.12 | 0.0 | 0.0 | 0.0 | 1713.12 | + | 5 | 30 | 12 May 2024 | | 1699.5 | 1686.8 | 26.32 | 0.0 | 0.0 | 1713.12 | 0.0 | 0.0 | 0.0 | 1713.12 | + | 6 | 31 | 12 June 2024 | | 0.0 | 1699.5 | 13.65 | 0.0 | 0.0 | 1713.15 | 0.0 | 0.0 | 0.0 | 1713.15 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 10000.0 | 278.75 | 0.0 | 0.0 | 10278.75 | 0.0 | 0.0 | 0.0 | 10278.75 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 12 December 2023 | Disbursement | 10000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 10000.0 | false | false | + + @TestRailId:C3434 + Scenario: Verify partial interest calculated on loan with disbursement date '12 December 2023' and 331.77 amount - UC2 + When Admin sets the business date to "12 December 2023" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_RECALCULATION_DAILY | 12 December 2023 | 331.77 | 10.65 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 5 | MONTHS | 1 | MONTHS | 5 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "12 December 2023" with "331.77" amount and expected disbursement date on "12 December 2023" + And Admin successfully disburse the loan on "12 December 2023" with "331.77" 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 | + | | | 12 December 2023 | | 331.77 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 12 January 2024 | | 266.63 | 65.14 | 3.0 | 0.0 | 0.0 | 68.14 | 0.0 | 0.0 | 0.0 | 68.14 | + | 2 | 31 | 12 February 2024 | | 200.9 | 65.73 | 2.41 | 0.0 | 0.0 | 68.14 | 0.0 | 0.0 | 0.0 | 68.14 | + | 3 | 29 | 12 March 2024 | | 134.46 | 66.44 | 1.7 | 0.0 | 0.0 | 68.14 | 0.0 | 0.0 | 0.0 | 68.14 | + | 4 | 31 | 12 April 2024 | | 67.53 | 66.93 | 1.21 | 0.0 | 0.0 | 68.14 | 0.0 | 0.0 | 0.0 | 68.14 | + | 5 | 30 | 12 May 2024 | | 0.0 | 67.53 | 0.59 | 0.0 | 0.0 | 68.12 | 0.0 | 0.0 | 0.0 | 68.12 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 331.77 | 8.91 | 0.0 | 0.0 | 340.68 | 0.0 | 0.0 | 0.0 | 340.68 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 12 December 2023 | Disbursement | 331.77 | 0.0 | 0.0 | 0.0 | 0.0 | 331.77 | false | false | + + @TestRailId:C3435 + Scenario: Verify partial interest calculated on loan with disbursement date '23 July 2024' and 15000 amount - UC3 + When Admin sets the business date to "23 July 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_RECALCULATION_DAILY | 23 July 2024 | 15000 | 12 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "23 July 2024" with "15000" amount and expected disbursement date on "23 July 2024" + And Admin successfully disburse the loan on "23 July 2024" with "15000" 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 | + | | | 23 July 2024 | | 15000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 23 August 2024 | | 11307.31 | 3692.69 | 152.46 | 0.0 | 0.0 | 3845.15 | 0.0 | 0.0 | 0.0 | 3845.15 | + | 2 | 31 | 23 September 2024 | | 7577.09 | 3730.22 | 114.93 | 0.0 | 0.0 | 3845.15 | 0.0 | 0.0 | 0.0 | 3845.15 | + | 3 | 30 | 23 October 2024 | | 3806.47 | 3770.62 | 74.53 | 0.0 | 0.0 | 3845.15 | 0.0 | 0.0 | 0.0 | 3845.15 | + | 4 | 31 | 23 November 2024 | | 0.0 | 3806.47 | 38.69 | 0.0 | 0.0 | 3845.16 | 0.0 | 0.0 | 0.0 | 3845.16 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 15000.0 | 380.61 | 0.0 | 0.0 | 15380.61 | 0.0 | 0.0 | 0.0 | 15380.61 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 23 July 2024 | Disbursement | 15000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 15000.0 | false | false | + + @TestRailId:C3436 + Scenario: Verify interest calculated on loan that disbursed on 31 date with disbursement date '31 October 2023' and 2450 amount - UC4 + When Admin sets the business date to "31 October 2023" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_RECALCULATION_DAILY | 31 October 2023 | 2450 | 9.99 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "31 October 2023" with "2450" amount and expected disbursement date on "31 October 2023" + And Admin successfully disburse the loan on "31 October 2023" with "2450" 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 | + | | | 31 October 2023 | | 2450.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 30 November 2023 | | 2049.84 | 400.16 | 20.12 | 0.0 | 0.0 | 420.28 | 0.0 | 0.0 | 0.0 | 420.28 | + | 2 | 31 | 31 December 2023 | | 1646.95 | 402.89 | 17.39 | 0.0 | 0.0 | 420.28 | 0.0 | 0.0 | 0.0 | 420.28 | + | 3 | 31 | 31 January 2024 | | 1240.61 | 406.34 | 13.94 | 0.0 | 0.0 | 420.28 | 0.0 | 0.0 | 0.0 | 420.28 | + | 4 | 29 | 29 February 2024 | | 830.15 | 410.46 | 9.82 | 0.0 | 0.0 | 420.28 | 0.0 | 0.0 | 0.0 | 420.28 | + | 5 | 31 | 31 March 2024 | | 416.89 | 413.26 | 7.02 | 0.0 | 0.0 | 420.28 | 0.0 | 0.0 | 0.0 | 420.28 | + | 6 | 30 | 30 April 2024 | | 0.0 | 416.89 | 3.41 | 0.0 | 0.0 | 420.3 | 0.0 | 0.0 | 0.0 | 420.3 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 2450.0 | 71.7 | 0.0 | 0.0 | 2521.7 | 0.0 | 0.0 | 0.0 | 2521.7 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 31 October 2023 | Disbursement | 2450.0 | 0.0 | 0.0 | 0.0 | 0.0 | 2450.0 | false | false | + + @TestRailId:C3437 + Scenario: Verify interest calculated on loan that disbursed on 31 date with backdated disbursement date '31 October 2023' and 2450 amount - UC5 + When Admin sets the business date to "21 January 2025" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_RECALCULATION_DAILY | 31 October 2023 | 2450 | 9.99 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "31 October 2023" with "2450" amount and expected disbursement date on "31 October 2023" + And Admin successfully disburse the loan on "31 October 2023" with "2450" 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 | + | | | 31 October 2023 | | 2450.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 30 November 2023 | | 2049.84 | 400.16 | 20.12 | 0.0 | 0.0 | 420.28 | 0.0 | 0.0 | 0.0 | 420.28 | + | 2 | 31 | 31 December 2023 | | 1650.35 | 399.49 | 20.79 | 0.0 | 0.0 | 420.28 | 0.0 | 0.0 | 0.0 | 420.28 | + | 3 | 31 | 31 January 2024 | | 1250.8 | 399.55 | 20.73 | 0.0 | 0.0 | 420.28 | 0.0 | 0.0 | 0.0 | 420.28 | + | 4 | 29 | 29 February 2024 | | 849.91 | 400.89 | 19.39 | 0.0 | 0.0 | 420.28 | 0.0 | 0.0 | 0.0 | 420.28 | + | 5 | 31 | 31 March 2024 | | 450.36 | 399.55 | 20.73 | 0.0 | 0.0 | 420.28 | 0.0 | 0.0 | 0.0 | 420.28 | + | 6 | 30 | 30 April 2024 | | 0.0 | 450.36 | 20.06 | 0.0 | 0.0 | 470.42 | 0.0 | 0.0 | 0.0 | 470.42 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 2450.0 | 121.82 | 0.0 | 0.0 | 2571.82 | 0.0 | 0.0 | 0.0 | 2571.82 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 31 October 2023 | Disbursement | 2450.0 | 0.0 | 0.0 | 0.0 | 0.0 | 2450.0 | false | false | + + @TestRailId:C3438 + Scenario: Verify interest calculated on loan that disbursed on 31 date with disbursement date '31 October 2023' and 245000 amount - UC6 + When Admin sets the business date to "31 October 2023" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_RECALCULATION_DAILY | 31 October 2023 | 245000 | 45 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "31 October 2023" with "245000" amount and expected disbursement date on "31 October 2023" + And Admin successfully disburse the loan on "31 October 2023" with "245000" 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 | + | | | 31 October 2023 | | 245000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 30 November 2023 | | 207718.37 | 37281.63 | 9061.64 | 0.0 | 0.0 | 46343.27 | 0.0 | 0.0 | 0.0 | 46343.27 | + | 2 | 31 | 31 December 2023 | | 169313.93 | 38404.44 | 7938.83 | 0.0 | 0.0 | 46343.27 | 0.0 | 0.0 | 0.0 | 46343.27 | + | 3 | 31 | 31 January 2024 | | 129424.02 | 39889.91 | 6453.36 | 0.0 | 0.0 | 46343.27 | 0.0 | 0.0 | 0.0 | 46343.27 | + | 4 | 29 | 29 February 2024 | | 87695.46 | 41728.56 | 4614.71 | 0.0 | 0.0 | 46343.27 | 0.0 | 0.0 | 0.0 | 46343.27 | + | 5 | 31 | 31 March 2024 | | 44694.68 | 43000.78 | 3342.49 | 0.0 | 0.0 | 46343.27 | 0.0 | 0.0 | 0.0 | 46343.27 | + | 6 | 30 | 30 April 2024 | | 0.0 | 44694.68 | 1648.57 | 0.0 | 0.0 | 46343.25 | 0.0 | 0.0 | 0.0 | 46343.25 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 245000.0 | 33059.6 | 0.0 | 0.0 | 278059.6 | 0.0 | 0.0 | 0.0 | 278059.6 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 31 October 2023 | Disbursement | 245000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 245000.0 | false | false | + + @TestRailId:C3439 + Scenario: Verify interest calculated on loan that disbursed on 31 date with backdated disbursement date '31 October 2023' and 5000 amount - UC7 + When Admin sets the business date to "21 January 2025" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_RECALCULATION_DAILY | 31 October 2023 | 5000 | 33.99 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "31 October 2023" with "5000" amount and expected disbursement date on "31 October 2023" + And Admin successfully disburse the loan on "31 October 2023" with "5000" 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 | + | | | 31 October 2023 | | 5000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 30 November 2023 | | 4222.02 | 777.98 | 139.68 | 0.0 | 0.0 | 917.66 | 0.0 | 0.0 | 0.0 | 917.66 | + | 2 | 31 | 31 December 2023 | | 3448.7 | 773.32 | 144.34 | 0.0 | 0.0 | 917.66 | 0.0 | 0.0 | 0.0 | 917.66 | + | 3 | 31 | 31 January 2024 | | 2674.99 | 773.71 | 143.95 | 0.0 | 0.0 | 917.66 | 0.0 | 0.0 | 0.0 | 917.66 | + | 4 | 29 | 29 February 2024 | | 1891.99 | 783.0 | 134.66 | 0.0 | 0.0 | 917.66 | 0.0 | 0.0 | 0.0 | 917.66 | + | 5 | 31 | 31 March 2024 | | 1118.28 | 773.71 | 143.95 | 0.0 | 0.0 | 917.66 | 0.0 | 0.0 | 0.0 | 917.66 | + | 6 | 30 | 30 April 2024 | | 0.0 | 1118.28 | 139.3 | 0.0 | 0.0 | 1257.58 | 0.0 | 0.0 | 0.0 | 1257.58 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 5000.0 | 845.88 | 0.0 | 0.0 | 5845.88 | 0.0 | 0.0 | 0.0 | 5845.88 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 31 October 2023 | Disbursement | 5000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 5000.0 | false | false | + + @TestRailId:C3440 + Scenario: Verify interest calculated on loan that disbursed on 30 date with disbursement date '30 October 2021' and 1500 amount - UC8 + When Admin sets the business date to "30 October 2021" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_RECALCULATION_DAILY | 30 October 2021 | 1500 | 9.4822 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "30 October 2021" with "1500" amount and expected disbursement date on "30 October 2021" + And Admin successfully disburse the loan on "30 October 2021" with "1500" 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 | + | | | 30 October 2021 | | 1500.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 30 November 2021 | | 1255.13 | 244.87 | 12.08 | 0.0 | 0.0 | 256.95 | 0.0 | 0.0 | 0.0 | 256.95 | + | 2 | 30 | 30 December 2021 | | 1007.96 | 247.17 | 9.78 | 0.0 | 0.0 | 256.95 | 0.0 | 0.0 | 0.0 | 256.95 | + | 3 | 31 | 30 January 2022 | | 759.13 | 248.83 | 8.12 | 0.0 | 0.0 | 256.95 | 0.0 | 0.0 | 0.0 | 256.95 | + | 4 | 29 | 28 February 2022 | | 507.9 | 251.23 | 5.72 | 0.0 | 0.0 | 256.95 | 0.0 | 0.0 | 0.0 | 256.95 | + | 5 | 30 | 30 March 2022 | | 254.91 | 252.99 | 3.96 | 0.0 | 0.0 | 256.95 | 0.0 | 0.0 | 0.0 | 256.95 | + | 6 | 31 | 30 April 2022 | | 0.0 | 254.91 | 2.05 | 0.0 | 0.0 | 256.96 | 0.0 | 0.0 | 0.0 | 256.96 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1500.0 | 41.71 | 0.0 | 0.0 | 1541.71 | 0.0 | 0.0 | 0.0 | 1541.71 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 30 October 2021 | Disbursement | 1500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1500.0 | false | false | + + @TestRailId:C3441 + Scenario: Verify interest calculated on loan that disbursed on 29 date with disbursement date '29 October 2022' and 5000 amount - UC9 + When Admin sets the business date to "29 October 2022" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_RECALCULATION_DAILY | 29 October 2022 | 5000 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 12 | MONTHS | 2 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "29 October 2022" with "5000" amount and expected disbursement date on "29 October 2022" + And Admin successfully disburse the loan on "29 October 2022" with "5000" 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 | + | | | 29 October 2022 | | 5000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 61 | 29 December 2022 | | 4190.81 | 809.19 | 58.49 | 0.0 | 0.0 | 867.68 | 0.0 | 0.0 | 0.0 | 867.68 | + | 2 | 61 | 28 February 2023 | | 3372.16 | 818.65 | 49.03 | 0.0 | 0.0 | 867.68 | 0.0 | 0.0 | 0.0 | 867.68 | + | 3 | 60 | 29 April 2023 | | 2543.28 | 828.88 | 38.8 | 0.0 | 0.0 | 867.68 | 0.0 | 0.0 | 0.0 | 867.68 | + | 4 | 61 | 29 June 2023 | | 1705.35 | 837.93 | 29.75 | 0.0 | 0.0 | 867.68 | 0.0 | 0.0 | 0.0 | 867.68 | + | 5 | 61 | 29 August 2023 | | 857.62 | 847.73 | 19.95 | 0.0 | 0.0 | 867.68 | 0.0 | 0.0 | 0.0 | 867.68 | + | 6 | 61 | 29 October 2023 | | 0.0 | 857.62 | 10.03 | 0.0 | 0.0 | 867.65 | 0.0 | 0.0 | 0.0 | 867.65 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 5000.0 | 206.05 | 0.0 | 0.0 | 5206.05 | 0.0 | 0.0 | 0.0 | 5206.05 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 29 October 2022 | Disbursement | 5000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 5000.0 | false | false | + diff --git a/fineract-e2e-tests-runner/src/test/resources/features/InlineCOB.feature b/fineract-e2e-tests-runner/src/test/resources/features/InlineCOB.feature index 1bbed7df81d..7879019ae58 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/InlineCOB.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/InlineCOB.feature @@ -141,3 +141,63 @@ Feature: InlineCOBFeature | Range (Classification) | Added on date | Lifted on date | | RANGE_1 | 06 January 2023 | 07 January 2023 | Then Admin checks that last closed business date of loan is "06 January 2023" + + @TestRailId:C3316 + Scenario: Verify enhance LoanCOBFilter - Enable inline COB execution for locked loans + When Admin sets the business date to "01 January 2024" + When Admin creates a client with random data + When Admin creates a new default Loan with date: "1 January 2024" + 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 + Then Admin checks that last closed business date of loan is "null" + When Admin sets the business date to "2 January 2024" + When Admin runs inline COB job for Loan + Then Admin checks that last closed business date of loan is "01 January 2024" +# --- admin locks the loan --- + When Admin places a lock on loan account with an error message + When Admin sets the business date to "03 January 2024" + When Admin creates new user with "NO_BYPASS_AUTOTEST" username, "NO_BYPASS_AUTOTEST_ROLE" role name and given permissions: + | REPAYMENT_LOAN | + When Created user makes externalID controlled "AUTOPAY" repayment on "03 January 2024" with 1000 EUR transaction amount + Then Loan status will be "CLOSED_OBLIGATIONS_MET" + Then Loan has 0 outstanding amount + Then Loan Transactions tab has a "REPAYMENT" transaction with date "03 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 delinquency history has the following details: + | Range (Classification) | Added on date | Lifted on date | + | RANGE_1 | 02 January 2024 | 03 January 2024 | + Then Admin checks that last closed business date of loan is "02 January 2024" + + @TestRailId:C3317 + Scenario: Verify enhance LoanCOBFilter - Enable inline COB execution for locked progressive loans + When Admin sets the business date to "01 January 2024" + When Admin creates a client with random data + When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 1000 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 1 | MONTHS | 1 | MONTHS | 1 | 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 + Then Admin checks that last closed business date of loan is "null" + When Admin sets the business date to "2 January 2024" + When Admin runs inline COB job for Loan + Then Admin checks that last closed business date of loan is "01 January 2024" +# --- admin locks the loan --- + When Admin places a lock on loan account with an error message + When Admin sets the business date to "03 January 2024" + When Admin creates new user with "NO_BYPASS_AUTOTEST" username, "NO_BYPASS_AUTOTEST_ROLE" role name and given permissions: + | REPAYMENT_LOAN | + And Customer makes "AUTOPAY" repayment on "03 January 2024" with 1000.38 EUR transaction amount + Then Loan status will be "CLOSED_OBLIGATIONS_MET" + Then Loan has 0 outstanding amount + Then Loan Transactions tab has a "REPAYMENT" transaction with date "03 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 | | 0.38 | + | LIABILITY | 145023 | Suspense/Clearing account | 1000.38 | | + Then Loan delinquency history has the following details: + | Range (Classification) | Added on date | Lifted on date | + | RANGE_1 | 02 January 2024 | 03 January 2024 | + Then Admin checks that last closed business date of loan is "01 January 2024" diff --git a/fineract-e2e-tests-runner/src/test/resources/features/Loan.feature b/fineract-e2e-tests-runner/src/test/resources/features/Loan.feature index 7aa33418df9..21b0f8c01ef 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/Loan.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/Loan.feature @@ -5930,6 +5930,92 @@ Feature: Loan | 22 January 2024 | Interest Refund | 0.57 | 0.57 | 0.0 | 0.0 | 0.0 | 899.43 | true | false | Then In Loan Transactions the "3"th Transaction has Transaction type="Interest Refund" and is reverted + @TestRailId:C3324 + Scenario: Verify interest refund transaction after merchant issued refund transactions is forbidden to be reversed + 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_ADV_PYMNT_INTEREST_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_REFUND_FULL | 01 January 2024 | 1000 | 9.9 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 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 sets the business date to "22 January 2024" + When Customer makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "22 January 2024" with 100 EUR transaction amount and system-generated Idempotency key + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 752.97 | 247.03 | 8.11 | 0.0 | 0.0 | 255.14 | 100.57 | 100.57 | 0.0 | 154.57 | + | 2 | 29 | 01 March 2024 | | 503.74 | 249.23 | 5.91 | 0.0 | 0.0 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | + | 3 | 31 | 01 April 2024 | | 252.82 | 250.92 | 4.22 | 0.0 | 0.0 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | + | 4 | 30 | 01 May 2024 | | 0.0 | 252.82 | 2.05 | 0.0 | 0.0 | 254.87 | 0.0 | 0.0 | 0.0 | 254.87 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 20.29 | 0.0 | 0.0 | 1020.29 | 100.57 | 100.57 | 0.0 | 919.72 | + 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 | + | 22 January 2024 | Merchant Issued Refund | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 900.0 | false | false | + | 22 January 2024 | Interest Refund | 0.57 | 0.57 | 0.0 | 0.0 | 0.0 | 899.43 | false | false | + When Customer is forbidden to undo "1"th "Interest Refund" transaction made on "22 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 | | 752.97 | 247.03 | 8.11 | 0.0 | 0.0 | 255.14 | 100.57 | 100.57 | 0.0 | 154.57 | + | 2 | 29 | 01 March 2024 | | 503.74 | 249.23 | 5.91 | 0.0 | 0.0 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | + | 3 | 31 | 01 April 2024 | | 252.82 | 250.92 | 4.22 | 0.0 | 0.0 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | + | 4 | 30 | 01 May 2024 | | 0.0 | 252.82 | 2.05 | 0.0 | 0.0 | 254.87 | 0.0 | 0.0 | 0.0 | 254.87 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 20.29 | 0.0 | 0.0 | 1020.29 | 100.57 | 100.57 | 0.0 | 919.72 | + 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 | + | 22 January 2024 | Merchant Issued Refund | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 900.0 | false | false | + | 22 January 2024 | Interest Refund | 0.57 | 0.57 | 0.0 | 0.0 | 0.0 | 899.43 | false | false | + + @TestRailId:C3325 + Scenario: Verify interest refund transaction after payout refund transactions is forbidden to be reversed + 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_ADV_PYMNT_INTEREST_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_REFUND_FULL | 01 January 2024 | 1000 | 9.9 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 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 sets the business date to "22 January 2024" + When Admin makes "PAYOUT_REFUND" transaction with "AUTOPAY" payment type on "22 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 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 752.97 | 247.03 | 8.11 | 0.0 | 0.0 | 255.14 | 100.57 | 100.57 | 0.0 | 154.57 | + | 2 | 29 | 01 March 2024 | | 503.74 | 249.23 | 5.91 | 0.0 | 0.0 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | + | 3 | 31 | 01 April 2024 | | 252.82 | 250.92 | 4.22 | 0.0 | 0.0 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | + | 4 | 30 | 01 May 2024 | | 0.0 | 252.82 | 2.05 | 0.0 | 0.0 | 254.87 | 0.0 | 0.0 | 0.0 | 254.87 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 20.29 | 0.0 | 0.0 | 1020.29 | 100.57 | 100.57 | 0.0 | 919.72 | + 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 | + | 22 January 2024 | Payout Refund | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 900.0 | false | false | + | 22 January 2024 | Interest Refund | 0.57 | 0.57 | 0.0 | 0.0 | 0.0 | 899.43 | false | false | + When Customer is forbidden to undo "1"th "Interest Refund" transaction made on "22 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 | | 752.97 | 247.03 | 8.11 | 0.0 | 0.0 | 255.14 | 100.57 | 100.57 | 0.0 | 154.57 | + | 2 | 29 | 01 March 2024 | | 503.74 | 249.23 | 5.91 | 0.0 | 0.0 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | + | 3 | 31 | 01 April 2024 | | 252.82 | 250.92 | 4.22 | 0.0 | 0.0 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | + | 4 | 30 | 01 May 2024 | | 0.0 | 252.82 | 2.05 | 0.0 | 0.0 | 254.87 | 0.0 | 0.0 | 0.0 | 254.87 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 20.29 | 0.0 | 0.0 | 1020.29 | 100.57 | 100.57 | 0.0 | 919.72 | + 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 | + | 22 January 2024 | Payout Refund | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 900.0 | false | false | + | 22 January 2024 | Interest Refund | 0.57 | 0.57 | 0.0 | 0.0 | 0.0 | 899.43 | false | false | + @TestRailId:C3300 Scenario: Early pay-off loan with interest, TILL_PRECLOSE product When Admin sets the business date to "01 January 2024" @@ -6232,3 +6318,41 @@ Feature: Loan | 15 January 2024 | Accrual | 0.26 | 0.0 | 0.26 | 0.0 | 0.0 | 0.0 | Then Loan status will be "CLOSED_OBLIGATIONS_MET" + @TestRailId:C3424 + Scenario: Verify that after maturity date with inline COB the outstanding interest is recognized on repayment schedule + When Admin sets the business date to "23 December 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_ACTUAL | 23 December 2024 | 100 | 4 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "23 December 2024" with "100" amount and expected disbursement date on "23 December 2024" + When Admin successfully disburse the loan on "23 December 2024" with "100" 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 | + | | | 23 December 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 23 January 2025 | | 66.78 | 33.22 | 0.34 | 0.0 | 0.0 | 33.56 | 0.0 | 0.0 | 0.0 | 33.56 | + | 2 | 31 | 23 February 2025 | | 33.45 | 33.33 | 0.23 | 0.0 | 0.0 | 33.56 | 0.0 | 0.0 | 0.0 | 33.56 | + | 3 | 28 | 23 March 2025 | | 0.0 | 33.45 | 0.1 | 0.0 | 0.0 | 33.55 | 0.0 | 0.0 | 0.0 | 33.55 | + 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.67 | 0.0 | 0.0 | 100.67 | 0.0 | 0.0 | 0.0 | 100.67 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 23 December 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | + And Admin sets the business date to "23 March 2025" + When Admin runs inline COB job for Loan + Then Loan Repayment schedule has 3 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 23 December 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 23 January 2025 | | 66.78 | 33.22 | 0.34 | 0.0 | 0.0 | 33.56 | 0.0 | 0.0 | 0.0 | 33.56 | + | 2 | 31 | 23 February 2025 | | 33.45 | 33.33 | 0.23 | 0.0 | 0.0 | 33.56 | 0.0 | 0.0 | 0.0 | 33.56 | + | 3 | 28 | 23 March 2025 | | 0.0 | 33.45 | 0.1 | 0.0 | 0.0 | 33.55 | 0.0 | 0.0 | 0.0 | 33.55 | + 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.67 | 0.0 | 0.0 | 100.67 | 0.0 | 0.0 | 0.0 | 100.67 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 23 December 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | + | 22 March 2025 | Accrual | 0.67 | 0.0 | 0.67 | 0.0 | 0.0 | 0.0 | + + diff --git a/fineract-e2e-tests-runner/src/test/resources/features/LoanAccrualActivity.feature b/fineract-e2e-tests-runner/src/test/resources/features/LoanAccrualActivity.feature index 8d27b9db3b5..6a16b488db4 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/LoanAccrualActivity.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/LoanAccrualActivity.feature @@ -2213,8 +2213,7 @@ Feature: LoanAccrualActivity | 26 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | | 27 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | - @TestRailId:C3275 -# PS-2245 + # PS-2245 Scenario: Verify non negative amount for Accrual Activity on backdated repayment When Admin sets the business date to "09 December 2024" When Admin creates a client with random data @@ -2387,8 +2386,7 @@ Feature: LoanAccrualActivity | 10 January 2025 | Repayment | 676.22 | 675.62 | 0.6 | 0.0 | 0.0 | 0.0 | false | false | | 10 January 2025 | Accrual Activity | 0.6 | 0.0 | 0.6 | 0.0 | 0.0 | 0.0 | false | false | - @TestRailId:C3276 -# PS-2245 + # PS-2245 Scenario: Verify non negative amount for Accrual Activity on backdated repayment and accrual adjustment When Admin sets the business date to "09 December 2024" When Admin creates a client with random data @@ -2471,7 +2469,6 @@ Feature: LoanAccrualActivity | 10 January 2025 | Accrual | 0.6 | 0.0 | 0.6 | 0.0 | 0.0 | 0.0 | false | false | | 11 January 2025 | Accrual Adjustment | 0.6 | 0.0 | 0.6 | 0.0 | 0.0 | 0.0 | false | false | - @TestRailId:C3276 # PS-2245 Scenario: Verify non negative amount for Accrual Activity on backdated repayment, accrual adjustment and revert activity When Admin sets the business date to "09 December 2024" @@ -2555,6 +2552,1904 @@ Feature: LoanAccrualActivity | 10 January 2025 | Accrual | 0.6 | 0.0 | 0.6 | 0.0 | 0.0 | 0.0 | false | false | | 11 January 2025 | Accrual Adjustment | 1.19 | 0.0 | 1.19 | 0.0 | 0.0 | 0.0 | false | false | + @TestRailId:C3275 + Scenario: Verify accrual activity for backdated repayment on the progressive loan, accrual adjustment needed + 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_ADV_CUSTOM_PAYMENT_ALLOC_INTEREST_RECALCULATION_DAILY_EMI_360_30_MULTIDISBURSE | 01 January 2024 | 1000 | 26 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 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 sets the business date to "02 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 | | 757.98 | 242.02 | 21.67 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 2 | 29 | 01 March 2024 | | 510.71 | 247.27 | 16.42 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 3 | 31 | 01 April 2024 | | 258.09 | 252.62 | 11.07 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 4 | 30 | 01 May 2024 | | 0.0 | 258.09 | 5.59 | 0.0 | 0.0 | 263.68 | 0.0 | 0.0 | 0.0 | 263.68 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 54.75 | 0.0 | 0.0 | 1054.75 | 0.0 | 0.0 | 0.0 | 1054.75 | + 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 | + When Admin sets the business date to "19 January 2024" + And Admin runs inline COB job for Loan + And Admin sets the business date to "21 January 2024" + And Admin runs inline COB job for Loan + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 757.98 | 242.02 | 21.67 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 2 | 29 | 01 March 2024 | | 510.71 | 247.27 | 16.42 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 3 | 31 | 01 April 2024 | | 258.09 | 252.62 | 11.07 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 4 | 30 | 01 May 2024 | | 0.0 | 258.09 | 5.59 | 0.0 | 0.0 | 263.68 | 0.0 | 0.0 | 0.0 | 263.68 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 54.75 | 0.0 | 0.0 | 1054.75 | 0.0 | 0.0 | 0.0 | 1054.75 | + 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 | + | 18 January 2024 | Accrual | 11.88 | 0.0 | 11.88 | 0.0 | 0.0 | 0.0 | false | false | + | 19 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 20 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + When Admin sets the business date to "21 January 2024" + And Customer makes "AUTOPAY" repayment on "15 January 2024" with 263.69 EUR transaction amount + When Admin sets the business date to "23 January 2024" + And Admin runs inline COB job for Loan + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 15 January 2024 | 746.09 | 253.91 | 9.78 | 0.0 | 0.0 | 263.69 | 263.69 | 263.69 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 507.43 | 238.66 | 25.03 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 3 | 31 | 01 April 2024 | | 254.73 | 252.7 | 10.99 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 4 | 30 | 01 May 2024 | | 0.0 | 254.73 | 5.52 | 0.0 | 0.0 | 260.25 | 0.0 | 0.0 | 0.0 | 260.25 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 51.32 | 0.0 | 0.0 | 1051.32 | 263.69 | 263.69 | 0.0 | 787.63 | + 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 | Repayment | 263.69 | 253.91 | 9.78 | 0.0 | 0.0 | 746.09 | false | false | + | 18 January 2024 | Accrual | 11.88 | 0.0 | 11.88 | 0.0 | 0.0 | 0.0 | false | false | + | 19 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 20 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 21 January 2024 | Accrual Adjustment | 0.37 | 0.0 | 0.37 | 0.0 | 0.0 | 0.0 | false | false | + | 22 January 2024 | Accrual | 0.52 | 0.0 | 0.52 | 0.0 | 0.0 | 0.0 | false | false | + When Admin sets the business date to "26 January 2024" + And Admin runs inline COB job for Loan + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 15 January 2024 | 746.09 | 253.91 | 9.78 | 0.0 | 0.0 | 263.69 | 263.69 | 263.69 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 507.43 | 238.66 | 25.03 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 3 | 31 | 01 April 2024 | | 254.73 | 252.7 | 10.99 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 4 | 30 | 01 May 2024 | | 0.0 | 254.73 | 5.52 | 0.0 | 0.0 | 260.25 | 0.0 | 0.0 | 0.0 | 260.25 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 51.32 | 0.0 | 0.0 | 1051.32 | 263.69 | 263.69 | 0.0 | 787.63 | + 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 | Repayment | 263.69 | 253.91 | 9.78 | 0.0 | 0.0 | 746.09 | false | false | + | 18 January 2024 | Accrual | 11.88 | 0.0 | 11.88 | 0.0 | 0.0 | 0.0 | false | false | + | 19 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 20 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 21 January 2024 | Accrual Adjustment | 0.37 | 0.0 | 0.37 | 0.0 | 0.0 | 0.0 | false | false | + | 22 January 2024 | Accrual | 0.52 | 0.0 | 0.52 | 0.0 | 0.0 | 0.0 | false | false | + | 23 January 2024 | Accrual | 0.52 | 0.0 | 0.52 | 0.0 | 0.0 | 0.0 | false | false | + | 24 January 2024 | Accrual | 0.52 | 0.0 | 0.52 | 0.0 | 0.0 | 0.0 | false | false | + | 25 January 2024 | Accrual | 0.52 | 0.0 | 0.52 | 0.0 | 0.0 | 0.0 | false | false | + + @TestRailId:C3276 + Scenario: Verify accrual activity for backdated repayment on the progressive loan, accrual adjustment not needed + 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_ADV_CUSTOM_PAYMENT_ALLOC_INTEREST_RECALCULATION_DAILY_EMI_360_30_MULTIDISBURSE | 01 January 2024 | 1000 | 26 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 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 sets the business date to "02 January 2024" + And Admin runs inline COB job for Loan + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 757.98 | 242.02 | 21.67 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 2 | 29 | 01 March 2024 | | 510.71 | 247.27 | 16.42 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 3 | 31 | 01 April 2024 | | 258.09 | 252.62 | 11.07 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 4 | 30 | 01 May 2024 | | 0.0 | 258.09 | 5.59 | 0.0 | 0.0 | 263.68 | 0.0 | 0.0 | 0.0 | 263.68 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 54.75 | 0.0 | 0.0 | 1054.75 | 0.0 | 0.0 | 0.0 | 1054.75 | + 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 | + When Admin sets the business date to "17 January 2024" + And Admin runs inline COB job for Loan + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 757.98 | 242.02 | 21.67 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 2 | 29 | 01 March 2024 | | 510.71 | 247.27 | 16.42 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 3 | 31 | 01 April 2024 | | 258.09 | 252.62 | 11.07 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 4 | 30 | 01 May 2024 | | 0.0 | 258.09 | 5.59 | 0.0 | 0.0 | 263.68 | 0.0 | 0.0 | 0.0 | 263.68 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 54.75 | 0.0 | 0.0 | 1054.75 | 0.0 | 0.0 | 0.0 | 1054.75 | + 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 | + | 02 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2024 | Accrual | 0.69 | 0.0 | 0.69 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 08 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 10 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 11 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 12 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 13 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 14 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2024 | Accrual | 0.69 | 0.0 | 0.69 | 0.0 | 0.0 | 0.0 | false | false | + | 16 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + And Customer makes "AUTOPAY" repayment on "15 January 2024" with 263.69 EUR transaction amount + When Admin sets the business date to "18 January 2024" + And Admin runs inline COB job for Loan + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 15 January 2024 | 746.09 | 253.91 | 9.78 | 0.0 | 0.0 | 263.69 | 263.69 | 263.69 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 507.43 | 238.66 | 25.03 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 3 | 31 | 01 April 2024 | | 254.73 | 252.7 | 10.99 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 4 | 30 | 01 May 2024 | | 0.0 | 254.73 | 5.52 | 0.0 | 0.0 | 260.25 | 0.0 | 0.0 | 0.0 | 260.25 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 51.32 | 0.0 | 0.0 | 1051.32 | 263.69 | 263.69 | 0.0 | 787.63 | + 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 | + | 02 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2024 | Accrual | 0.69 | 0.0 | 0.69 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 08 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 10 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 11 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 12 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 13 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 14 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2024 | Accrual | 0.69 | 0.0 | 0.69 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2024 | Repayment | 263.69 | 253.91 | 9.78 | 0.0 | 0.0 | 746.09 | false | false | + | 16 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 17 January 2024 | Accrual | 0.34 | 0.0 | 0.34 | 0.0 | 0.0 | 0.0 | false | false | + When Admin sets the business date to "26 January 2024" + And Admin runs inline COB job for Loan + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 15 January 2024 | 746.09 | 253.91 | 9.78 | 0.0 | 0.0 | 263.69 | 263.69 | 263.69 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 507.43 | 238.66 | 25.03 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 3 | 31 | 01 April 2024 | | 254.73 | 252.7 | 10.99 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 4 | 30 | 01 May 2024 | | 0.0 | 254.73 | 5.52 | 0.0 | 0.0 | 260.25 | 0.0 | 0.0 | 0.0 | 260.25 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 51.32 | 0.0 | 0.0 | 1051.32 | 263.69 | 263.69 | 0.0 | 787.63 | + 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 | + | 02 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2024 | Accrual | 0.69 | 0.0 | 0.69 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 08 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 10 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 11 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 12 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 13 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 14 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2024 | Accrual | 0.69 | 0.0 | 0.69 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2024 | Repayment | 263.69 | 253.91 | 9.78 | 0.0 | 0.0 | 746.09 | false | false | + | 16 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 17 January 2024 | Accrual | 0.34 | 0.0 | 0.34 | 0.0 | 0.0 | 0.0 | false | false | + | 18 January 2024 | Accrual | 0.52 | 0.0 | 0.52 | 0.0 | 0.0 | 0.0 | false | false | + | 19 January 2024 | Accrual | 0.53 | 0.0 | 0.53 | 0.0 | 0.0 | 0.0 | false | false | + | 20 January 2024 | Accrual | 0.52 | 0.0 | 0.52 | 0.0 | 0.0 | 0.0 | false | false | + | 21 January 2024 | Accrual | 0.52 | 0.0 | 0.52 | 0.0 | 0.0 | 0.0 | false | false | + | 22 January 2024 | Accrual | 0.52 | 0.0 | 0.52 | 0.0 | 0.0 | 0.0 | false | false | + | 23 January 2024 | Accrual | 0.52 | 0.0 | 0.52 | 0.0 | 0.0 | 0.0 | false | false | + | 24 January 2024 | Accrual | 0.52 | 0.0 | 0.52 | 0.0 | 0.0 | 0.0 | false | false | + | 25 January 2024 | Accrual | 0.52 | 0.0 | 0.52 | 0.0 | 0.0 | 0.0 | false | false | + + @TestRailId:C3284 + Scenario: Verify accrual activity for backdated disbursal on the progressive loan, accrual adjustment not needed + 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_ADV_CUSTOM_PAYMENT_ALLOC_INTEREST_RECALCULATION_DAILY_EMI_360_30_MULTIDISBURSE | 01 January 2024 | 1500 | 26 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "1500" 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 sets the business date to "02 January 2024" + And Admin runs inline COB job for Loan + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 757.98 | 242.02 | 21.67 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 2 | 29 | 01 March 2024 | | 510.71 | 247.27 | 16.42 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 3 | 31 | 01 April 2024 | | 258.09 | 252.62 | 11.07 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 4 | 30 | 01 May 2024 | | 0.0 | 258.09 | 5.59 | 0.0 | 0.0 | 263.68 | 0.0 | 0.0 | 0.0 | 263.68 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 54.75 | 0.0 | 0.0 | 1054.75 | 0.0 | 0.0 | 0.0 | 1054.75 | + 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 | + When Admin sets the business date to "20 January 2024" + And Admin runs inline COB job for Loan + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 757.98 | 242.02 | 21.67 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 2 | 29 | 01 March 2024 | | 510.71 | 247.27 | 16.42 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 3 | 31 | 01 April 2024 | | 258.09 | 252.62 | 11.07 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 4 | 30 | 01 May 2024 | | 0.0 | 258.09 | 5.59 | 0.0 | 0.0 | 263.68 | 0.0 | 0.0 | 0.0 | 263.68 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 54.75 | 0.0 | 0.0 | 1054.75 | 0.0 | 0.0 | 0.0 | 1054.75 | + 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 | + | 02 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2024 | Accrual | 0.69 | 0.0 | 0.69 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 08 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 10 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 11 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 12 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 13 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 14 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2024 | Accrual | 0.69 | 0.0 | 0.69 | 0.0 | 0.0 | 0.0 | false | false | + | 16 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 17 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 18 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 19 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + When Admin successfully disburse the loan on "15 January 2024" with "500" EUR transaction amount + When Admin sets the business date to "21 January 2024" + And Admin runs inline COB job for Loan + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | | | 15 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 1133.33 | 366.67 | 27.6 | 0.0 | 0.0 | 394.27 | 0.0 | 0.0 | 0.0 | 394.27 | + | 2 | 29 | 01 March 2024 | | 763.62 | 369.71 | 24.56 | 0.0 | 0.0 | 394.27 | 0.0 | 0.0 | 0.0 | 394.27 | + | 3 | 31 | 01 April 2024 | | 385.9 | 377.72 | 16.55 | 0.0 | 0.0 | 394.27 | 0.0 | 0.0 | 0.0 | 394.27 | + | 4 | 30 | 01 May 2024 | | 0.0 | 385.9 | 8.36 | 0.0 | 0.0 | 394.26 | 0.0 | 0.0 | 0.0 | 394.26 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1500.0 | 77.07 | 0.0 | 0.0 | 1577.07 | 0.0 | 0.0 | 0.0 | 1577.07 | + 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 | + | 02 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2024 | Accrual | 0.69 | 0.0 | 0.69 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 08 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 10 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 11 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 12 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 13 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 14 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2024 | Accrual | 0.69 | 0.0 | 0.69 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1500.0 | false | false | + | 16 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 17 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 18 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 19 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 20 January 2024 | Accrual | 2.44 | 0.0 | 2.44 | 0.0 | 0.0 | 0.0 | false | false | + When Admin sets the business date to "2 February 2024" + And Admin runs inline COB job for Loan + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | | | 15 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 1133.33 | 366.67 | 27.6 | 0.0 | 0.0 | 394.27 | 0.0 | 0.0 | 0.0 | 394.27 | + | 2 | 29 | 01 March 2024 | | 763.89 | 369.44 | 24.83 | 0.0 | 0.0 | 394.27 | 0.0 | 0.0 | 0.0 | 394.27 | + | 3 | 31 | 01 April 2024 | | 386.17 | 377.72 | 16.55 | 0.0 | 0.0 | 394.27 | 0.0 | 0.0 | 0.0 | 394.27 | + | 4 | 30 | 01 May 2024 | | 0.0 | 386.17 | 8.37 | 0.0 | 0.0 | 394.54 | 0.0 | 0.0 | 0.0 | 394.54 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1500.0 | 77.35 | 0.0 | 0.0 | 1577.35 | 0.0 | 0.0 | 0.0 | 1577.35 | + 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 | + | 02 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2024 | Accrual | 0.69 | 0.0 | 0.69 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 08 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 10 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 11 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 12 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 13 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 14 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2024 | Accrual | 0.69 | 0.0 | 0.69 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1500.0 | false | false | + | 16 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 17 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 18 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 19 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 20 January 2024 | Accrual | 2.44 | 0.0 | 2.44 | 0.0 | 0.0 | 0.0 | false | false | + | 21 January 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | + | 22 January 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | + | 23 January 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | + | 24 January 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | + | 25 January 2024 | Accrual | 1.04 | 0.0 | 1.04 | 0.0 | 0.0 | 0.0 | false | false | + | 26 January 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | + | 27 January 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | + | 28 January 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | + | 29 January 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | + | 30 January 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | + | 31 January 2024 | Accrual | 1.04 | 0.0 | 1.04 | 0.0 | 0.0 | 0.0 | false | false | + | 01 February 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | + + @TestRailId:C3285 + Scenario: Verify accrual activity for reversal of last disbursement on the progressive loan, accrual adjustment needed + 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_ADV_CUSTOM_PAYMENT_ALLOC_INTEREST_RECALCULATION_DAILY_EMI_360_30_MULTIDISBURSE | 01 January 2024 | 1500 | 26 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "1500" 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 sets the business date to "02 January 2024" + And Admin runs inline COB job for Loan + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 757.98 | 242.02 | 21.67 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 2 | 29 | 01 March 2024 | | 510.71 | 247.27 | 16.42 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 3 | 31 | 01 April 2024 | | 258.09 | 252.62 | 11.07 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 4 | 30 | 01 May 2024 | | 0.0 | 258.09 | 5.59 | 0.0 | 0.0 | 263.68 | 0.0 | 0.0 | 0.0 | 263.68 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 54.75 | 0.0 | 0.0 | 1054.75 | 0.0 | 0.0 | 0.0 | 1054.75 | + 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 | + When Admin sets the business date to "20 January 2024" + And Admin runs inline COB job for Loan + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 757.98 | 242.02 | 21.67 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 2 | 29 | 01 March 2024 | | 510.71 | 247.27 | 16.42 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 3 | 31 | 01 April 2024 | | 258.09 | 252.62 | 11.07 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 4 | 30 | 01 May 2024 | | 0.0 | 258.09 | 5.59 | 0.0 | 0.0 | 263.68 | 0.0 | 0.0 | 0.0 | 263.68 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 54.75 | 0.0 | 0.0 | 1054.75 | 0.0 | 0.0 | 0.0 | 1054.75 | + 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 | + | 02 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2024 | Accrual | 0.69 | 0.0 | 0.69 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 08 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 10 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 11 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 12 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 13 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 14 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2024 | Accrual | 0.69 | 0.0 | 0.69 | 0.0 | 0.0 | 0.0 | false | false | + | 16 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 17 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 18 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 19 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + When Admin sets the business date to "20 January 2024" + When Admin successfully disburse the loan on "15 January 2024" with "500" EUR transaction amount + When Admin sets the business date to "22 January 2024" + And Admin runs inline COB job for Loan + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | | | 15 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 1133.33 | 366.67 | 27.6 | 0.0 | 0.0 | 394.27 | 0.0 | 0.0 | 0.0 | 394.27 | + | 2 | 29 | 01 March 2024 | | 763.62 | 369.71 | 24.56 | 0.0 | 0.0 | 394.27 | 0.0 | 0.0 | 0.0 | 394.27 | + | 3 | 31 | 01 April 2024 | | 385.9 | 377.72 | 16.55 | 0.0 | 0.0 | 394.27 | 0.0 | 0.0 | 0.0 | 394.27 | + | 4 | 30 | 01 May 2024 | | 0.0 | 385.9 | 8.36 | 0.0 | 0.0 | 394.26 | 0.0 | 0.0 | 0.0 | 394.26 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1500.0 | 77.07 | 0.0 | 0.0 | 1577.07 | 0.0 | 0.0 | 0.0 | 1577.07 | + 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 | + | 02 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2024 | Accrual | 0.69 | 0.0 | 0.69 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 08 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 10 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 11 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 12 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 13 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 14 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2024 | Accrual | 0.69 | 0.0 | 0.69 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1500.0 | false | false | + | 16 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 17 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 18 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 19 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 20 January 2024 | Accrual | 2.44 | 0.0 | 2.44 | 0.0 | 0.0 | 0.0 | false | false | + | 21 January 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | + When Admin sets the business date to "31 January 2024" + And Admin runs inline COB job for Loan + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | | | 15 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 1133.33 | 366.67 | 27.6 | 0.0 | 0.0 | 394.27 | 0.0 | 0.0 | 0.0 | 394.27 | + | 2 | 29 | 01 March 2024 | | 763.62 | 369.71 | 24.56 | 0.0 | 0.0 | 394.27 | 0.0 | 0.0 | 0.0 | 394.27 | + | 3 | 31 | 01 April 2024 | | 385.9 | 377.72 | 16.55 | 0.0 | 0.0 | 394.27 | 0.0 | 0.0 | 0.0 | 394.27 | + | 4 | 30 | 01 May 2024 | | 0.0 | 385.9 | 8.36 | 0.0 | 0.0 | 394.26 | 0.0 | 0.0 | 0.0 | 394.26 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1500.0 | 77.07 | 0.0 | 0.0 | 1577.07 | 0.0 | 0.0 | 0.0 | 1577.07 | + 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 | + | 02 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2024 | Accrual | 0.69 | 0.0 | 0.69 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 08 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 10 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 11 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 12 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 13 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 14 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2024 | Accrual | 0.69 | 0.0 | 0.69 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1500.0 | false | false | + | 16 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 17 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 18 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 19 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 20 January 2024 | Accrual | 2.44 | 0.0 | 2.44 | 0.0 | 0.0 | 0.0 | false | false | + | 21 January 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | + | 22 January 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | + | 23 January 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | + | 24 January 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | + | 25 January 2024 | Accrual | 1.04 | 0.0 | 1.04 | 0.0 | 0.0 | 0.0 | false | false | + | 26 January 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | + | 27 January 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | + | 28 January 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | + | 29 January 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | + | 30 January 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | + And Admin successfully undo last disbursal + When Admin sets the business date to "02 February 2024" + And Admin runs inline COB job for Loan + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 757.98 | 242.02 | 21.67 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 2 | 29 | 01 March 2024 | | 510.9 | 247.08 | 16.61 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 3 | 31 | 01 April 2024 | | 258.28 | 252.62 | 11.07 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 4 | 30 | 01 May 2024 | | 0.0 | 258.28 | 5.6 | 0.0 | 0.0 | 263.88 | 0.0 | 0.0 | 0.0 | 263.88 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 54.95 | 0.0 | 0.0 | 1054.95 | 0.0 | 0.0 | 0.0 | 1054.95 | + 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 | + | 02 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2024 | Accrual | 0.69 | 0.0 | 0.69 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 08 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 10 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 11 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 12 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 13 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 14 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2024 | Accrual | 0.69 | 0.0 | 0.69 | 0.0 | 0.0 | 0.0 | false | false | + | 16 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 17 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 18 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 19 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 20 January 2024 | Accrual | 2.44 | 0.0 | 2.44 | 0.0 | 0.0 | 0.0 | false | false | + | 21 January 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | + | 22 January 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | + | 23 January 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | + | 24 January 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | + | 25 January 2024 | Accrual | 1.04 | 0.0 | 1.04 | 0.0 | 0.0 | 0.0 | false | false | + | 26 January 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | + | 27 January 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | + | 28 January 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | + | 29 January 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | + | 30 January 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | + | 31 January 2024 | Accrual Adjustment | 4.54 | 0.0 | 4.54 | 0.0 | 0.0 | 0.0 | false | false | + | 01 February 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + + @TestRailId:C3286 + Scenario: Verify accrual activity for reversal of last disbursement on the progressive loan, accrual adjustment not needed + 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_ADV_CUSTOM_PAYMENT_ALLOC_INTEREST_RECALCULATION_DAILY_EMI_360_30_MULTIDISBURSE | 01 January 2024 | 1100 | 26 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "1100" 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 sets the business date to "02 January 2024" + And Admin runs inline COB job for Loan + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 757.98 | 242.02 | 21.67 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 2 | 29 | 01 March 2024 | | 510.71 | 247.27 | 16.42 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 3 | 31 | 01 April 2024 | | 258.09 | 252.62 | 11.07 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 4 | 30 | 01 May 2024 | | 0.0 | 258.09 | 5.59 | 0.0 | 0.0 | 263.68 | 0.0 | 0.0 | 0.0 | 263.68 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 54.75 | 0.0 | 0.0 | 1054.75 | 0.0 | 0.0 | 0.0 | 1054.75 | + 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 | + When Admin sets the business date to "20 January 2024" + When Admin successfully disburse the loan on "20 January 2024" with "100" EUR transaction amount + When Admin sets the business date to "23 January 2024" + And Admin runs inline COB job for Loan + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | | | 20 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 832.79 | 267.21 | 22.51 | 0.0 | 0.0 | 289.72 | 0.0 | 0.0 | 0.0 | 289.72 | + | 2 | 29 | 01 March 2024 | | 561.11 | 271.68 | 18.04 | 0.0 | 0.0 | 289.72 | 0.0 | 0.0 | 0.0 | 289.72 | + | 3 | 31 | 01 April 2024 | | 283.55 | 277.56 | 12.16 | 0.0 | 0.0 | 289.72 | 0.0 | 0.0 | 0.0 | 289.72 | + | 4 | 30 | 01 May 2024 | | 0.0 | 283.55 | 6.14 | 0.0 | 0.0 | 289.69 | 0.0 | 0.0 | 0.0 | 289.69 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1100.0 | 58.85 | 0.0 | 0.0 | 1158.85 | 0.0 | 0.0 | 0.0 | 1158.85 | + 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 | + | 02 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2024 | Accrual | 0.69 | 0.0 | 0.69 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 08 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 10 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 11 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 12 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 13 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 14 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2024 | Accrual | 0.69 | 0.0 | 0.69 | 0.0 | 0.0 | 0.0 | false | false | + | 16 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 17 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 18 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 19 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 20 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1100.0 | false | false | + | 20 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 21 January 2024 | Accrual | 0.77 | 0.0 | 0.77 | 0.0 | 0.0 | 0.0 | false | false | + | 22 January 2024 | Accrual | 0.77 | 0.0 | 0.77 | 0.0 | 0.0 | 0.0 | false | false | + And Admin successfully undo last disbursal + When Admin sets the business date to "2 February 2024" + And Admin runs inline COB job for Loan + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 757.98 | 242.02 | 21.67 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 2 | 29 | 01 March 2024 | | 510.9 | 247.08 | 16.61 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 3 | 31 | 01 April 2024 | | 258.28 | 252.62 | 11.07 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 4 | 30 | 01 May 2024 | | 0.0 | 258.28 | 5.6 | 0.0 | 0.0 | 263.88 | 0.0 | 0.0 | 0.0 | 263.88 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 54.95 | 0.0 | 0.0 | 1054.95 | 0.0 | 0.0 | 0.0 | 1054.95 | + 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 | + | 02 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2024 | Accrual | 0.69 | 0.0 | 0.69 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 08 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 10 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 11 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 12 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 13 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 14 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2024 | Accrual | 0.69 | 0.0 | 0.69 | 0.0 | 0.0 | 0.0 | false | false | + | 16 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 17 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 18 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 19 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 20 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 21 January 2024 | Accrual | 0.77 | 0.0 | 0.77 | 0.0 | 0.0 | 0.0 | false | false | + | 22 January 2024 | Accrual | 0.77 | 0.0 | 0.77 | 0.0 | 0.0 | 0.0 | false | false | + | 23 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false | + | 24 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 25 January 2024 | Accrual | 0.69 | 0.0 | 0.69 | 0.0 | 0.0 | 0.0 | false | false | + | 26 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 27 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 28 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 29 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 30 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 31 January 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + | 01 February 2024 | Accrual | 0.7 | 0.0 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + + @TestRailId:C3393 + Scenario: Interest pause with same period - UC1 + When Admin sets the business date to "2 January 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin runs inline COB job for Loan +# --- set and check interest pause period --- # + And Create interest pause period with start date "05 February 2024" and end date "10 February 2024" + Then Loan term variations has 1 variation, with the following data: + | Term Type Id | Term Type Code | Term Type Value | Applicable From | Decimal Value | Date Value | Is Specific To Installment | Is Processed | + | 11 | loanTermType.interestPause | interestPause | 05 February 2024 | 0.0 | 10 February 2024 | false | | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 66.95 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.33 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.61 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.8 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.8 | 0.1 | 0.0 | 0.0 | 16.9 | 0.0 | 0.0 | 0.0 | 16.9 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 1.95 | 0 | 0 | 101.95 | 0.0 | 0 | 0 | 101.95 | + When Admin sets the business date to "15 February 2024" + When Admin runs inline COB job for Loan + 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 | + | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 16 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 17 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 18 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 19 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 20 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 21 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 22 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 23 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 24 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 25 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 26 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 27 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 28 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 29 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 30 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 31 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 01 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 02 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 04 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 11 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 12 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 13 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 14 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + + @TestRailId:C3394 + Scenario: Interest pause between two periods - UC2 + When Admin sets the business date to "2 January 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin runs inline COB job for Loan +# --- set and check interest pause period --- # + And Create interest pause period with start date "10 February 2024" and end date "10 March 2024" + Then Loan term variations has 1 variation, with the following data: + | Term Type Id | Term Type Code | Term Type Value | Applicable From | Decimal Value | Date Value | Is Specific To Installment | Is Processed | + | 11 | loanTermType.interestPause | interestPause | 10 February 2024 | 0.0 | 10 March 2024 | false | | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 66.69 | 16.88 | 0.13 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 49.96 | 16.73 | 0.28 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.24 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.42 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.42 | 0.1 | 0.0 | 0.0 | 16.52 | 0.0 | 0.0 | 0.0 | 16.52 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 1.57 | 0 | 0 | 101.57 | 0.0 | 0 | 0 | 101.57 | + When Admin sets the business date to "5 April 2024" + When Admin runs inline COB job for Loan + 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 | + | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 16 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 17 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 18 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 19 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 20 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 21 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 22 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 23 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 24 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 25 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 26 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 27 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 28 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 29 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 30 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 31 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 01 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 02 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 04 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 05 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 06 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 07 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 08 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 09 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 11 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 12 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 13 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 14 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 16 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 17 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 18 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 19 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 20 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 21 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 22 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 23 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 24 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 25 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 26 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 27 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 28 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 29 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 30 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 31 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 02 April 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 April 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 04 April 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + + @TestRailId:C3395 + Scenario: Backdated interest pause after the repayment - UC3 + When Admin sets the business date to "2 January 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin runs inline COB job for Loan + When Admin sets the business date to "1 March 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 34.02 | 0 | 0 | 68.03 | + 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | +# --- set and check interest pause period --- # + And Create interest pause period with start date "05 February 2024" and end date "10 February 2024" + When Admin sets the business date to "5 March 2024" + When Admin runs inline COB job for Loan + Then Loan term variations has 1 variation, with the following data: + | Term Type Id | Term Type Code | Term Type Value | Applicable From | Decimal Value | Date Value | Is Specific To Installment | Is Processed | + | 11 | loanTermType.interestPause | interestPause | 05 February 2024 | 0.0 | 10 February 2024 | false | | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 66.95 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | | 50.33 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.61 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.8 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.8 | 0.1 | 0.0 | 0.0 | 16.9 | 0.0 | 0.0 | 0.0 | 16.9 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 1.95 | 0 | 0 | 101.95 | 34.02 | 0 | 0 | 67.93 | + 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 | + | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 16 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 17 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 18 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 19 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 20 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 21 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 22 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 23 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 24 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 25 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 26 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 27 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 28 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 29 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 30 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 31 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 02 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 04 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 11 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 12 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 13 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 14 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 15 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 16 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 17 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 18 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 19 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 20 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 21 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 22 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 23 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 24 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 25 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 26 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 27 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 28 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 29 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 66.95 | false | true | + | 01 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 02 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 03 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 04 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + + @TestRailId:C3396 + Scenario: Multiple interest pauses - UC4 + When Admin sets the business date to "2 January 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin runs inline COB job for Loan + When Admin sets the business date to "1 March 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 34.02 | 0 | 0 | 68.03 | + 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | +# --- set and check interest pause period --- # + And Create interest pause period with start date "05 February 2024" and end date "10 February 2024" + Then Loan term variations has 1 variation, with the following data: + | Term Type Id | Term Type Code | Term Type Value | Applicable From | Decimal Value | Date Value | Is Specific To Installment | Is Processed | + | 11 | loanTermType.interestPause | interestPause | 05 February 2024 | 0.0 | 10 February 2024 | false | | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 66.95 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | | 50.33 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.61 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.8 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.8 | 0.1 | 0.0 | 0.0 | 16.9 | 0.0 | 0.0 | 0.0 | 16.9 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 1.95 | 0 | 0 | 101.95 | 34.02 | 0 | 0 | 67.93 | + 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 66.95 | false | true | +# --- set and check 2nd interest pause period --- # + And Create interest pause period with start date "10 March 2024" and end date "20 March 2024" + Then Loan term variations has 2 variation, with the following data: + | Term Type Id | Term Type Code | Term Type Value | Applicable From | Decimal Value | Date Value | Is Specific To Installment | Is Processed | + | 11 | loanTermType.interestPause | interestPause | 05 February 2024 | 0.0 | 10 February 2024 | false | | + | 11 | loanTermType.interestPause | interestPause | 10 March 2024 | 0.0 | 20 March 2024 | false | | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 66.95 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | | 50.19 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.47 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.66 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.66 | 0.1 | 0.0 | 0.0 | 16.76 | 0.0 | 0.0 | 0.0 | 16.76 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 1.81 | 0 | 0 | 101.81 | 34.02 | 0 | 0 | 67.79 | + When Admin sets the business date to "5 April 2024" + When Admin runs inline COB job for Loan + 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 | + | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 16 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 17 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 18 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 19 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 20 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 21 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 22 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 23 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 24 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 25 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 26 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 27 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 28 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 29 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 30 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 31 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 02 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 04 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 11 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 12 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 13 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 14 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 15 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 16 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 17 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 18 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 19 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 20 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 21 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 22 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 23 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 24 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 25 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 26 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 27 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 28 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 29 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 66.95 | false | true | + | 01 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 02 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 03 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 04 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 05 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 06 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 07 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 08 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 09 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 21 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 22 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 23 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 24 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 25 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 26 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 27 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 28 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 29 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 30 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 31 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 02 April 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 03 April 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 04 April 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + + @TestRailId:C3397 + Scenario: Backdated interest pause outcomes with Accrual Adjustment - UC5 + When Admin sets the business date to "2 January 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin runs inline COB job for Loan + When Admin sets the business date to "15 February 2024" + When Admin runs inline COB job for Loan +# --- set and check interest pause period --- # + And Create interest pause period with start date "05 February 2024" and end date "10 February 2024" + Then Loan term variations has 1 variation, with the following data: + | Term Type Id | Term Type Code | Term Type Value | Applicable From | Decimal Value | Date Value | Is Specific To Installment | Is Processed | + | 11 | loanTermType.interestPause | interestPause | 05 February 2024 | 0.0 | 10 February 2024 | false | | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 66.97 | 16.6 | 0.41 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.35 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.63 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.82 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.82 | 0.1 | 0.0 | 0.0 | 16.92 | 0.0 | 0.0 | 0.0 | 16.92 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 1.97 | 0 | 0 | 101.97 | 0.0 | 0 | 0 | 101.97 | + 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 | + | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 16 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 17 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 18 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 19 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 20 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 21 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 22 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 23 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 24 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 25 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 26 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 27 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 28 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 29 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 30 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 31 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 01 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 02 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 04 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 05 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 06 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 07 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 08 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 09 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 10 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 11 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 12 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 13 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 14 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + When Admin sets the business date to "16 February 2024" + When Admin runs inline COB job for Loan + 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 | + | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 16 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 17 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 18 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 19 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 20 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 21 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 22 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 23 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 24 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 25 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 26 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 27 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 28 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 29 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 30 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 31 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 01 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 02 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 04 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 05 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 06 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 07 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 08 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 09 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 10 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 11 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 12 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 13 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 14 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 15 February 2024 | Accrual Adjustment | 0.1 | 0.0 | 0.1 | 0.0 | 0.0 | 0.0 | false | false | + + @TestRailId:C3402 + Scenario: Backdated interest pause after the early repayment - UC6 + When Admin sets the business date to "2 January 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin runs inline COB job for Loan + When Admin sets the business date to "15 January 2024" + And Customer makes "AUTOPAY" repayment on "15 January 2024" with 15 EUR transaction amount + When Admin runs inline COB job for Loan + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.52 | 16.48 | 0.53 | 0.0 | 0.0 | 17.01 | 15.0 | 15.0 | 0.0 | 2.01 | + | 2 | 29 | 01 March 2024 | | 67.0 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.38 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.66 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.85 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.85 | 0.1 | 0.0 | 0.0 | 16.95 | 0.0 | 0.0 | 0.0 | 16.95 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.0 | 0.0 | 0.0 | 102.0 | 15.0 | 15.0 | 0.0 | 87.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 | + | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2024 | Repayment | 15.0 | 15.0 | 0.0 | 0.0 | 0.0 | 85.0 | false | false | +# --- set and check interest pause period --- # + And Create interest pause period with start date "14 January 2024" and end date "20 February 2024" + When Admin sets the business date to "5 March 2024" + When Admin runs inline COB job for Loan + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.49 | 16.51 | 0.5 | 0.0 | 0.0 | 17.01 | 15.0 | 15.0 | 0.0 | 2.01 | + | 2 | 29 | 01 March 2024 | | 66.65 | 16.84 | 0.17 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.04 | 16.61 | 0.4 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.32 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.5 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.5 | 0.1 | 0.0 | 0.0 | 16.6 | 0.0 | 0.0 | 0.0 | 16.6 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.65 | 0.0 | 0.0 | 101.65 | 15.0 | 15.0 | 0.0 | 86.65 | + When Admin sets the business date to "5 March 2024" + When Admin runs inline COB job for Loan + 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 | + | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2024 | Repayment | 15.0 | 15.0 | 0.0 | 0.0 | 0.0 | 85.0 | false | false | + | 15 January 2024 | Accrual Adjustment | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 16 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 17 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 18 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 19 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 20 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 21 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 22 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 23 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 24 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 25 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 26 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 27 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 28 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 29 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 30 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 31 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 01 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 21 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 22 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 23 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 24 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 25 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 26 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 27 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 28 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 29 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 01 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 02 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 04 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + + @TestRailId:C3403 + Scenario: Early repayment before interest pause - UC7 + When Admin sets the business date to "1 January 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin sets the business date to "14 January 2024" + And Customer makes "AUTOPAY" repayment on "14 January 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 14 January 2024 | 83.23 | 16.77 | 0.24 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 66.99 | 16.24 | 0.77 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.37 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.65 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.84 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.84 | 0.1 | 0.0 | 0.0 | 16.94 | 0.0 | 0.0 | 0.0 | 16.94 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 1.99 | 0 | 0 | 101.99 | 17.01 | 17.01 | 0 | 84.98 | + 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 | + | 14 January 2024 | Repayment | 17.01 | 16.77 | 0.24 | 0.0 | 0.0 | 83.23 | false | false | + And Create interest pause period with start date "15 January 2024" and end date "25 January 2024" + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 14 January 2024 | 83.23 | 16.77 | 0.24 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 66.82 | 16.41 | 0.6 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.2 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.48 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.67 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.67 | 0.1 | 0.0 | 0.0 | 16.77 | 0.0 | 0.0 | 0.0 | 16.77 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 1.82 | 0 | 0 | 101.82 | 17.01 | 17.01 | 0 | 84.81 | + 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 | + | 14 January 2024 | Repayment | 17.01 | 16.77 | 0.24 | 0.0 | 0.0 | 83.23 | false | false | + + @TestRailId:C3404 + Scenario: Interest pause that overlaps a few installments - UC8 + When Admin sets the business date to "2 January 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin runs inline COB job for Loan + And Create interest pause period with start date "01 February 2024" and end date "01 March 2024" + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.55 | 16.45 | 0.56 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 66.54 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 49.92 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.2 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.38 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.38 | 0.1 | 0.0 | 0.0 | 16.48 | 0.0 | 0.0 | 0.0 | 16.48 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 1.53 | 0 | 0 | 101.53 | 0.0 | 0.0 | 0 | 101.53 | + When Admin sets the business date to "5 March 2024" + When Admin runs inline COB job for Loan + 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 | + | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 16 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 17 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 18 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 19 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 20 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 21 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 22 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 23 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 24 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 25 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 26 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 27 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 28 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 29 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 30 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 31 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 02 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 04 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + + @TestRailId:C3386 + Scenario: Accrual activity transaction reversed without update external-id to null when an accrual activity is reversed + When Admin sets the business date to "12 January 2025" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_ACCRUAL_ACTIVITY_POSTING | 12 January 2025 | 430 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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 | + | | | 12 January 2025 | | 430.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 12 February 2025 | | 323.44 | 106.56 | 2.51 | 0.0 | 0.0 | 109.07 | 0.0 | 0.0 | 0.0 | 109.07 | + | 2 | 28 | 12 March 2025 | | 216.26 | 107.18 | 1.89 | 0.0 | 0.0 | 109.07 | 0.0 | 0.0 | 0.0 | 109.07 | + | 3 | 31 | 12 April 2025 | | 108.45 | 107.81 | 1.26 | 0.0 | 0.0 | 109.07 | 0.0 | 0.0 | 0.0 | 109.07 | + | 4 | 30 | 12 May 2025 | | 0.0 | 108.45 | 0.63 | 0.0 | 0.0 | 109.08 | 0.0 | 0.0 | 0.0 | 109.08 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 430 | 6.29 | 0 | 0 | 436.29 | 0 | 0 | 0 | 436.29 | + And Admin successfully approves the loan on "12 January 2025" with "430" amount and expected disbursement date on "12 January 2025" + And Admin successfully disburse the loan on "12 January 2025" with "430" EUR transaction amount + When Admin sets the business date to "16 January 2025" + And Customer makes "AUTOPAY" repayment on "16 January 2025" with 430 EUR transaction amount + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 12 January 2025 | Disbursement | 430.0 | 0.0 | 0.0 | 0.0 | 0.0 | 430.0 | false | false | + | 16 January 2025 | Repayment | 430.0 | 429.68 | 0.32 | 0.0 | 0.0 | 0.32 | false | false | + And Customer makes "AUTOPAY" repayment on "16 January 2025" 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 | + | | | 12 January 2025 | | 430.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 12 February 2025 | 16 January 2025 | 321.25 | 108.75 | 0.32 | 0.0 | 0.0 | 109.07 | 109.07 | 109.07 | 0.0 | 0.0 | + | 2 | 28 | 12 March 2025 | 16 January 2025 | 212.18 | 109.07 | 0.0 | 0.0 | 0.0 | 109.07 | 109.07 | 109.07 | 0.0 | 0.0 | + | 3 | 31 | 12 April 2025 | 16 January 2025 | 103.11 | 109.07 | 0.0 | 0.0 | 0.0 | 109.07 | 109.07 | 109.07 | 0.0 | 0.0 | + | 4 | 30 | 12 May 2025 | 16 January 2025 | 0.0 | 103.11 | 0.0 | 0.0 | 0.0 | 103.11 | 103.11 | 103.11 | 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 | + | 430 | 0.32 | 0 | 0 | 430.32 | 430.32 | 430.32 | 0 | 0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 12 January 2025 | Disbursement | 430.0 | 0.0 | 0.0 | 0.0 | 0.0 | 430.0 | false | false | + | 16 January 2025 | Repayment | 430.0 | 429.68 | 0.32 | 0.0 | 0.0 | 0.32 | false | false | + | 16 January 2025 | Repayment | 10.0 | 0.32 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | + | 16 January 2025 | Accrual Activity | 0.32 | 0.0 | 0.32 | 0.0 | 0.0 | 0.0 | false | false | + | 16 January 2025 | Accrual | 0.32 | 0.0 | 0.32 | 0.0 | 0.0 | 0.0 | false | false | +# --- check if 'Accrual Activity' transaction has non-null external-id and remember transaction + Then In Loan Transactions the "1"th Transaction with type="Accrual Activity" and date "16 January 2025" has non-null external-id +# --- check if all transactions have non-null external-id + Then In Loan Transactions all transactions have non-null external-id + When Customer undo "2"th repayment on "16 January 2025" + When Admin runs inline COB job for Loan + Then Loan status will be "ACTIVE" + Then Loan has 0.32 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 | + | | | 12 January 2025 | | 430.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 12 February 2025 | 16 January 2025 | 321.25 | 108.75 | 0.32 | 0.0 | 0.0 | 109.07 | 109.07 | 109.07 | 0.0 | 0.0 | + | 2 | 28 | 12 March 2025 | 16 January 2025 | 212.18 | 109.07 | 0.0 | 0.0 | 0.0 | 109.07 | 109.07 | 109.07 | 0.0 | 0.0 | + | 3 | 31 | 12 April 2025 | 16 January 2025 | 103.11 | 109.07 | 0.0 | 0.0 | 0.0 | 109.07 | 109.07 | 109.07 | 0.0 | 0.0 | + | 4 | 30 | 12 May 2025 | | 0.0 | 103.11 | 0.0 | 0.0 | 0.0 | 103.11 | 102.79 | 102.79 | 0.0 | 0.32 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 430 | 0.32 | 0 | 0 | 430.32 | 430.0 | 430.0 | 0 | 0.32 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 12 January 2025 | Disbursement | 430.0 | 0.0 | 0.0 | 0.0 | 0.0 | 430.0 | false | false | + | 16 January 2025 | Repayment | 430.0 | 429.68 | 0.32 | 0.0 | 0.0 | 0.32 | false | false | + | 16 January 2025 | Repayment | 10.0 | 0.32 | 0.0 | 0.0 | 0.0 | 0.0 | true | false | + | 16 January 2025 | Accrual | 0.32 | 0.0 | 0.32 | 0.0 | 0.0 | 0.0 | false | false | +# --- check if 'Accrual Activity' is reversed and has non-null external-id + Then Check required transaction for non-null eternal-id + Then In Loan Transactions all transactions have non-null external-id + + @TestRailId:C3398 + Scenario: Verify accrual activity for paid loan + When Admin sets the business date to "20 December 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 20 December 2024 | 430 | 26 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "20 December 2024" with "430" amount and expected disbursement date on "20 December 2024" + When Admin successfully disburse the loan on "20 December 2024" with "430" EUR transaction amount + When Admin sets the business date to "30 December 2024" + And Admin runs inline COB job for Loan + 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 | + | | | 20 December 2024 | | 430.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 20 January 2025 | | 362.12 | 67.88 | 9.32 | 0.0 | 0.0 | 77.2 | 0.0 | 0.0 | 0.0 | 77.2 | + | 2 | 31 | 20 February 2025 | | 292.77 | 69.35 | 7.85 | 0.0 | 0.0 | 77.2 | 0.0 | 0.0 | 0.0 | 77.2 | + | 3 | 28 | 20 March 2025 | | 221.91 | 70.86 | 6.34 | 0.0 | 0.0 | 77.2 | 0.0 | 0.0 | 0.0 | 77.2 | + | 4 | 31 | 20 April 2025 | | 149.52 | 72.39 | 4.81 | 0.0 | 0.0 | 77.2 | 0.0 | 0.0 | 0.0 | 77.2 | + | 5 | 30 | 20 May 2025 | | 75.56 | 73.96 | 3.24 | 0.0 | 0.0 | 77.2 | 0.0 | 0.0 | 0.0 | 77.2 | + | 6 | 31 | 20 June 2025 | | 0.0 | 75.56 | 1.64 | 0.0 | 0.0 | 77.2 | 0.0 | 0.0 | 0.0 | 77.2 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 430.0 | 33.2 | 0.0 | 0.0 | 463.2 | 0.0 | 0.0 | 0.0 | 463.2 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 20 December 2024 | Disbursement | 430.0 | 0.0 | 0.0 | 0.0 | 0.0 | 430.0 | false | false | + | 29 December 2024 | Accrual | 2.7 | 0.0 | 2.7 | 0.0 | 0.0 | 0.0 | false | false | + And Customer makes "AUTOPAY" repayment on "30 December 2024" with 200 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 | + | | | 20 December 2024 | | 430.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 20 January 2025 | 30 December 2024 | 355.81 | 74.19 | 3.01 | 0.0 | 0.0 | 77.2 | 77.2 | 77.2 | 0.0 | 0.0 | + | 2 | 31 | 20 February 2025 | 30 December 2024 | 278.61 | 77.2 | 0.0 | 0.0 | 0.0 | 77.2 | 77.2 | 77.2 | 0.0 | 0.0 | + | 3 | 28 | 20 March 2025 | | 214.93 | 63.68 | 13.52 | 0.0 | 0.0 | 77.2 | 45.6 | 45.6 | 0.0 | 31.6 | + | 4 | 31 | 20 April 2025 | | 142.39 | 72.54 | 4.66 | 0.0 | 0.0 | 77.2 | 0.0 | 0.0 | 0.0 | 77.2 | + | 5 | 30 | 20 May 2025 | | 68.28 | 74.11 | 3.09 | 0.0 | 0.0 | 77.2 | 0.0 | 0.0 | 0.0 | 77.2 | + | 6 | 31 | 20 June 2025 | | 0.0 | 68.28 | 1.48 | 0.0 | 0.0 | 69.76 | 0.0 | 0.0 | 0.0 | 69.76 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 430.0 | 25.76 | 0.0 | 0.0 | 455.76 | 200.0 | 200.0 | 0.0 | 255.76 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 20 December 2024 | Disbursement | 430.0 | 0.0 | 0.0 | 0.0 | 0.0 | 430.0 | false | false | + | 29 December 2024 | Accrual | 2.7 | 0.0 | 2.7 | 0.0 | 0.0 | 0.0 | false | false | + | 30 December 2024 | Repayment | 200.0 | 196.99 | 3.01 | 0.0 | 0.0 | 233.01 | false | false | + When Admin sets the business date to "21 January 2025" + And Admin runs inline COB job for Loan + 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 | + | | | 20 December 2024 | | 430.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 20 January 2025 | 30 December 2024 | 355.81 | 74.19 | 3.01 | 0.0 | 0.0 | 77.2 | 77.2 | 77.2 | 0.0 | 0.0 | + | 2 | 31 | 20 February 2025 | 30 December 2024 | 278.61 | 77.2 | 0.0 | 0.0 | 0.0 | 77.2 | 77.2 | 77.2 | 0.0 | 0.0 | + | 3 | 28 | 20 March 2025 | | 214.93 | 63.68 | 13.52 | 0.0 | 0.0 | 77.2 | 45.6 | 45.6 | 0.0 | 31.6 | + | 4 | 31 | 20 April 2025 | | 142.39 | 72.54 | 4.66 | 0.0 | 0.0 | 77.2 | 0.0 | 0.0 | 0.0 | 77.2 | + | 5 | 30 | 20 May 2025 | | 68.28 | 74.11 | 3.09 | 0.0 | 0.0 | 77.2 | 0.0 | 0.0 | 0.0 | 77.2 | + | 6 | 31 | 20 June 2025 | | 0.0 | 68.28 | 1.48 | 0.0 | 0.0 | 69.76 | 0.0 | 0.0 | 0.0 | 69.76 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 430.0 | 25.76 | 0.0 | 0.0 | 455.76 | 200.0 | 200.0 | 0.0 | 255.76 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 20 December 2024 | Disbursement | 430.0 | 0.0 | 0.0 | 0.0 | 0.0 | 430.0 | false | false | + | 29 December 2024 | Accrual | 2.7 | 0.0 | 2.7 | 0.0 | 0.0 | 0.0 | false | false | + | 30 December 2024 | Repayment | 200.0 | 196.99 | 3.01 | 0.0 | 0.0 | 233.01 | false | false | + | 30 December 2024 | Accrual | 0.31 | 0.0 | 0.31 | 0.0 | 0.0 | 0.0 | false | false | + | 31 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 01 January 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 02 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 08 January 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 10 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 11 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 12 January 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 13 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 14 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 16 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 17 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 18 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 19 January 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 20 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + When Admin sets the business date to "20 February 2025" + And Admin runs inline COB job for Loan + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 20 December 2024 | Disbursement | 430.0 | 0.0 | 0.0 | 0.0 | 0.0 | 430.0 | false | false | + | 29 December 2024 | Accrual | 2.7 | 0.0 | 2.7 | 0.0 | 0.0 | 0.0 | false | false | + | 30 December 2024 | Repayment | 200.0 | 196.99 | 3.01 | 0.0 | 0.0 | 233.01 | false | false | + | 30 December 2024 | Accrual | 0.31 | 0.0 | 0.31 | 0.0 | 0.0 | 0.0 | false | false | + | 31 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 01 January 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 02 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 08 January 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 10 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 11 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 12 January 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 13 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 14 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 16 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 17 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 18 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 19 January 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 20 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 21 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 22 January 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 23 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 24 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 25 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 26 January 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 27 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 28 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 29 January 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 30 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 31 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 01 February 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 02 February 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 03 February 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 04 February 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 05 February 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 06 February 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 07 February 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 08 February 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 09 February 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 10 February 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 11 February 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 12 February 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 13 February 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 14 February 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 15 February 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 16 February 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 17 February 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 18 February 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 19 February 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + When Admin sets the business date to "22 March 2025" + And Admin runs inline COB job for Loan + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 20 December 2024 | Disbursement | 430.0 | 0.0 | 0.0 | 0.0 | 0.0 | 430.0 | false | false | + | 29 December 2024 | Accrual | 2.7 | 0.0 | 2.7 | 0.0 | 0.0 | 0.0 | false | false | + | 30 December 2024 | Repayment | 200.0 | 196.99 | 3.01 | 0.0 | 0.0 | 233.01 | false | false | + | 30 December 2024 | Accrual | 0.31 | 0.0 | 0.31 | 0.0 | 0.0 | 0.0 | false | false | + | 31 December 2024 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 01 January 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 02 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 04 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 05 January 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 06 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 07 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 08 January 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 09 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 10 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 11 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 12 January 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 13 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 14 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 16 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 17 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 18 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 19 January 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 20 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 21 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 22 January 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 23 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 24 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 25 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 26 January 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 27 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 28 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 29 January 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 30 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 31 January 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 01 February 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 02 February 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 03 February 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 04 February 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 05 February 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 06 February 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 07 February 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 08 February 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 09 February 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 10 February 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 11 February 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 12 February 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 13 February 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 14 February 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 15 February 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 16 February 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 17 February 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 18 February 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 19 February 2025 | Accrual | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | + | 20 February 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + | 21 February 2025 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | false | false | + | 22 February 2025 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | false | false | + | 23 February 2025 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | false | false | + | 24 February 2025 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | false | false | + | 25 February 2025 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | false | false | + | 26 February 2025 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | false | false | + | 27 February 2025 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | false | false | + | 28 February 2025 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | false | false | + | 01 March 2025 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | false | false | + | 02 March 2025 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | false | false | + | 03 March 2025 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | false | false | + | 04 March 2025 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | false | false | + | 05 March 2025 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | false | false | + | 06 March 2025 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | false | false | + | 07 March 2025 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | false | false | + | 08 March 2025 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | false | false | + | 09 March 2025 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | false | false | + | 10 March 2025 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | false | false | + | 11 March 2025 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | false | false | + | 12 March 2025 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | false | false | + | 13 March 2025 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | false | false | + | 14 March 2025 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2025 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | false | false | + | 16 March 2025 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | false | false | + | 17 March 2025 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | false | false | + | 18 March 2025 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | false | false | + | 19 March 2025 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | false | false | + | 20 March 2025 | Accrual | 0.18 | 0.0 | 0.18 | 0.0 | 0.0 | 0.0 | false | false | + | 21 March 2025 | Accrual | 0.16 | 0.0 | 0.16 | 0.0 | 0.0 | 0.0 | false | false | + + + @TestRailId:C3400 + Scenario: Verify Interest Payment Waiver isn't reversed and replayed after one accrual is created + When Admin sets the business date to "12 January 2025" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_ACCRUAL_ACTIVITY_POSTING | 12 January 2025 | 430 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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 | + | | | 12 January 2025 | | 430.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 12 February 2025 | | 323.44 | 106.56 | 2.51 | 0.0 | 0.0 | 109.07 | 0.0 | 0.0 | 0.0 | 109.07 | + | 2 | 28 | 12 March 2025 | | 216.26 | 107.18 | 1.89 | 0.0 | 0.0 | 109.07 | 0.0 | 0.0 | 0.0 | 109.07 | + | 3 | 31 | 12 April 2025 | | 108.45 | 107.81 | 1.26 | 0.0 | 0.0 | 109.07 | 0.0 | 0.0 | 0.0 | 109.07 | + | 4 | 30 | 12 May 2025 | | 0.0 | 108.45 | 0.63 | 0.0 | 0.0 | 109.08 | 0.0 | 0.0 | 0.0 | 109.08 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 430 | 6.29 | 0 | 0 | 436.29 | 0 | 0 | 0 | 436.29 | + And Admin successfully approves the loan on "12 January 2025" with "430" amount and expected disbursement date on "12 January 2025" + And Admin successfully disburse the loan on "12 January 2025" with "430" EUR transaction amount + When Admin sets the business date to "14 January 2025" + When Admin runs inline COB job for Loan + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 12 January 2025 | | 430.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 12 February 2025 | | 323.44 | 106.56 | 2.51 | 0.0 | 0.0 | 109.07 | 0.0 | 0.0 | 0.0 | 109.07 | + | 2 | 28 | 12 March 2025 | | 216.26 | 107.18 | 1.89 | 0.0 | 0.0 | 109.07 | 0.0 | 0.0 | 0.0 | 109.07 | + | 3 | 31 | 12 April 2025 | | 108.45 | 107.81 | 1.26 | 0.0 | 0.0 | 109.07 | 0.0 | 0.0 | 0.0 | 109.07 | + | 4 | 30 | 12 May 2025 | | 0.0 | 108.45 | 0.63 | 0.0 | 0.0 | 109.08 | 0.0 | 0.0 | 0.0 | 109.08 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 430 | 6.29 | 0 | 0 | 436.29 | 0.0 | 0.0 | 0 | 436.29 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 12 January 2025 | Disbursement | 430.0 | 0.0 | 0.0 | 0.0 | 0.0 | 430.0 | false | false | + | 13 January 2025 | Accrual | 0.08 | 0.0 | 0.08 | 0.0 | 0.0 | 0.0 | false | false | + When Admin makes "INTEREST_PAYMENT_WAIVER" transaction with "AUTOPAY" payment type on "14 January 2025" with 10 EUR transaction amount + Then In Loan Transactions all transactions have non-null external-id + 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 | + | | | 12 January 2025 | | 430.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 12 February 2025 | | 323.38 | 106.62 | 2.45 | 0.0 | 0.0 | 109.07 | 10.0 | 10.0 | 0.0 | 99.07 | + | 2 | 28 | 12 March 2025 | | 216.2 | 107.18 | 1.89 | 0.0 | 0.0 | 109.07 | 0.0 | 0.0 | 0.0 | 109.07 | + | 3 | 31 | 12 April 2025 | | 108.39 | 107.81 | 1.26 | 0.0 | 0.0 | 109.07 | 0.0 | 0.0 | 0.0 | 109.07 | + | 4 | 30 | 12 May 2025 | | 0.0 | 108.39 | 0.63 | 0.0 | 0.0 | 109.02 | 0.0 | 0.0 | 0.0 | 109.02 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 430 | 6.23 | 0 | 0 | 436.23 | 10.0 | 10.0 | 0 | 426.23 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 12 January 2025 | Disbursement | 430.0 | 0.0 | 0.0 | 0.0 | 0.0 | 430.0 | false | false | + | 13 January 2025 | Accrual | 0.08 | 0.0 | 0.08 | 0.0 | 0.0 | 0.0 | false | false | + | 14 January 2025 | Interest Payment Waiver | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 420.0 | false | false | + @TestRailId:C3401 Scenario: Verify that accrual activity is not reverse replayed when undo happens on due date repayment When Admin sets the business date to "08 August 2024" @@ -2653,4 +4548,4 @@ Feature: LoanAccrualActivity | 08 December 2024 | Accrual Activity | 2.99 | 0.0 | 2.99 | 0.0 | 0.0 | 0.0 | false | false | | 07 January 2025 | Accrual | 16.78 | 0.0 | 16.78 | 0.0 | 0.0 | 0.0 | false | false | | 08 January 2025 | Repayment | 500.0 | 400.0 | 26.45 | 0.0 | 0.0 | 0.0 | true | false | - | 08 January 2025 | Accrual | 9.67 | 0.0 | 9.67 | 0.0 | 0.0 | 0.0 | false | false | \ No newline at end of file + | 08 January 2025 | Accrual | 9.67 | 0.0 | 9.67 | 0.0 | 0.0 | 0.0 | false | false | diff --git a/fineract-e2e-tests-runner/src/test/resources/features/LoanAccrualTransaction.feature b/fineract-e2e-tests-runner/src/test/resources/features/LoanAccrualTransaction.feature index 537142ad04f..ebf128ddd65 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/LoanAccrualTransaction.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/LoanAccrualTransaction.feature @@ -122,7 +122,7 @@ Feature: LoanAccrualTransaction When Admin sets the business date to "01 January 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 | | LP1_INTEREST_DECLINING_BALANCE_DAILY_RECALCULATION_COMPOUNDING_NONE | 01 January 2023 | 5000 | 12 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | PENALTIES_FEES_INTEREST_PRINCIPAL_ORDER | And Admin successfully approves the loan on "01 January 2023" with "5000" amount and expected disbursement date on "01 January 2023" When Admin successfully disburse the loan on "01 January 2023" with "5000" EUR transaction amount @@ -138,7 +138,7 @@ Feature: LoanAccrualTransaction When Admin sets the business date to "01 January 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 | | LP1_INTEREST_DECLINING_BALANCE_DAILY_RECALCULATION_COMPOUNDING_NONE | 01 January 2023 | 1000 | 12 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 1 | MONTHS | 1 | MONTHS | 1 | 0 | 0 | 0 | PENALTIES_FEES_INTEREST_PRINCIPAL_ORDER | And Admin successfully approves the loan on "01 January 2023" with "1000" amount and expected disbursement date on "01 January 2023" When Admin successfully disburse the loan on "01 January 2023" with "1000" EUR transaction amount @@ -322,7 +322,7 @@ Feature: LoanAccrualTransaction And Admin runs COB job And Admin successfully disburse the loan on "28 April 2023" with "20" EUR transaction amount When Admin sets the business date to "29 April 2023" - And Admin runs inline COB job for Loan + And Admin runs inline COB job for Loan Then Loan Repayment schedule has 1 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 | | | | 26 April 2023 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -448,7 +448,7 @@ Feature: LoanAccrualTransaction 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 | - | LP1 | 1 February 2023 | 3000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | PENALTIES_FEES_INTEREST_PRINCIPAL_ORDER | + | LP1 | 1 February 2023 | 3000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | PENALTIES_FEES_INTEREST_PRINCIPAL_ORDER | And Admin successfully approves the loan on "01 February 2023" with "3000" amount and expected disbursement date on "1 February 2023" When Admin successfully disburse the loan on "01 February 2023" with "3000" EUR transaction amount When Admin adds "LOAN_SNOOZE_FEE" due date charge with "06 February 2023" due date and 10 EUR transaction amount @@ -481,7 +481,7 @@ Feature: LoanAccrualTransaction 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 | - | LP1 | 1 February 2023 | 3000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | PENALTIES_FEES_INTEREST_PRINCIPAL_ORDER | + | LP1 | 1 February 2023 | 3000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | PENALTIES_FEES_INTEREST_PRINCIPAL_ORDER | And Admin successfully approves the loan on "01 February 2023" with "3000" amount and expected disbursement date on "1 February 2023" When Admin successfully disburse the loan on "01 February 2023" with "3000" EUR transaction amount When Admin adds "LOAN_SNOOZE_FEE" due date charge with "06 February 2023" due date and 10 EUR transaction amount @@ -517,7 +517,7 @@ Feature: LoanAccrualTransaction 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 | - | LP1 | 1 February 2023 | 3000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | PENALTIES_FEES_INTEREST_PRINCIPAL_ORDER | + | LP1 | 1 February 2023 | 3000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | PENALTIES_FEES_INTEREST_PRINCIPAL_ORDER | And Admin successfully approves the loan on "01 February 2023" with "3000" amount and expected disbursement date on "1 February 2023" When Admin successfully disburse the loan on "01 February 2023" with "3000" EUR transaction amount When Admin adds "LOAN_SNOOZE_FEE" due date charge with "06 February 2023" due date and 10 EUR transaction amount @@ -551,7 +551,7 @@ Feature: LoanAccrualTransaction 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 | - | LP1 | 1 February 2023 | 3000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | PENALTIES_FEES_INTEREST_PRINCIPAL_ORDER | + | LP1 | 1 February 2023 | 3000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | PENALTIES_FEES_INTEREST_PRINCIPAL_ORDER | And Admin successfully approves the loan on "01 February 2023" with "3000" amount and expected disbursement date on "1 February 2023" When Admin successfully disburse the loan on "01 February 2023" with "3000" EUR transaction amount When Admin adds "LOAN_SNOOZE_FEE" due date charge with "06 February 2023" due date and 10 EUR transaction amount @@ -693,7 +693,7 @@ Feature: LoanAccrualTransaction 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 | - | LP1 | 1 February 2023 | 3000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | PENALTIES_FEES_INTEREST_PRINCIPAL_ORDER | + | LP1 | 1 February 2023 | 3000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | PENALTIES_FEES_INTEREST_PRINCIPAL_ORDER | And Admin successfully approves the loan on "01 February 2023" with "3000" amount and expected disbursement date on "1 February 2023" When Admin successfully disburse the loan on "01 February 2023" with "2000" EUR transaction amount When Admin adds "LOAN_SNOOZE_FEE" due date charge with "06 March 2023" due date and 10 EUR transaction amount @@ -729,7 +729,7 @@ Feature: LoanAccrualTransaction 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 | - | LP1 | 1 February 2023 | 3000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | PENALTIES_FEES_INTEREST_PRINCIPAL_ORDER | + | LP1 | 1 February 2023 | 3000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | PENALTIES_FEES_INTEREST_PRINCIPAL_ORDER | And Admin successfully approves the loan on "01 February 2023" with "3000" amount and expected disbursement date on "1 February 2023" When Admin successfully disburse the loan on "01 February 2023" with "3000" EUR transaction amount When Admin adds "LOAN_SNOOZE_FEE" due date charge with "06 March 2023" due date and 10 EUR transaction amount @@ -770,7 +770,7 @@ Feature: LoanAccrualTransaction 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 | - | LP1 | 1 February 2023 | 3000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | PENALTIES_FEES_INTEREST_PRINCIPAL_ORDER | + | LP1 | 1 February 2023 | 3000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | PENALTIES_FEES_INTEREST_PRINCIPAL_ORDER | And Admin successfully approves the loan on "01 February 2023" with "3000" amount and expected disbursement date on "1 February 2023" When Admin successfully disburse the loan on "01 February 2023" with "3000" EUR transaction amount When Admin adds "LOAN_SNOOZE_FEE" due date charge with "06 March 2023" due date and 10 EUR transaction amount @@ -812,7 +812,7 @@ Feature: LoanAccrualTransaction 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 | - | LP1 | 19 May 2023 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 30 | DAYS | 30 | DAYS | 1 | 0 | 0 | 0 | PENALTIES_FEES_INTEREST_PRINCIPAL_ORDER | + | LP1 | 19 May 2023 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 30 | DAYS | 30 | DAYS | 1 | 0 | 0 | 0 | PENALTIES_FEES_INTEREST_PRINCIPAL_ORDER | And Admin successfully approves the loan on "19 May 2023" with "1000" amount and expected disbursement date on "19 May 2023" When Admin successfully disburse the loan on "19 May 2023" with "1000" EUR transaction amount When Admin sets the business date to "12 June 2023" @@ -843,12 +843,12 @@ Feature: LoanAccrualTransaction | 1000 | 0 | 10 | 10 | 1020 | 0 | 0 | 0 | 1020 | When Global config "charge-accrual-date" value set to "due-date" - @TestRailId:C3128 + @Skip @TestRailId:C3128 Scenario: Verify that the final accrual calculation is correct when multiple Charges are added and waived When Admin sets the business date to "17 April 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 | + | 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 | 17 April 2024 | 750 | 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 "17 April 2024" with "750" amount and expected disbursement date on "17 April 2024" When Admin successfully disburse the loan on "17 April 2024" with "750" EUR transaction amount @@ -894,7 +894,7 @@ Feature: LoanAccrualTransaction When Admin sets the business date to "01 April 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 | + | 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_DECLINING_BALANCE_SAR_RECALCULATION_SAME_AS_REPAYMENT_COMPOUNDING_NONE_MULTIDISB | 01 April 2024 | 1000 | 12 | DECLINING_BALANCE | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 45 | DAYS | 15 | DAYS | 3 | 0 | 0 | 0 | PENALTIES_FEES_INTEREST_PRINCIPAL_ORDER | And Admin successfully approves the loan on "01 April 2024" with "1000" amount and expected disbursement date on "05 April 2024" When Admin sets the business date to "05 April 2024" @@ -946,3 +946,51 @@ Feature: LoanAccrualTransaction | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 1000.0 | 8.06 | 0.0 | 0.0 | 1008.06 | 0.0 | 0.0 | 0.0 | 1008.06 | When Global config "charge-accrual-date" value set to "due-date" + + @TestRailId:C3416 + Scenario: Verify the accrual activity creation in case of full repayment on maturity date + When Admin sets the business date to "09 August 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_AUTO_DOWNPAYMENT_EMI_ACTUAL_ACTUAL_ACCRUAL_ACTIVITY | 09 August 2024 | 200 | 9.9 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "09 August 2024" with "200" amount and expected disbursement date on "09 August 2024" + And Admin successfully disburse the loan on "09 August 2024" with "200" 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 | + | | | 09 August 2024 | | 200.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 09 August 2024 | 09 August 2024 | 150.0 | 50.0 | 0.0 | 0.0 | 0.0 | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | + | 2 | 31 | 09 September 2024 | | 112.98 | 37.02 | 1.26 | 0.0 | 0.0 | 38.28 | 0.0 | 0.0 | 0.0 | 38.28 | + | 3 | 30 | 09 October 2024 | | 75.62 | 37.36 | 0.92 | 0.0 | 0.0 | 38.28 | 0.0 | 0.0 | 0.0 | 38.28 | + | 4 | 31 | 09 November 2024 | | 37.97 | 37.65 | 0.63 | 0.0 | 0.0 | 38.28 | 0.0 | 0.0 | 0.0 | 38.28 | + | 5 | 30 | 09 December 2024 | | 0.0 | 37.97 | 0.31 | 0.0 | 0.0 | 38.28 | 0.0 | 0.0 | 0.0 | 38.28 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 200.0 | 3.12 | 0.0 | 0.0 | 203.12 | 50.0 | 0.0 | 0.0 | 153.12 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 09 August 2024 | Disbursement | 200.0 | 0.0 | 0.0 | 0.0 | 0.0 | 200.0 | false | false | + | 09 August 2024 | Down Payment | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 150.0 | false | false | + When Admin sets the business date to "09 December 2024" + And Customer makes "AUTOPAY" repayment on "09 December 2024" with 153.12 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 | + | | | 09 August 2024 | | 200.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 09 August 2024 | 09 August 2024 | 150.0 | 50.0 | 0.0 | 0.0 | 0.0 | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | + | 2 | 31 | 09 September 2024 | 09 December 2024 | 112.98 | 37.02 | 1.26 | 0.0 | 0.0 | 38.28 | 38.28 | 0.0 | 38.28 | 0.0 | + | 3 | 30 | 09 October 2024 | 09 December 2024 | 75.62 | 37.36 | 0.92 | 0.0 | 0.0 | 38.28 | 38.28 | 0.0 | 38.28 | 0.0 | + | 4 | 31 | 09 November 2024 | 09 December 2024 | 37.97 | 37.65 | 0.63 | 0.0 | 0.0 | 38.28 | 38.28 | 0.0 | 38.28 | 0.0 | + | 5 | 30 | 09 December 2024 | 09 December 2024 | 0.0 | 37.97 | 0.31 | 0.0 | 0.0 | 38.28 | 38.28 | 0.0 | 0.0 | 0.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 200.0 | 3.12 | 0.0 | 0.0 | 203.12 | 203.12 | 0.0 | 114.84 | 0.0 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 09 August 2024 | Disbursement | 200.0 | 0.0 | 0.0 | 0.0 | 0.0 | 200.0 | false | false | + | 09 August 2024 | Down Payment | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 150.0 | false | false | + | 09 September 2024 | Accrual Activity | 1.26 | 0.0 | 1.26 | 0.0 | 0.0 | 0.0 | false | false | + | 09 October 2024 | Accrual Activity | 0.92 | 0.0 | 0.92 | 0.0 | 0.0 | 0.0 | false | false | + | 09 November 2024 | Accrual Activity | 0.63 | 0.0 | 0.63 | 0.0 | 0.0 | 0.0 | false | false | + | 09 December 2024 | Repayment | 153.12 | 150.0 | 3.12 | 0.0 | 0.0 | 0.0 | false | false | + | 09 December 2024 | Accrual | 3.12 | 0.0 | 3.12 | 0.0 | 0.0 | 0.0 | false | false | + | 09 December 2024 | Accrual Activity | 0.31 | 0.0 | 0.31 | 0.0 | 0.0 | 0.0 | false | false | diff --git a/fineract-e2e-tests-runner/src/test/resources/features/LoanCharge.feature b/fineract-e2e-tests-runner/src/test/resources/features/LoanCharge.feature index 496753d5bab..ffb16601174 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/LoanCharge.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/LoanCharge.feature @@ -2285,3 +2285,282 @@ Feature: LoanCharge | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | | 27 September 2024 | Disbursement | 40.0 | 0.0 | 0.0 | 0.0 | 0.0 | 40.0 | | 27 September 2024 | Charge Adjustment | 1.0 | 1.0 | 0.0 | 0.0 | 0.0 | 39.0 | + + @TestRailId:C3319 + Scenario: Verify enhance the existing implementation to create accruals as part of Charge Creation post maturity with immediate charge accrual and non-zero interest rate + Given Global configuration "enable-immediate-charge-accrual-post-maturity" is enabled + 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 1000 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 1 | MONTHS | 1 | MONTHS | 1 | 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 + Then Loan Repayment schedule has 1 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 | | 0.0 | 1000.0 | 5.83 | 0.0 | 0.0 | 1005.83 | 0.0 | 0.0 | 0.0 | 1005.83 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 5.83 | 0.0 | 0.0 | 1005.83 | 0.0 | 0.0 | 0.0 | 1005.83 | + 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 | + When Admin sets the business date to "05 February 2024" + When Admin adds "LOAN_NSF_FEE" due date charge with "05 February 2024" due date and 25 EUR transaction amount + Then Loan Charges tab has the following data: + | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | + | NSF fee | true | Specified due date | 05 February 2024 | Flat | 25.0 | 0.0 | 0.0 | 25.0 | + Then Loan Repayment schedule has 2 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 | | 0.0 | 1000.0 | 5.83 | 0.0 | 0.0 | 1005.83 | 0.0 | 0.0 | 0.0 | 1005.83 | + | 2 | 4 | 05 February 2024 | | 0.0 | 0.0 | 0.0 | 0.0 | 25.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 | + | 1000.0 | 5.83 | 0.0 | 25.0 | 1030.83 | 0.0 | 0.0 | 0.0 | 1030.83 | + 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 | + Given Global configuration "enable-immediate-charge-accrual-post-maturity" is disabled + Then LoanAccrualTransactionCreatedBusinessEvent is not raised on "05 February 2024" + + @TestRailId:C3320 + Scenario: Verify enhance the existing implementation to create accruals as part of Charge Creation post maturity with immediate charge accrual and zero interest rate + Given Global configuration "enable-immediate-charge-accrual-post-maturity" is enabled + 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 1000 | 0 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 1 | MONTHS | 1 | MONTHS | 1 | 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 + Then Loan Repayment schedule has 1 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 | | 0.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + When Admin sets the business date to "05 February 2024" + When Admin adds "LOAN_NSF_FEE" due date charge with "05 February 2024" due date and 25 EUR transaction amount + Then Loan Charges tab has the following data: + | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | + | NSF fee | true | Specified due date | 05 February 2024 | Flat | 25.0 | 0.0 | 0.0 | 25.0 | + Then Loan Repayment schedule has 2 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 | | 0.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + | 2 | 4 | 05 February 2024 | | 0.0 | 0.0 | 0.0 | 0.0 | 25.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 | + | 1000.0 | 0.0 | 0.0 | 25.0 | 1025.0 | 0.0 | 0.0 | 0.0 | 1025.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 | + Given Global configuration "enable-immediate-charge-accrual-post-maturity" is disabled + Then LoanAccrualTransactionCreatedBusinessEvent is not raised on "05 February 2024" + + @TestRailId:С3335 + Scenario: Verify enhance the existing implementation to create accruals as part of Charge Creation post maturity with inline COB run and non-zero interest rate + Given Global configuration "enable-immediate-charge-accrual-post-maturity" is disabled + 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 1000 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 1 | MONTHS | 1 | MONTHS | 1 | 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 + Then Loan Repayment schedule has 1 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 | | 0.0 | 1000.0 | 5.83 | 0.0 | 0.0 | 1005.83 | 0.0 | 0.0 | 0.0 | 1005.83 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 5.83 | 0.0 | 0.0 | 1005.83 | 0.0 | 0.0 | 0.0 | 1005.83 | + 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 | + When Admin sets the business date to "05 February 2024" + When Admin adds "LOAN_NSF_FEE" due date charge with "05 February 2024" due date and 25 EUR transaction amount + When Admin sets the business date to "06 February 2024" + And Admin runs inline COB job for Loan + Then Loan Charges tab has the following data: + | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | + | NSF fee | true | Specified due date | 05 February 2024 | Flat | 25.0 | 0.0 | 0.0 | 25.0 | + Then Loan Repayment schedule has 2 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 | | 0.0 | 1000.0 | 5.83 | 0.0 | 0.0 | 1005.83 | 0.0 | 0.0 | 0.0 | 1005.83 | + | 2 | 4 | 05 February 2024 | | 0.0 | 0.0 | 0.0 | 0.0 | 25.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 | + | 1000.0 | 5.83 | 0.0 | 25.0 | 1030.83 | 0.0 | 0.0 | 0.0 | 1030.83 | + 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 | + | 05 February 2024 | Accrual | 30.83 | 0.0 | 5.83 | 0.0 | 25.0 | 0.0 | + Then LoanAccrualTransactionCreatedBusinessEvent is raised on "05 February 2024" + + @TestRailId:C3321 + Scenario: Verify enhance the existing implementation to create accruals as part of Charge Creation post maturity with inline COB run and zero interest rate + Given Global configuration "enable-immediate-charge-accrual-post-maturity" is disabled + 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 1000 | 0 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 1 | MONTHS | 1 | MONTHS | 1 | 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 + Then Loan Repayment schedule has 1 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 | | 0.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + When Admin sets the business date to "05 February 2024" + When Admin adds "LOAN_NSF_FEE" due date charge with "05 February 2024" due date and 25 EUR transaction amount + When Admin sets the business date to "06 February 2024" + And Admin runs inline COB job for Loan + Then Loan Charges tab has the following data: + | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | + | NSF fee | true | Specified due date | 05 February 2024 | Flat | 25.0 | 0.0 | 0.0 | 25.0 | + Then Loan Repayment schedule has 2 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 | | 0.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + | 2 | 4 | 05 February 2024 | | 0.0 | 0.0 | 0.0 | 0.0 | 25.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 | + | 1000.0 | 0.0 | 0.0 | 25.0 | 1025.0 | 0.0 | 0.0 | 0.0 | 1025.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 | + | 05 February 2024 | Accrual | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | + Then LoanAccrualTransactionCreatedBusinessEvent is raised on "05 February 2024" + + @TestRailId:C3336 + Scenario: Verify enhance the existing implementation to create accruals as part of Charge Creation post maturity with immediate charge accrual with inline COB run and non-zero interest rate + Given Global configuration "enable-immediate-charge-accrual-post-maturity" is enabled + 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 1000 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 1 | MONTHS | 1 | MONTHS | 1 | 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 + Then Loan Repayment schedule has 1 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 | | 0.0 | 1000.0 | 5.83 | 0.0 | 0.0 | 1005.83 | 0.0 | 0.0 | 0.0 | 1005.83 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 5.83 | 0.0 | 0.0 | 1005.83 | 0.0 | 0.0 | 0.0 | 1005.83 | + 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 | + When Admin sets the business date to "05 February 2024" + When Admin adds "LOAN_NSF_FEE" due date charge with "05 February 2024" due date and 25 EUR transaction amount + When Admin sets the business date to "06 February 2024" + And Admin runs inline COB job for Loan + Then Loan Charges tab has the following data: + | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | + | NSF fee | true | Specified due date | 05 February 2024 | Flat | 25.0 | 0.0 | 0.0 | 25.0 | + Then Loan Repayment schedule has 2 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 | | 0.0 | 1000.0 | 5.83 | 0.0 | 0.0 | 1005.83 | 0.0 | 0.0 | 0.0 | 1005.83 | + | 2 | 4 | 05 February 2024 | | 0.0 | 0.0 | 0.0 | 0.0 | 25.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 | + | 1000.0 | 5.83 | 0.0 | 25.0 | 1030.83 | 0.0 | 0.0 | 0.0 | 1030.83 | + 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 | + | 05 February 2024 | Accrual | 30.83 | 0.0 | 5.83 | 0.0 | 25.0 | 0.0 | + Given Global configuration "enable-immediate-charge-accrual-post-maturity" is disabled + Then LoanAccrualTransactionCreatedBusinessEvent is raised on "05 February 2024" + + @TestRailId:C3425 + Scenario: Verify that charge paid is populated for interest bearing products after charge adjustment is being posted + 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7.0 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + When Admin successfully disburse the loan on "1 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 | 31 | 01 February 2024 | | 75.21 | 24.79 | 0.58 | 0.0 | 0.0 | 25.37 | 0.0 | 0.0 | 0.0 | 25.37 | + | 2 | 29 | 01 March 2024 | | 50.28 | 24.93 | 0.44 | 0.0 | 0.0 | 25.37 | 0.0 | 0.0 | 0.0 | 25.37 | + | 3 | 31 | 01 April 2024 | | 25.2 | 25.08 | 0.29 | 0.0 | 0.0 | 25.37 | 0.0 | 0.0 | 0.0 | 25.37 | + | 4 | 30 | 01 May 2024 | | 0.0 | 25.2 | 0.15 | 0.0 | 0.0 | 25.35 | 0.0 | 0.0 | 0.0 | 25.35 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 1.46 | 0.0 | 0.0 | 101.46 | 0.0 | 0.0 | 0.0 |101.46 | + 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" + When Admin adds "LOAN_NSF_FEE" due date charge with "01 February 2024" due date and 20 EUR transaction amount + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 75.21 | 24.79 | 0.58 | 0.0 | 20.0 | 45.37 | 0.0 | 0.0 | 0.0 | 45.37 | + | 2 | 29 | 01 March 2024 | | 50.28 | 24.93 | 0.44 | 0.0 | 0.0 | 25.37 | 0.0 | 0.0 | 0.0 | 25.37 | + | 3 | 31 | 01 April 2024 | | 25.2 | 25.08 | 0.29 | 0.0 | 0.0 | 25.37 | 0.0 | 0.0 | 0.0 | 25.37 | + | 4 | 30 | 01 May 2024 | | 0.0 | 25.2 | 0.15 | 0.0 | 0.0 | 25.35 | 0.0 | 0.0 | 0.0 | 25.35 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 1.46 | 0.0 | 20.0 | 121.46 | 0.0 | 0.0 | 0.0 | 121.46 | + 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 | + Then Loan Charges tab has a given charge with the following data: + | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | + | NSF fee | true | Specified due date | 01 February 2024 | Flat | 20.0 | 0.0 | 0.0 | 20.0 | + # --- Backdated repayment with 60 EUR --- + And Customer makes "AUTOPAY" repayment on "01 January 2024" with 60 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 | 31 | 01 February 2024 | | 74.63 | 25.37 | 0.0 | 0.0 | 20.0 | 45.37 | 25.37 | 25.37 | 0.0 | 20.0 | + | 2 | 29 | 01 March 2024 | 01 January 2024 | 49.26 | 25.37 | 0.0 | 0.0 | 0.0 | 25.37 | 25.37 | 25.37 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | | 24.58 | 24.68 | 0.69 | 0.0 | 0.0 | 25.37 | 9.26 | 9.26 | 0.0 | 16.11 | + | 4 | 30 | 01 May 2024 | | 0.0 | 24.58 | 0.14 | 0.0 | 0.0 | 24.72 | 0.0 | 0.0 | 0.0 | 24.72 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 0.83 | 0.0 | 20.0 | 120.83 | 60.0 | 60.0 | 0.0 | 60.83 | + 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 January 2024 | Repayment | 60.0 | 60.0 | 0.0 | 0.0 | 0.0 | 40.0 | + Then Loan Charges tab has a given charge with the following data: + | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | + | NSF fee | true | Specified due date | 01 February 2024 | Flat | 20.0 | 0.0 | 0.0 | 20.0 | + When Admin makes a charge adjustment for the last "LOAN_NSF_FEE" type charge which is due on "01 February 2024" with 20 EUR transaction amount and externalId "" + 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 | 31 | 01 February 2024 | 01 February 2024 | 74.63 | 25.37 | 0.0 | 0.0 | 20.0 | 45.37 | 45.37 | 25.37 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 January 2024 | 49.26 | 25.37 | 0.0 | 0.0 | 0.0 | 25.37 | 25.37 | 25.37 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | | 24.58 | 24.68 | 0.69 | 0.0 | 0.0 | 25.37 | 9.26 | 9.26 | 0.0 | 16.11 | + | 4 | 30 | 01 May 2024 | | 0.0 | 24.58 | 0.14 | 0.0 | 0.0 | 24.72 | 0.0 | 0.0 | 0.0 | 24.72 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 0.83 | 0.0 | 20.0 | 120.83 | 80.0 | 60.0 | 0.0 | 40.83 | + 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 January 2024 | Repayment | 60.0 | 60.0 | 0.0 | 0.0 | 0.0 | 40.0 | + | 01 February 2024 | Charge Adjustment | 20.0 | 0.0 | 0.0 | 0.0 | 20.0 | 40.0 | + And LoanChargeAdjustmentPostBusinessEvent is raised on "01 February 2024" 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 e9cc3cb4ea7..9e0a9296cb9 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/LoanChargeOff.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/LoanChargeOff.feature @@ -1578,6 +1578,207 @@ Feature: Charge-off | ASSET | 112601 | Loans Receivable | 650.0 | | | EXPENSE | 744037 | Credit Loss/Bad Debt-Fraud | | 650.0 | + @TestRailId:C3315 @AdvancedPaymentAllocation + Scenario: Verify charge-off handling and accounting validation with interesting bearing products - from the time of charge off no more disbursement is allowed + 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_MULTIDISBURSE | 01 January 2024 | 1500 | 26 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "1500" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 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 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 757.98 | 242.02 | 21.67 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 2 | 29 | 01 March 2024 | | 510.71 | 247.27 | 16.42 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 3 | 31 | 01 April 2024 | | 258.09 | 252.62 | 11.07 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 4 | 30 | 01 May 2024 | | 0.0 | 258.09 | 5.59 | 0.0 | 0.0 | 263.68 | 0.0 | 0.0 | 0.0 | 263.68 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 54.75 | 0.0 | 0.0 | 1054.75 | 0.0 | 0.0 | 0.0 | 1054.75 | + 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 | + When Admin sets the business date to "02 February 2024" + And Admin adds an NSF fee because of payment bounce with "02 February 2024" transaction date + And Admin adds a 10 % Processing charge to the loan with "en" locale on date: "02 February 2024" + When Admin sets the business date to "05 February 2024" + When Admin adds "LOAN_NSF_FEE" due date charge with "10 February 2024" due date and 50 EUR transaction amount + When Admin sets the business date to "28 February 2024" + And Admin does charge-off the loan on "28 February 2024" + Then Loan marked as charged-off on "28 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 | | 757.98 | 242.02 | 21.67 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 2 | 29 | 01 March 2024 | | 510.71 | 247.27 | 16.42 | 105.48 | 60.0 | 429.17 | 0.0 | 0.0 | 0.0 | 429.17 | + | 3 | 31 | 01 April 2024 | | 258.09 | 252.62 | 11.07 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | + | 4 | 30 | 01 May 2024 | | 0.0 | 258.09 | 5.59 | 0.0 | 0.0 | 263.68 | 0.0 | 0.0 | 0.0 | 263.68 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 54.75 | 105.48 | 60.0 | 1220.23 | 0.0 | 0.0 | 0.0 | 1220.23 | + 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 | + | 28 February 2024 | Charge-off | 1220.23 | 1000.0 | 54.75 | 105.48 | 60.0 | 0.0 | false | false | + Then Admin fails to disburse the loan on "28 February 2024" with "500" EUR transaction amount because of charge-off that was performed for the loan + When Customer makes "REPAYMENT" transaction with "AUTOPAY" payment type on "28 February 2024" with 500 EUR transaction amount and system-generated Idempotency key + Then Loan status will be "ACTIVE" + Then Loan has 720.23 outstanding amount + Then Loan Transactions tab has a "CHARGE_OFF" transaction with date "28 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 | | 220.23 | + | EXPENSE | 744007 | Credit Loss/Bad Debt | 1000.0 | | + | INCOME | 404001 | Interest Income Charge Off | 54.75 | | + | INCOME | 404008 | Fee Charge Off | 165.48 | | + Then Loan Transactions tab has a "REPAYMENT" transaction with date "28 February 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | INCOME | 744008 | Recoveries | | 500.0 | + | LIABILITY | 145023 | Suspense/Clearing account | 500.0 | | + + @TestRailId:C3337 @AdvancedPaymentAllocation + Scenario: Verify charged off loans to be excluded from scheduled jobs - no interest is added for charged-off loans with 0 interest + When Admin sets the business date to "01 June 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_ADV_CUSTOM_PAYMENT_ALLOC_INTEREST_RECALCULATION_DAILY_EMI_360_30_MULTIDISBURSE | 01 June 2024 | 1000 | 10 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 June 2024" with "1000" amount and expected disbursement date on "01 June 2024" + When Admin successfully disburse the loan on "01 June 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 June 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 188.27 | 61.73 | 2.08 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 2 | 31 | 01 August 2024 | | 126.03 | 62.24 | 1.57 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 3 | 31 | 01 September 2024 | | 63.27 | 62.76 | 1.05 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 4 | 30 | 01 October 2024 | | 0.0 | 63.27 | 0.53 | 0.0 | 0.0 | 63.8 | 0.0 | 0.0 | 0.0 | 63.8 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 250.0 | 5.23 | 0.0 | 0.0 | 255.23 | 0.0 | 0.0 | 0.0 | 255.23 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 June 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | + When Admin sets the business date to "03 June 2024" + And Admin runs inline COB job for Loan + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 188.27 | 61.73 | 2.08 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 2 | 31 | 01 August 2024 | | 126.03 | 62.24 | 1.57 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 3 | 31 | 01 September 2024 | | 63.27 | 62.76 | 1.05 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 4 | 30 | 01 October 2024 | | 0.0 | 63.27 | 0.53 | 0.0 | 0.0 | 63.8 | 0.0 | 0.0 | 0.0 | 63.8 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 250.0 | 5.23 | 0.0 | 0.0 | 255.23 | 0.0 | 0.0 | 0.0 | 255.23 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 June 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | + | 02 June 2024 | Accrual | 0.07 | 0.0 | 0.07 | 0.0 | 0.0 | 0.0 | false | false | + And Admin does charge-off the loan on "03 June 2024" + When Admin sets the business date to "05 June 2024" + And Admin runs the Accrual Activity Posting job + And Admin runs the Add Accrual Transactions job + And Admin runs the Add Accrual Transactions For Loans With Income Posted As Transactions job + And Admin runs the Add Periodic Accrual Transactions job + And Admin runs the Recalculate Interest for Loans job + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 188.27 | 61.73 | 2.08 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 2 | 31 | 01 August 2024 | | 126.03 | 62.24 | 1.57 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 3 | 31 | 01 September 2024 | | 63.27 | 62.76 | 1.05 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 4 | 30 | 01 October 2024 | | 0.0 | 63.27 | 0.53 | 0.0 | 0.0 | 63.8 | 0.0 | 0.0 | 0.0 | 63.8 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 250.0 | 5.23 | 0.0 | 0.0 | 255.23 | 0.0 | 0.0 | 0.0 | 255.23 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 June 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | + | 02 June 2024 | Accrual | 0.07 | 0.0 | 0.07 | 0.0 | 0.0 | 0.0 | false | false | + | 03 June 2024 | Charge-off | 255.23 | 250.0 | 5.23 | 0.0 | 0.0 | 0.0 | false | false | + + @TestRailId:C3338 @AdvancedPaymentAllocation + Scenario: Verify charged off loans to be excluded from scheduled jobs - accrual entries and interest are added when loan has reverted charged-off transaction + When Admin sets the business date to "01 June 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_ADV_CUSTOM_PAYMENT_ALLOC_INTEREST_RECALCULATION_DAILY_EMI_360_30_MULTIDISBURSE | 01 June 2024 | 1000 | 10 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 June 2024" with "1000" amount and expected disbursement date on "01 June 2024" + When Admin successfully disburse the loan on "01 June 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 June 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 188.27 | 61.73 | 2.08 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 2 | 31 | 01 August 2024 | | 126.03 | 62.24 | 1.57 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 3 | 31 | 01 September 2024 | | 63.27 | 62.76 | 1.05 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 4 | 30 | 01 October 2024 | | 0.0 | 63.27 | 0.53 | 0.0 | 0.0 | 63.8 | 0.0 | 0.0 | 0.0 | 63.8 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 250.0 | 5.23 | 0.0 | 0.0 | 255.23 | 0.0 | 0.0 | 0.0 | 255.23 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 June 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | + When Admin sets the business date to "03 June 2024" + And Admin runs inline COB job for Loan + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 188.27 | 61.73 | 2.08 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 2 | 31 | 01 August 2024 | | 126.03 | 62.24 | 1.57 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 3 | 31 | 01 September 2024 | | 63.27 | 62.76 | 1.05 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 4 | 30 | 01 October 2024 | | 0.0 | 63.27 | 0.53 | 0.0 | 0.0 | 63.8 | 0.0 | 0.0 | 0.0 | 63.8 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 250.0 | 5.23 | 0.0 | 0.0 | 255.23 | 0.0 | 0.0 | 0.0 | 255.23 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 June 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | + | 02 June 2024 | Accrual | 0.07 | 0.0 | 0.07 | 0.0 | 0.0 | 0.0 | false | false | + And Admin does charge-off the loan on "03 June 2024" + When Admin sets the business date to "05 June 2024" + And Admin runs inline COB job for Loan + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 188.27 | 61.73 | 2.08 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 2 | 31 | 01 August 2024 | | 126.03 | 62.24 | 1.57 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 3 | 31 | 01 September 2024 | | 63.27 | 62.76 | 1.05 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 4 | 30 | 01 October 2024 | | 0.0 | 63.27 | 0.53 | 0.0 | 0.0 | 63.8 | 0.0 | 0.0 | 0.0 | 63.8 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 250.0 | 5.23 | 0.0 | 0.0 | 255.23 | 0.0 | 0.0 | 0.0 | 255.23 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 June 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | + | 02 June 2024 | Accrual | 0.07 | 0.0 | 0.07 | 0.0 | 0.0 | 0.0 | false | false | + | 03 June 2024 | Charge-off | 255.23 | 250.0 | 5.23 | 0.0 | 0.0 | 0.0 | false | false | + When Admin sets the business date to "06 June 2024" + Then Admin does a charge-off undo the loan + And Admin runs the Accrual Activity Posting job + And Admin runs the Add Accrual Transactions job + And Admin runs the Add Accrual Transactions For Loans With Income Posted As Transactions job + And Admin runs the Add Periodic Accrual Transactions job + And Admin runs the Recalculate Interest for Loans job + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 188.27 | 61.73 | 2.08 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 2 | 31 | 01 August 2024 | | 126.03 | 62.24 | 1.57 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 3 | 31 | 01 September 2024 | | 63.27 | 62.76 | 1.05 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 4 | 30 | 01 October 2024 | | 0.0 | 63.27 | 0.53 | 0.0 | 0.0 | 63.8 | 0.0 | 0.0 | 0.0 | 63.8 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 250.0 | 5.23 | 0.0 | 0.0 | 255.23 | 0.0 | 0.0 | 0.0 | 255.23 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 June 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | + | 02 June 2024 | Accrual | 0.07 | 0.0 | 0.07 | 0.0 | 0.0 | 0.0 | false | false | + | 03 June 2024 | Charge-off | 255.23 | 250.0 | 5.23 | 0.0 | 0.0 | 0.0 | true | false | + | 06 June 2024 | Accrual | 0.28 | 0.0 | 0.28 | 0.0 | 0.0 | 0.0 | false | false | + @TestRailId:C3326 @AdvancedPaymentAllocation Scenario: Verify the repayment schedule is updated before the Charge-off in case of interest recalculation = true When Admin sets the business date to "01 January 2024" @@ -1597,10 +1798,10 @@ Feature: Charge-off Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 1000 | 11.69 | 0 | 0 | 1011.69 | 0 | 0 | 0 | 1011.69 | - When Admin sets the business date to "15 February 2024" + When Admin sets the business date to "08 February 2024" When Admin runs inline COB job for Loan # Move the current date into the middle of the 2nd period, so 1st period is past due - When Admin sets the business date to "15 August 2024" + When Admin sets the business date to "09 February 2024" And Admin does charge-off the loan on "09 February 2024" Then Loan Repayment schedule has 3 periods, with the following data for periods: | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | @@ -1612,408 +1813,423 @@ Feature: Charge-off | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 1000 | 12.22 | 0 | 0 | 1012.22 | 0 | 0 | 0 | 1012.22 | - Scenario: Charge-off on due date when loan behaviour is zero-interest and interestRecalculation = true - When Admin sets the business date to "1 March 2023" - And Admin creates a client with random data - When Admin creates a new zero charge-off Loan with interest recalculation and date: "1 January 2023" - 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | - | 1 | 31 | 01 February 2023 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 28 | 01 March 2023 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2023 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2023 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2023 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2023 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + @TestRailId:C3337 @AdvancedPaymentAllocation + Scenario: Verify charged off loans to be excluded from scheduled jobs - no interest is added for charged-off loans with 0 interest + When Admin sets the business date to "01 June 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_ADV_CUSTOM_PAYMENT_ALLOC_INTEREST_RECALCULATION_DAILY_EMI_360_30_MULTIDISBURSE | 01 June 2024 | 1000 | 10 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 June 2024" with "1000" amount and expected disbursement date on "01 June 2024" + When Admin successfully disburse the loan on "01 June 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 June 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 188.27 | 61.73 | 2.08 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 2 | 31 | 01 August 2024 | | 126.03 | 62.24 | 1.57 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 3 | 31 | 01 September 2024 | | 63.27 | 62.76 | 1.05 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 4 | 30 | 01 October 2024 | | 0.0 | 63.27 | 0.53 | 0.0 | 0.0 | 63.8 | 0.0 | 0.0 | 0.0 | 63.8 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | - And Admin successfully approves the loan on "1 January 2023" with "100" amount and expected disbursement date on "1 January 2023" - And Admin successfully disburse the loan on "1 January 2023" with "100" EUR transaction amount - And Admin does charge-off the loan on "1 March 2023" - 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2023 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 28 | 01 March 2023 | | 67.14 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2023 | | 50.13 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2023 | | 33.12 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2023 | | 16.11 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2023 | | 0.0 | 16.11 | 0.0 | 0.0 | 0.0 | 16.11 | 0.0 | 0.0 | 0.0 | 16.11 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 250.0 | 5.23 | 0.0 | 0.0 | 255.23 | 0.0 | 0.0 | 0.0 | 255.23 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 June 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | + When Admin sets the business date to "03 June 2024" + And Admin runs inline COB job for Loan + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 188.27 | 61.73 | 2.08 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 2 | 31 | 01 August 2024 | | 126.03 | 62.24 | 1.57 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 3 | 31 | 01 September 2024 | | 63.27 | 62.76 | 1.05 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 4 | 30 | 01 October 2024 | | 0.0 | 63.27 | 0.53 | 0.0 | 0.0 | 63.8 | 0.0 | 0.0 | 0.0 | 63.8 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 1.16 | 0 | 0 | 101.16 | 0 | 0 | 0 | 101.16 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 250.0 | 5.23 | 0.0 | 0.0 | 255.23 | 0.0 | 0.0 | 0.0 | 255.23 | Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | - | 01 January 2023 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | - | 01 March 2023 | Charge-off | 101.16 | 100.0 | 1.16 | 0.0 | 0.0 | 0.0 | + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 June 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | + | 02 June 2024 | Accrual | 0.07 | 0.0 | 0.07 | 0.0 | 0.0 | 0.0 | false | false | + And Admin does charge-off the loan on "03 June 2024" + When Admin sets the business date to "05 June 2024" + And Admin runs the Accrual Activity Posting job + And Admin runs the Add Accrual Transactions job + And Admin runs the Add Accrual Transactions For Loans With Income Posted As Transactions job + And Admin runs the Add Periodic Accrual Transactions job + And Admin runs the Recalculate Interest for Loans job + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 188.27 | 61.73 | 2.08 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 2 | 31 | 01 August 2024 | | 126.03 | 62.24 | 1.57 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 3 | 31 | 01 September 2024 | | 63.27 | 62.76 | 1.05 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 4 | 30 | 01 October 2024 | | 0.0 | 63.27 | 0.53 | 0.0 | 0.0 | 63.8 | 0.0 | 0.0 | 0.0 | 63.8 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 250.0 | 5.23 | 0.0 | 0.0 | 255.23 | 0.0 | 0.0 | 0.0 | 255.23 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 June 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | + | 02 June 2024 | Accrual | 0.07 | 0.0 | 0.07 | 0.0 | 0.0 | 0.0 | false | false | + | 03 June 2024 | Charge-off | 255.23 | 250.0 | 5.23 | 0.0 | 0.0 | 0.0 | false | false | - Scenario: Charge-off after installment date when loan behaviour is zero-interest and interestRecalculation = true - When Admin sets the business date to "1 March 2023" - And Admin creates a client with random data - When Admin creates a new zero charge-off Loan with interest recalculation and date: "1 January 2023" - 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | - | 1 | 31 | 01 February 2023 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 28 | 01 March 2023 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2023 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2023 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2023 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2023 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + @TestRailId:C3338 @AdvancedPaymentAllocation + Scenario: Verify charged off loans to be excluded from scheduled jobs - accrual entries and interest are added when loan has reverted charged-off transaction + When Admin sets the business date to "01 June 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_ADV_CUSTOM_PAYMENT_ALLOC_INTEREST_RECALCULATION_DAILY_EMI_360_30_MULTIDISBURSE | 01 June 2024 | 1000 | 10 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 June 2024" with "1000" amount and expected disbursement date on "01 June 2024" + When Admin successfully disburse the loan on "01 June 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 June 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 188.27 | 61.73 | 2.08 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 2 | 31 | 01 August 2024 | | 126.03 | 62.24 | 1.57 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 3 | 31 | 01 September 2024 | | 63.27 | 62.76 | 1.05 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 4 | 30 | 01 October 2024 | | 0.0 | 63.27 | 0.53 | 0.0 | 0.0 | 63.8 | 0.0 | 0.0 | 0.0 | 63.8 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | - And Admin successfully approves the loan on "1 January 2023" with "100" amount and expected disbursement date on "1 January 2023" - And Admin successfully disburse the loan on "1 January 2023" with "100" EUR transaction amount - And Admin does charge-off the loan on "28 February 2023" - 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2023 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 28 | 01 March 2023 | | 67.12 | 16.45 | 0.56 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2023 | | 50.11 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2023 | | 33.1 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2023 | | 16.09 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2023 | | 0.0 | 16.09 | 0.0 | 0.0 | 0.0 | 16.09 | 0.0 | 0.0 | 0.0 | 16.09 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 250.0 | 5.23 | 0.0 | 0.0 | 255.23 | 0.0 | 0.0 | 0.0 | 255.23 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 June 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | + When Admin sets the business date to "03 June 2024" + And Admin runs inline COB job for Loan + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 188.27 | 61.73 | 2.08 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 2 | 31 | 01 August 2024 | | 126.03 | 62.24 | 1.57 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 3 | 31 | 01 September 2024 | | 63.27 | 62.76 | 1.05 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 4 | 30 | 01 October 2024 | | 0.0 | 63.27 | 0.53 | 0.0 | 0.0 | 63.8 | 0.0 | 0.0 | 0.0 | 63.8 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 1.14 | 0 | 0 | 101.14 | 0 | 0 | 0 | 101.14 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 250.0 | 5.23 | 0.0 | 0.0 | 255.23 | 0.0 | 0.0 | 0.0 | 255.23 | Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | - | 01 January 2023 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | - | 28 February 2023 | Charge-off | 101.14 | 100.0 | 1.14 | 0.0 | 0.0 | 0.0 | + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 June 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | + | 02 June 2024 | Accrual | 0.07 | 0.0 | 0.07 | 0.0 | 0.0 | 0.0 | false | false | + And Admin does charge-off the loan on "03 June 2024" + When Admin sets the business date to "05 June 2024" + And Admin runs inline COB job for Loan + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 188.27 | 61.73 | 2.08 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 2 | 31 | 01 August 2024 | | 126.03 | 62.24 | 1.57 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 3 | 31 | 01 September 2024 | | 63.27 | 62.76 | 1.05 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 4 | 30 | 01 October 2024 | | 0.0 | 63.27 | 0.53 | 0.0 | 0.0 | 63.8 | 0.0 | 0.0 | 0.0 | 63.8 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 250.0 | 5.23 | 0.0 | 0.0 | 255.23 | 0.0 | 0.0 | 0.0 | 255.23 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 June 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | + | 02 June 2024 | Accrual | 0.07 | 0.0 | 0.07 | 0.0 | 0.0 | 0.0 | false | false | + | 03 June 2024 | Charge-off | 255.23 | 250.0 | 5.23 | 0.0 | 0.0 | 0.0 | false | false | + When Admin sets the business date to "06 June 2024" + Then Admin does a charge-off undo the loan + And Admin runs the Accrual Activity Posting job + And Admin runs the Add Accrual Transactions job + And Admin runs the Add Accrual Transactions For Loans With Income Posted As Transactions job + And Admin runs the Add Periodic Accrual Transactions job + And Admin runs the Recalculate Interest for Loans job + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 June 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 30 | 01 July 2024 | | 188.27 | 61.73 | 2.08 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 2 | 31 | 01 August 2024 | | 126.03 | 62.24 | 1.57 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 3 | 31 | 01 September 2024 | | 63.27 | 62.76 | 1.05 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | + | 4 | 30 | 01 October 2024 | | 0.0 | 63.27 | 0.53 | 0.0 | 0.0 | 63.8 | 0.0 | 0.0 | 0.0 | 63.8 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 250.0 | 5.23 | 0.0 | 0.0 | 255.23 | 0.0 | 0.0 | 0.0 | 255.23 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 June 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | + | 02 June 2024 | Accrual | 0.07 | 0.0 | 0.07 | 0.0 | 0.0 | 0.0 | false | false | + | 03 June 2024 | Charge-off | 255.23 | 250.0 | 5.23 | 0.0 | 0.0 | 0.0 | true | false | + | 06 June 2024 | Accrual | 0.28 | 0.0 | 0.28 | 0.0 | 0.0 | 0.0 | false | false | - Scenario: Charge-off in the middle of installment period when loan behaviour is zero-interest and interestRecalculation = true - When Admin sets the business date to "1 March 2023" - And Admin creates a client with random data - When Admin creates a new zero charge-off Loan with interest recalculation and date: "1 January 2023" - 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | - | 1 | 31 | 01 February 2023 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 28 | 01 March 2023 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2023 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2023 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2023 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2023 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + @TestRailId:C3326 @AdvancedPaymentAllocation + Scenario: Verify the repayment schedule is updated before the Charge-off in case of interest recalculation = true + 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE_PMT_ALLOC_1 | 01 January 2024 | 1000 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 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 + 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 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 668.6 | 331.4 | 5.83 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + | 2 | 29 | 01 March 2024 | | 335.27 | 333.33 | 3.9 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + | 3 | 31 | 01 April 2024 | | 0.0 | 335.27 | 1.96 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | - And Admin successfully approves the loan on "1 January 2023" with "100" amount and expected disbursement date on "1 January 2023" - And Admin successfully disburse the loan on "1 January 2023" with "100" EUR transaction amount - And Admin does charge-off the loan on "14 February 2023" - 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2023 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 28 | 01 March 2023 | | 66.83 | 16.74 | 0.27 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2023 | | 49.82 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2023 | | 32.81 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2023 | | 15.8 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2023 | | 0.0 | 15.8 | 0.0 | 0.0 | 0.0 | 15.8 | 0.0 | 0.0 | 0.0 | 15.8 | + | 1000 | 11.69 | 0 | 0 | 1011.69 | 0 | 0 | 0 | 1011.69 | + When Admin sets the business date to "08 February 2024" + When Admin runs inline COB job for Loan + # Move the current date into the middle of the 2nd period, so 1st period is past due + When Admin sets the business date to "09 February 2024" + And Admin does charge-off the loan on "09 February 2024" + Then Loan Repayment schedule has 3 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 668.6 | 331.4 | 5.83 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + | 2 | 29 | 01 March 2024 | | 335.8 | 332.8 | 4.43 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | + | 3 | 31 | 01 April 2024 | | 0.0 | 335.8 | 1.96 | 0.0 | 0.0 | 337.76 | 0.0 | 0.0 | 0.0 | 337.76 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 0.85 | 0 | 0 | 100.85 | 0 | 0 | 0 | 100.85 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | - | 01 January 2023 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | - | 14 February 2023 | Charge-off | 100.85 | 100.0 | 0.85 | 0.0 | 0.0 | 0.0 | + | 1000 | 12.22 | 0 | 0 | 1012.22 | 0 | 0 | 0 | 1012.22 | - Scenario: Charge-off after maturity date when loan behaviour is zero-interest and interestRecalculation = true - When Admin sets the business date to "1 August 2023" + @TestRailId:C3339 + Scenario: Charge-off on due date when loan behavior is zero-interest with interestRecalculation - UC1 + When Admin sets the business date to "1 January 2024" And Admin creates a client with random data - When Admin creates a new zero charge-off Loan with interest recalculation and date: "1 January 2023" + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | - | 1 | 31 | 01 February 2023 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 28 | 01 March 2023 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2023 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2023 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2023 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2023 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | - And Admin successfully approves the loan on "1 January 2023" with "100" amount and expected disbursement date on "1 January 2023" - And Admin successfully disburse the loan on "1 January 2023" with "100" EUR transaction amount - And Admin does charge-off the loan on "15 July 2023" + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin sets the business date to "1 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2023 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 28 | 01 March 2023 | | 67.14 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2023 | | 50.71 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2023 | | 34.28 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2023 | | 17.85 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2023 | | 0.0 | 17.85 | 0.58 | 0.0 | 0.0 | 18.43 | 0.0 | 0.0 | 0.0 | 18.43 | + | 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 17.01| 0 | 0 | 85.04 | + When Admin sets the business date to "1 March 2024" + And Admin does charge-off the loan on "1 March 2024" + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.04 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.03 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.02 | 0.0 | 0.0 | 0.0 | 16.02 | 0.0 | 0.0 | 0.0 | 16.02 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 3.48 | 0 | 0 | 103.48 | 0 | 0 | 0 | 103.48 | + | 100 | 1.07 | 0 | 0 | 101.07 | 17.01| 0 | 0 | 84.06 | Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | - | 01 January 2023 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | - | 15 July 2023 | Charge-off | 103.48 | 100.0 | 3.48 | 0.0 | 0.0 | 0.0 | + | 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Charge-off | 84.06 | 83.57 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | - Scenario: Charge-off when charge is added before the charge-off date, loan behaviour is zero-interest and interestRecalculation = true - When Admin sets the business date to "1 January 2023" + @TestRailId:C3340 + Scenario: Charge-off after installment date when loan behavior is zero-interest with interestRecalculation - UC2 + When Admin sets the business date to "1 January 2024" And Admin creates a client with random data - When Admin creates a new zero charge-off Loan with interest recalculation and date: "1 January 2023" + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | - | 1 | 31 | 01 February 2023 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 28 | 01 March 2023 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2023 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2023 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2023 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2023 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | - And Admin successfully approves the loan on "1 January 2023" with "100" amount and expected disbursement date on "1 January 2023" - And Admin successfully disburse the loan on "1 January 2023" with "100" EUR transaction amount - When Admin adds "LOAN_SNOOZE_FEE" due date charge with "27 February 2023" due date and 3 EUR transaction amount - When Admin sets the business date to "28 February 2023" - And Admin does charge-off the loan on "28 February 2023" + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin sets the business date to "1 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2023 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 28 | 01 March 2023 | | 67.12 | 16.45 | 0.56 | 3.0 | 0.0 | 20.01 | 0.0 | 0.0 | 0.0 | 20.01 | - | 3 | 31 | 01 April 2023 | | 50.11 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2023 | | 33.1 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2023 | | 16.09 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2023 | | 0.0 | 16.09 | 0.0 | 0.0 | 0.0 | 16.09 | 0.0 | 0.0 | 0.0 | 16.09 | + | 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 17.01| 0 | 0 | 85.04 | + When Admin sets the business date to "29 February 2024" + And Admin does charge-off the loan on "29 February 2024" + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.03 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 1.14 | 3.0 | 0 | 104.14 | 0 | 0 | 0 | 104.14 | + | 100 | 1.05 | 0 | 0 | 101.05 | 17.01| 0 | 0 | 84.04 | Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | - | 01 January 2023 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | - | 28 February 2023 | Charge-off | 104.14 | 100.0 | 1.14 | 3.0 | 0.0 | 0.0 | + | 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | false | - Scenario: Charge-off when charge is added on charge-off date, loan behaviour is zero-interest and interestRecalculation = true - When Admin sets the business date to "1 January 2023" + @TestRailId:C3341 + Scenario: Charge-off in the middle of installment period when loan behavior is zero-interest with interestRecalculation - UC3 + When Admin sets the business date to "1 January 2024" And Admin creates a client with random data - When Admin creates a new zero charge-off Loan with interest recalculation and date: "1 January 2023" + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | - | 1 | 31 | 01 February 2023 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 28 | 01 March 2023 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2023 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2023 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2023 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2023 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | - And Admin successfully approves the loan on "1 January 2023" with "100" amount and expected disbursement date on "1 January 2023" - And Admin successfully disburse the loan on "1 January 2023" with "100" EUR transaction amount - When Admin adds "LOAN_SNOOZE_FEE" due date charge with "28 February 2023" due date and 3 EUR transaction amount - When Admin sets the business date to "28 February 2023" - And Admin does charge-off the loan on "28 February 2023" - 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2023 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 28 | 01 March 2023 | | 67.12 | 16.45 | 0.56 | 3.0 | 0.0 | 20.01 | 0.0 | 0.0 | 0.0 | 20.01 | - | 3 | 31 | 01 April 2023 | | 50.11 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2023 | | 33.1 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2023 | | 16.09 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2023 | | 0.0 | 16.09 | 0.0 | 0.0 | 0.0 | 16.09 | 0.0 | 0.0 | 0.0 | 16.09 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 1.14 | 3.0 | 0 | 104.14 | 0 | 0 | 0 | 104.14 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | - | 01 January 2023 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | - | 28 February 2023 | Charge-off | 104.14 | 100.0 | 1.14 | 3.0 | 0.0 | 0.0 | - - Scenario: Charge-off when charge is added after the charge off date, loan behaviour is zero-interest and interestRecalculation = true - When Admin sets the business date to "1 January 2023" - And Admin creates a client with random data - When Admin creates a new zero charge-off Loan with interest recalculation and date: "1 January 2023" - 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | - | 1 | 31 | 01 February 2023 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 28 | 01 March 2023 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2023 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2023 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2023 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2023 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | - And Admin successfully approves the loan on "1 January 2023" with "100" amount and expected disbursement date on "1 January 2023" - And Admin successfully disburse the loan on "1 January 2023" with "100" EUR transaction amount - When Admin adds "LOAN_SNOOZE_FEE" due date charge with "1 March 2023" due date and 3 EUR transaction amount - When Admin sets the business date to "28 February 2023" - And Admin does charge-off the loan on "28 February 2023" - 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2023 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 28 | 01 March 2023 | | 67.12 | 16.45 | 0.56 | 3.0 | 0.0 | 20.01 | 0.0 | 0.0 | 0.0 | 20.01 | - | 3 | 31 | 01 April 2023 | | 50.11 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2023 | | 33.1 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2023 | | 16.09 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2023 | | 0.0 | 16.09 | 0.0 | 0.0 | 0.0 | 16.09 | 0.0 | 0.0 | 0.0 | 16.09 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 1.14 | 3.0 | 0 | 104.14 | 0 | 0 | 0 | 104.14 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | - | 01 January 2023 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | - | 28 February 2023 | Charge-off | 104.14 | 100.0 | 1.14 | 3.0 | 0.0 | 0.0 | - - Scenario: Undo the charge-off when loan behaviour is zero-interest and interestRecalculation = true - When Admin sets the business date to "1 March 2023" - And Admin creates a client with random data - When Admin creates a new zero charge-off Loan with interest recalculation and date: "1 January 2023" - And Admin successfully approves the loan on "1 January 2023" with "100" amount and expected disbursement date on "1 January 2023" - And Admin successfully disburse the loan on "1 January 2023" with "100" 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2023 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 28 | 01 March 2023 | | 67.14 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2023 | | 50.52 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2023 | | 33.8 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2023 | | 16.99 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2023 | | 0.0 | 16.99 | 0.1 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.14 | 0 | 0 | 102.14 | 0 | 0 | 0 | 102.14 | - And Admin does charge-off the loan on "14 February 2023" + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin sets the business date to "1 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2023 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 28 | 01 March 2023 | | 66.83 | 16.74 | 0.27 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2023 | | 49.82 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2023 | | 32.81 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2023 | | 15.8 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2023 | | 0.0 | 15.8 | 0.0 | 0.0 | 0.0 | 15.8 | 0.0 | 0.0 | 0.0 | 15.8 | + | 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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.85 | 0 | 0 | 100.85 | 0 | 0 | 0 | 100.85 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | - | 01 January 2023 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | - | 14 February 2023 | Charge-off | 100.85 | 100.0 | 0.85 | 0.0 | 0.0 | 0.0 | - And Admin does a charge-off undo the loan + | 100 | 2.05 | 0 | 0 | 102.05 | 17.01| 0 | 0 | 85.04 | + When Admin sets the business date to "14 February 2024" + And Admin does charge-off the loan on "14 February 2024" 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2023 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 28 | 01 March 2023 | | 67.14 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2023 | | 50.52 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2023 | | 33.8 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2023 | | 16.99 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2023 | | 0.0 | 16.99 | 0.1 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | + | 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 66.78 | 16.79 | 0.22 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 49.77 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 32.76 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 15.75 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 15.75 | 0.0 | 0.0 | 0.0 | 15.75 | 0.0 | 0.0 | 0.0 | 15.75 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.14 | 0 | 0 | 102.14 | 0 | 0 | 0 | 102.14 | + | 100 | 0.8 | 0 | 0 | 100.8 | 17.01| 0 | 0 | 83.79 | Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | - | 01 January 2023 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | - | 14 February 2023 | Charge-off | 100.85 | 100.0 | 0.85 | 0.0 | 0.0 | 0.0 | + | 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 14 February 2024 | Charge-off | 83.79 | 83.57 | 0.22 | 0.0 | 0.0 | 0.0 | false | false | - Scenario: Charge-off on due date when loan behaviour is zero-interest and interestRecalculation = true - repayment after charge off + @TestRailId:C3342 + Scenario: Charge-off after maturity date when loan behavior is zero-interest with interestRecalculation - UC4 When Admin sets the business date to "1 January 2024" And Admin creates a client with random data And Admin creates a fully customized loan with the following data: - | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | - | LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF_BEHAVIOUR | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + | 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_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount - When Admin sets the business date to "1 February 2024" + When Admin sets the business date to "1 May 2024" And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 April 2024" with 17.01 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 May 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.05 | 0 | 0 | 102.05 | 17.01| 0 | 0 | 85.04 | - When Admin sets the business date to "29 February 2024" - And Admin does charge-off the loan on "29 February 2024" - 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.03 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 1.05 | 0 | 0 | 101.05 | 17.01 | 0 | 0 | 84.04 | - 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 | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | false | -# ----- repayment after charge off on 1st March ----- # - When Admin sets the business date to "01 March 2024" - And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR transaction amount + | 100 | 2.05 | 0 | 0 | 102.05 | 68.04 | 0 | 0 | 34.01 | + When Admin sets the business date to "15 July 2024" + And Admin does charge-off the loan on "15 July 2024" 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.03 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.2 | 0.0 | 0.0 | 17.1 | 0.0 | 0.0 | 0.0 | 17.1 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 1.05 | 0 | 0 | 101.05 | 34.02 | 0 | 0 | 67.03 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.15 | 0 | 0 | 102.15 | 68.04| 0 | 0 | 34.11 | 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 | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | false | - | 01 March 2024 | Repayment | 17.01 | 16.54 | 0.47 | 0.0 | 0.0 | 67.03 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | + | 01 April 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 50.43 | false | false | + | 01 May 2024 | Repayment | 17.01 | 16.72 | 0.29 | 0.0 | 0.0 | 33.71 | false | false | + | 15 July 2024 | Charge-off | 34.11 | 33.71 | 0.4 | 0.0 | 0.0 | 0.0 | false | false | - @PS-2137-s5 - Scenario: Charge-off on due date when loan behaviour is zero-interest and interestRecalculation = true - charge off after one installment is overdue (31st March) + @TestRailId:C3343 + Scenario: Charge-off after one installment is overdue when loan behavior is zero-interest and interestRecalculation - UC5 When Admin sets the business date to "1 January 2024" And Admin creates a client with random data And Admin creates a fully customized loan with the following data: - | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | - | LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF_BEHAVIOUR | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + | 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_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | @@ -2022,28 +2238,28 @@ Feature: Charge-off When Admin sets the business date to "1 February 2024" And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100 | 2.05 | 0 | 0 | 102.05 | 17.01| 0 | 0 | 85.04 | When Admin sets the business date to "31 March 2024" And Admin does charge-off the loan on "31 March 2024" 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.51 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.5 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.49 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.49 | 0.0 | 0.0 | 0.0 | 16.49 | 0.0 | 0.0 | 0.0 | 16.49 | + | 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.51 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.5 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.49 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.49 | 0.0 | 0.0 | 0.0 | 16.49 | 0.0 | 0.0 | 0.0 | 16.49 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100 | 1.54 | 0 | 0 | 101.54 | 17.01 | 0 | 0 | 84.53 | @@ -2053,22 +2269,22 @@ Feature: Charge-off | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | | 31 March 2024 | Charge-off | 84.53 | 83.57 | 0.96 | 0.0 | 0.0 | 0.0 | false | false | - @PS-2137-s6 - Scenario: Charge-off on due date when loan behaviour is zero-interest and interestRecalculation = true - backdated repayment + @TestRailId:C3344 + Scenario: Charge-off with backdated repayment when loan behavior is zero-interest with interestRecalculation - UC6 When Admin sets the business date to "1 January 2024" And Admin creates a client with random data And Admin creates a fully customized loan with the following data: - | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | - | LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF_BEHAVIOUR | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + | 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_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | @@ -2077,28 +2293,28 @@ Feature: Charge-off When Admin sets the business date to "1 February 2024" And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100 | 2.05 | 0 | 0 | 102.05 | 17.01| 0 | 0 | 85.04 | When Admin sets the business date to "31 March 2024" And Admin does charge-off the loan on "31 March 2024" 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.51 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.5 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.49 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.49 | 0.0 | 0.0 | 0.0 | 16.49 | 0.0 | 0.0 | 0.0 | 16.49 | + | 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.51 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.5 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.49 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.49 | 0.0 | 0.0 | 0.0 | 16.49 | 0.0 | 0.0 | 0.0 | 16.49 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100 | 1.54 | 0 | 0 | 101.54 | 17.01 | 0 | 0 | 84.53 | @@ -2110,14 +2326,14 @@ Feature: Charge-off # ----- backdated repayment on 1 March made on 31 March ----- # And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | | 50.42 | 16.63 | 0.38 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.41 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.4 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.4 | 0.0 | 0.0 | 0.0 | 16.4 | 0.0 | 0.0 | 0.0 | 16.4 | + | 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | | 50.42 | 16.63 | 0.38 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.41 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.4 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.4 | 0.0 | 0.0 | 0.0 | 16.4 | 0.0 | 0.0 | 0.0 | 16.4 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100 | 1.45 | 0 | 0 | 101.45 | 34.02 | 0 | 0 | 67.43 | @@ -2128,23 +2344,22 @@ Feature: Charge-off | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | | 31 March 2024 | Charge-off | 67.43 | 67.05 | 0.38 | 0.0 | 0.0 | 0.0 | false | true | - @PS-2137-s11 - Scenario: Charge-off on due date when loan behaviour is zero-interest and interestRecalculation = true - CBR scenario + @TestRailId:C3345 + Scenario: Charge-off with reversal afterwards when loan behavior is zero-interest with interestRecalculation - UC7 When Admin sets the business date to "1 January 2024" And Admin creates a client with random data - And Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF_BEHAVIOUR" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule And Admin creates a fully customized loan with the following data: - | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | - | LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF_BEHAVIOUR | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + | 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_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | @@ -2152,180 +2367,142 @@ Feature: Charge-off And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount When Admin sets the business date to "1 February 2024" And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - When Admin sets the business date to "1 March 2024" - And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR transaction amount - When Admin sets the business date to "1 April 2024" - And Customer makes "AUTOPAY" repayment on "01 April 2024" with 17.01 EUR transaction amount - When Admin sets the business date to "1 May 2024" - And Customer makes "AUTOPAY" repayment on "01 May 2024" with 17.01 EUR transaction amount - When Admin sets the business date to "1 June 2024" - And Customer makes "AUTOPAY" repayment on "01 June 2024" with 17.01 EUR transaction amount - When Admin sets the business date to "1 July 2024" - And Customer makes "AUTOPAY" repayment on "01 July 2024" with 20 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 5 | 31 | 01 June 2024 | 01 June 2024 | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 6 | 30 | 01 July 2024 | 01 July 2024 | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 17.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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.05 | 0 | 0 | 102.05 | 102.05 | 0 | 0 | 0.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 | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | - | 01 April 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 50.43 | false | false | - | 01 May 2024 | Repayment | 17.01 | 16.72 | 0.29 | 0.0 | 0.0 | 33.71 | false | false | - | 01 June 2024 | Repayment | 17.01 | 16.81 | 0.2 | 0.0 | 0.0 | 16.9 | false | false | - | 01 July 2024 | Repayment | 20.0 | 16.9 | 0.1 | 0.0 | 0.0 | 0.0 | false | false | - | 01 July 2024 | Accrual | 2.05 | 0.0 | 2.05 | 0.0 | 0.0 | 0.0 | false | false | - When Admin sets the business date to "2 July 2024" - When Admin makes Credit Balance Refund transaction on "02 July 2024" with 3 EUR transaction amount + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 17.01| 0 | 0 | 85.04 | + When Admin sets the business date to "29 February 2024" + And Admin does charge-off the loan on "29 February 2024" 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 5 | 31 | 01 June 2024 | 01 June 2024 | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 6 | 30 | 01 July 2024 | 01 July 2024 | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 17.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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.03 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.05 | 0 | 0 | 102.05 | 102.05 | 0 | 0 | 0.0 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 1.05 | 0 | 0 | 101.05 | 17.01 | 0 | 0 | 84.04 | 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 | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | - | 01 April 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 50.43 | false | false | - | 01 May 2024 | Repayment | 17.01 | 16.72 | 0.29 | 0.0 | 0.0 | 33.71 | false | false | - | 01 June 2024 | Repayment | 17.01 | 16.81 | 0.2 | 0.0 | 0.0 | 16.9 | false | false | - | 01 July 2024 | Repayment | 20.0 | 16.9 | 0.1 | 0.0 | 0.0 | 0.0 | false | false | - | 01 July 2024 | Accrual | 2.05 | 0.0 | 2.05 | 0.0 | 0.0 | 0.0 | false | false | - | 02 July 2024 | Credit Balance Refund | 3.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | - When Customer undo "1"th "Repayment" transaction made on "01 July 2024" - Then Loan Repayment schedule has 7 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 5 | 31 | 01 June 2024 | 01 June 2024 | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 7 | 1 | 02 July 2024 | | 0.0 | 3.0 | 0.0 | 0.0 | 0.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 | - | 103 | 2.05 | 0 | 0 | 105.05 | 85.05| 0 | 0 | 20.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 | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | - | 01 April 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 50.43 | false | false | - | 01 May 2024 | Repayment | 17.01 | 16.72 | 0.29 | 0.0 | 0.0 | 33.71 | false | false | - | 01 June 2024 | Repayment | 17.01 | 16.81 | 0.2 | 0.0 | 0.0 | 16.9 | false | false | - | 01 July 2024 | Repayment | 20.0 | 16.9 | 0.1 | 0.0 | 0.0 | 0.0 | true | false | - | 01 July 2024 | Accrual | 2.05 | 0.0 | 2.05 | 0.0 | 0.0 | 0.0 | false | false | - | 02 July 2024 | Credit Balance Refund | 3.0 | 3.0 | 0.0 | 0.0 | 0.0 | 19.9 | false | true | - When Admin sets the business date to "15 July 2024" - And Admin does charge-off the loan on "15 July 2024" - Then Loan Repayment schedule has 7 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 5 | 31 | 01 June 2024 | 01 June 2024 | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 7 | 1 | 02 July 2024 | | 0.0 | 3.0 | 0.0 | 0.0 | 0.0 | 3.0 | 0.0 | 0.0 | 0.0 | 3.0 | + | 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | false | +# ----- repayment reversal of 1st February ----- # + When Customer undo "1"th "Repayment" transaction made on "01 February 2024" + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.12 | 16.45 | 0.56 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.11 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.1 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.09 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.09 | 0.0 | 0.0 | 0.0 | 16.09 | 0.0 | 0.0 | 0.0 | 16.09 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 103 | 2.05 | 0 | 0 | 105.05 | 85.05| 0 | 0 | 20.0 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 1.14 | 0 | 0 | 101.14 | 0.0 | 0 | 0 | 101.14 | 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 | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | - | 01 April 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 50.43 | false | false | - | 01 May 2024 | Repayment | 17.01 | 16.72 | 0.29 | 0.0 | 0.0 | 33.71 | false | false | - | 01 June 2024 | Repayment | 17.01 | 16.81 | 0.2 | 0.0 | 0.0 | 16.9 | false | false | - | 01 July 2024 | Repayment | 20.0 | 16.9 | 0.1 | 0.0 | 0.0 | 0.0 | true | false | - | 01 July 2024 | Accrual | 2.05 | 0.0 | 2.05 | 0.0 | 0.0 | 0.0 | false | false | - | 02 July 2024 | Credit Balance Refund | 3.0 | 3.0 | 0.0 | 0.0 | 0.0 | 19.9 | false | true | - | 15 July 2024 | Charge-off | 20.0 | 19.9 | 0.1 | 0.0 | 0.0 | 0.0 | false | false | + | 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | true | false | + | 29 February 2024 | Charge-off | 101.14 | 100.0 | 1.14 | 0.0 | 0.0 | 0.0 | false | true | + And In Loan Transactions the "2"th Transaction has Transaction type="Repayment" and is reverted - @PS-2137-s12 - Scenario: Charge-off on due date when loan behaviour is zero-interest and interestRecalculation = true - adjust to last installment scenario + @TestRailId:C3346 + Scenario: Charge-off with repayment afterwards when loan behavior is zero-interest and interestRecalculation - UC8 When Admin sets the business date to "1 January 2024" And Admin creates a client with random data - And Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF_BEHAVIOUR" loan product "DEFAULT" transaction type to "LAST_INSTALLMENT" future installment allocation rule + And Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule And Admin creates a fully customized loan with the following data: - | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | - | LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF_BEHAVIOUR | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + | 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_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount - When Admin sets the business date to "15 January 2024" - And Customer makes "AUTOPAY" repayment on "15 January 2024" with 17.01 EUR transaction amount + When Admin sets the business date to "1 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.52 | 16.48 | 0.53 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 66.9 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.18 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.36 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 17.01 | 16.35 | 0.1 | 0.0 | 0.0 | 16.45 | 0.0 | 0.0 | 0.0 | 16.45 | - | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01| 17.01 | 0.0 | 0.0 | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 1.5 | 0 | 0 | 101.5 | 17.01| 17.01 | 0 | 84.49 | + | 100 | 2.05 | 0 | 0 | 102.05 | 17.01| 0 | 0 | 85.04 | When Admin sets the business date to "29 February 2024" And Admin does charge-off the loan on "29 February 2024" 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.52 | 16.48 | 0.53 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 66.98 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 49.97 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 32.96 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 17.01 | 15.95 | 0.0 | 0.0 | 0.0 | 15.95 | 0.0 | 0.0 | 0.0 | 15.95 | - | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.03 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 1.0 | 0 | 0 | 101.0 | 17.01| 17.01 | 0 | 83.99 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 1.05 | 0 | 0 | 101.05 | 17.01 | 0 | 0 | 84.04 | 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 | - | 15 January 2024 | Repayment | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 82.99 | false | false | - | 29 February 2024 | Charge-off | 83.99 | 82.99 | 1.0 | 0.0 | 0.0 | 0.0 | false | false | - And Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF_BEHAVIOUR" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | false | +# ----- repayment after charge off on 1st March ----- # + When Admin sets the business date to "1 March 2024" + And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.03 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 1.05 | 0 | 0 | 101.05 | 34.02 | 0 | 0 | 67.03 | + 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.54 | 0.47 | 0.0 | 0.0 | 67.03 | false | false | - @scenario_9.3_interest_recalculation_enabled_after_3349 - Scenario: Verify error when backdated charge-off happened with charge is added after the charge off date when loan behavior is zero-interest with interestRecalculation + @TestRailId:C3347 + Scenario: Charge-off with charge that added before the charge off date when loan behavior is zero-interest with interestRecalculation - UC9.1 When Admin sets the business date to "1 January 2024" And Admin creates a client with random data And Admin creates a fully customized loan with the following data: - | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | - | LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF_BEHAVIOUR | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + | 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_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | @@ -2355,17 +2532,35 @@ Feature: Charge-off Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100 | 2.05 | 5.0 | 0 | 107.05 | 22.01| 0 | 0 | 85.04 | - When Admin sets the business date to "01 March 2024" - When Admin adds "LOAN_SNOOZE_FEE" due date charge with "05 March 2024" due date and 3 EUR transaction amount - And Admin tries to charge-off the loan on "29 February 2024" but fails due to monetary activity after the charge-off date + When Admin sets the business date to "28 February 2024" + When Admin adds "LOAN_SNOOZE_FEE" due date charge with "28 February 2024" due date and 3 EUR transaction amount + When Admin sets the business date to "29 February 2024" + And Admin does charge-off the loan on "29 February 2024" + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 5.0 | 0.0 | 22.01 | 22.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.03 | 16.54 | 0.47 | 3.0 | 0.0 | 20.01 | 0.0 | 0.0 | 0.0 | 20.01 | + | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 1.05 | 8.0 | 0 | 109.05 | 22.01| 0 | 0 | 87.04 | + 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 | + | 01 February 2024 | Repayment | 22.01 | 16.43 | 0.58 | 5.0 | 0.0 | 83.57 | false | false | + | 29 February 2024 | Charge-off | 87.04 | 83.57 | 0.47 | 3.0 | 0.0 | 0.0 | false | false | - @scenario_9.3_interest_recalculation_enabled_after_3349 - Scenario: Charge-off with charge is added after the charge off date when loan behavior is zero-interest with interestRecalculation + @TestRailId:C3348 + Scenario: Charge-off with charge that added as on charge off date when loan behavior is zero-interest with interestRecalculation - UC9.2 When Admin sets the business date to "1 January 2024" And Admin creates a client with random data And Admin creates a fully customized loan with the following data: - | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | - | LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF_BEHAVIOUR | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + | 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_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | @@ -2395,34 +2590,34 @@ Feature: Charge-off Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100 | 2.05 | 5.0 | 0 | 107.05 | 22.01| 0 | 0 | 85.04 | - When Admin sets the business date to "01 March 2024" - When Admin adds "LOAN_SNOOZE_FEE" due date charge with "05 March 2024" due date and 3 EUR transaction amount - And Admin does charge-off the loan on "01 March 2024" + When Admin sets the business date to "29 February 2024" + When Admin adds "LOAN_SNOOZE_FEE" due date charge with "29 February 2024" due date and 3 EUR transaction amount + And Admin does charge-off the loan on "29 February 2024" 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 | Waived | Outstanding | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 5.0 | 0.0 | 22.01 | 22.01| 0.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.04 | 17.01 | 0.0 | 3.0 | 0.0 | 20.01 | 0.0 | 0.0 | 0.0 | 0.0 | 20.01 | - | 4 | 30 | 01 May 2024 | | 33.03 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.02 | 0.0 | 0.0 | 0.0 | 16.02 | 0.0 | 0.0 | 0.0 | 0.0 | 16.02 | + | 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 5.0 | 0.0 | 22.01 | 22.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.03 | 16.54 | 0.47 | 3.0 | 0.0 | 20.01 | 0.0 | 0.0 | 0.0 | 20.01 | + | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Waived | Outstanding | - | 100 | 1.07 | 8.0 | 0 | 109.07 | 22.01| 0 | 0 | 0.0 | 87.06 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 1.05 | 8.0 | 0 | 109.05 | 22.01| 0 | 0 | 87.04 | 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 | - | 01 February 2024 | Repayment | 22.01 | 16.43 | 0.58 | 5.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Charge-off | 87.06 | 83.57 | 0.49 | 3.0 | 0.0 | 0.0 | false | false | + | 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 | + | 01 February 2024 | Repayment | 22.01 | 16.43 | 0.58 | 5.0 | 0.0 | 83.57 | false | false | + | 29 February 2024 | Charge-off | 87.04 | 83.57 | 0.47 | 3.0 | 0.0 | 0.0 | false | false | - @TestRailId:3349 - Scenario: Charge-off with charge is added after the charge off date when loan behavior is zero-interest with interestRecalculation, when charge is waived + @TestRailId:C3349 + Scenario: Charge-off with charge waive is added after the charge off date when loan behavior is zero-interest with interestRecalculation - UC9.3 When Admin sets the business date to "1 January 2024" And Admin creates a client with random data And Admin creates a fully customized loan with the following data: - | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | - | LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF_BEHAVIOUR | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + | 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_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | @@ -2452,942 +2647,717 @@ Feature: Charge-off Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100 | 2.05 | 5.0 | 0 | 107.05 | 22.01| 0 | 0 | 85.04 | - When Admin sets the business date to "01 March 2024" + When Admin sets the business date to "29 February 2024" When Admin adds "LOAN_SNOOZE_FEE" due date charge with "05 March 2024" due date and 3 EUR transaction amount - And Admin does charge-off the loan on "01 March 2024" + And Admin does charge-off the loan on "29 February 2024" And Admin waives charge 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 | Waived | Outstanding | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 5.0 | 0.0 | 22.01 | 22.01| 0.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.04 | 17.01 | 0.0 | 3.0 | 0.0 | 20.01 | 0.0 | 0.0 | 0.0 | 3.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.03 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.02 | 0.0 | 0.0 | 0.0 | 16.02 | 0.0 | 0.0 | 0.0 | 0.0 | 16.02 | + | 2 | 29 | 01 March 2024 | | 67.03 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 3.0 | 0.0 | 20.01 | 0.0 | 0.0 | 0.0 | 3.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 0.0 | 16.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Waived | Outstanding | - | 100 | 1.07 | 8.0 | 0 | 109.07 | 22.01| 0 | 0 | 3.0 | 84.06 | + | 100 | 1.05 | 8.0 | 0 | 109.05 | 22.01| 0 | 0 | 3.0 | 84.04 | 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 | - | 01 February 2024 | Repayment | 22.01 | 16.43 | 0.58 | 5.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Waive loan charges| 3.0 | 0.0 | 0.0 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Charge-off | 84.06 | 83.57 | 0.49 | 0.0 | 0.0 | 0.0 | false | true | + | 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 | + | 01 February 2024 | Repayment | 22.01 | 16.43 | 0.58 | 5.0 | 0.0 | 83.57 | false | false | + | 29 February 2024 | Waive loan charges | 3.0 | 0.0 | 0.0 | 0.0 | 0.0 | 83.57 | false | false | + | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | true | - @scenario_9.3_interest_recalculation_disabled_after_3373 - Scenario: Verify error when backdated charge-off happened with charge is added after the charge off date when loan behavior is zero-interest with interestRecalculation disabled + @TestRailId:C3412 + Scenario: Charge-off with charge is added after the charge off date when loan behavior is zero-interest with interestRecalculation - UC9.4 When Admin sets the business date to "1 January 2024" And Admin creates a client with random data - When Admin creates a new zero charge-off Loan without interest recalculation and with date: "1 January 2024" + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | - | 1 | 31 | 01 February 2024 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.04 | 0 | 0 | 102.04 | 0 | 0 | 0 | 102.04 | + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount When Admin sets the business date to "1 February 2024" When Admin adds "LOAN_SNOOZE_FEE" due date charge with "01 February 2024" due date and 5 EUR transaction amount - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 22.0 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 22.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 5.0 | 0.0 | 22.0 | 22.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 5.0 | 0.0 | 22.01 | 22.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.04 | 5 | 0 | 107.04 | 22.0 | 0 | 0 | 85.04 | - When Admin sets the business date to "01 March 2024" - When Admin adds "LOAN_SNOOZE_FEE" due date charge with "05 March 2024" due date and 3 EUR transaction amount + | 100 | 2.05 | 5.0 | 0 | 107.05 | 22.01| 0 | 0 | 85.04 | When Admin sets the business date to "29 February 2024" - And Admin tries to charge-off the loan on "29 February 2024" but fails due to monetary activity after the charge-off date + When Admin adds "LOAN_SNOOZE_FEE" due date charge with "05 March 2024" due date and 3 EUR transaction amount + And Admin does charge-off the loan on "29 February 2024" + 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 | Waived | Outstanding | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 5.0 | 0.0 | 22.01 | 22.01| 0.0 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.03 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 3.0 | 0.0 | 20.01 | 0.0 | 0.0 | 0.0 | 0.0 | 20.01 | + | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 0.0 | 16.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Waived | Outstanding | + | 100 | 1.05 | 8.0 | 0 | 109.05 | 22.01| 0 | 0 | 0.0 | 87.04 | + 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 | + | 01 February 2024 | Repayment | 22.01 | 16.43 | 0.58 | 5.0 | 0.0 | 83.57 | false | false | + | 29 February 2024 | Charge-off | 87.04 | 83.57 | 0.47 | 3.0 | 0.0 | 0.0 | false | false | - @scenario_9.3_interest_recalculation_disabled_after_3373 - Scenario: Charge-off with charge is added after the charge off date when loan behavior is zero-interest with interestRecalculation disabled + @TestRailId:C3413 + Scenario: Backdated charge-off with charge is added after the charge off date when loan behavior is zero-interest with interestRecalculation enabled is forbidden - UC9.5 When Admin sets the business date to "1 January 2024" And Admin creates a client with random data - When Admin creates a new zero charge-off Loan without interest recalculation and with date: "1 January 2024" + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | - | 1 | 31 | 01 February 2024 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.04 | 0 | 0 | 102.04 | 0 | 0 | 0 | 102.04 | + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount When Admin sets the business date to "1 February 2024" When Admin adds "LOAN_SNOOZE_FEE" due date charge with "01 February 2024" due date and 5 EUR transaction amount - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 22.0 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 22.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 5.0 | 0.0 | 22.0 | 22.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 5.0 | 0.0 | 22.01 | 22.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.04 | 5 | 0 | 107.04 | 22.0 | 0 | 0 | 85.04 | - When Admin sets the business date to "01 March 2024" + | 100 | 2.05 | 5.0 | 0 | 107.05 | 22.01| 0 | 0 | 85.04 | + When Admin sets the business date to "1 March 2024" When Admin adds "LOAN_SNOOZE_FEE" due date charge with "05 March 2024" due date and 3 EUR transaction amount - And Admin does charge-off the loan on "01 March 2024" - 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 5.0 | 0.0 | 22.0 | 22.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.05 | 17.0 | 0.0 | 3.0 | 0.0 | 20.0 | 0.0 | 0.0 | 0.0 | 20.0 | - | 4 | 30 | 01 May 2024 | | 33.05 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.05 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.05 | 0.0 | 0.0 | 0.0 | 16.05 | 0.0 | 0.0 | 0.0 | 16.05 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 1.05 | 8 | 0 | 109.05 | 22.0 | 0 | 0 | 87.05 | - 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 | - | 01 February 2024 | Repayment | 22.0 | 16.41 | 0.59 | 5.0 | 0.0 | 83.59 | false | false | - | 01 March 2024 | Charge-off | 87.05 | 83.59 | 0.46 | 3.0 | 0.0 | 0.0 | false | false | + Then Backdated charge-off on a date "29 February 2024" is forbidden - @TestRailId:3373 - Scenario: Charge-off with charge is added after the charge off date when loan behavior is zero-interest with interestRecalculation disabled, when charge is waived + @TestRailId:C3350 + Scenario: Charge-off with Credit Balance Refund when loan behavior is zero-interest and interestRecalculation - UC11 When Admin sets the business date to "1 January 2024" And Admin creates a client with random data - When Admin creates a new zero charge-off Loan without interest recalculation and with date: "1 January 2024" + And Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | - | 1 | 31 | 01 February 2024 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.04 | 0 | 0 | 102.04 | 0 | 0 | 0 | 102.04 | + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount - When Admin sets the business date to "1 February 2024" - When Admin adds "LOAN_SNOOZE_FEE" due date charge with "01 February 2024" due date and 5 EUR transaction amount - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 22.0 EUR transaction amount + When Admin sets the business date to "1 July 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 April 2024" with 17.01 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 May 2024" with 17.01 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 June 2024" with 17.01 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 July 2024" with 20 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 5.0 | 0.0 | 22.0 | 22.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | + | 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 5 | 31 | 01 June 2024 | 01 June 2024 | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 6 | 30 | 01 July 2024 | 01 July 2024 | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 17.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 | 2.04 | 5 | 0 | 107.04 | 22.0 | 0 | 0 | 85.04 | - When Admin sets the business date to "01 March 2024" - When Admin adds "LOAN_SNOOZE_FEE" due date charge with "05 March 2024" due date and 3 EUR transaction amount - And Admin does charge-off the loan on "01 March 2024" - And Admin waives charge + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 102.05 | 0 | 0 | 0.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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | + | 01 April 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 50.43 | false | false | + | 01 May 2024 | Repayment | 17.01 | 16.72 | 0.29 | 0.0 | 0.0 | 33.71 | false | false | + | 01 June 2024 | Repayment | 17.01 | 16.81 | 0.2 | 0.0 | 0.0 | 16.9 | false | false | + | 01 July 2024 | Repayment | 20.0 | 16.9 | 0.1 | 0.0 | 0.0 | 0.0 | false | false | + | 01 July 2024 | Accrual | 2.05 | 0.0 | 2.05 | 0.0 | 0.0 | 0.0 | false | false | + When Admin sets the business date to "2 July 2024" + When Admin makes Credit Balance Refund transaction on "02 July 2024" with 3 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 | Waived | Outstanding | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 5.0 | 0.0 | 22.0 | 22.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.05 | 17.0 | 0.0 | 3.0 | 0.0 | 20.0 | 0.0 | 0.0 | 0.0 | 3.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.05 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.05 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.05 | 0.0 | 0.0 | 0.0 | 16.05 | 0.0 | 0.0 | 0.0 | 0.0 | 16.05 | + | 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 5 | 31 | 01 June 2024 | 01 June 2024 | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 6 | 30 | 01 July 2024 | 01 July 2024 | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 17.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 | Waived | Outstanding | - | 100 | 1.05 | 8 | 0 | 109.05 | 22.0 | 0 | 0 | 3.0 | 84.05 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 102.05 | 0 | 0 | 0.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 | - | 01 February 2024 | Repayment | 22.0 | 16.41 | 0.59 | 5.0 | 0.0 | 83.59 | false | false | - | 01 March 2024 | Waive loan charges | 3.0 | 0.0 | 0.0 | 0.0 | 0.0 | 83.59 | false | false | - | 01 March 2024 | Charge-off | 84.05 | 83.59 | 0.46 | 0.0 | 0.0 | 0.0 | false | true | - - Scenario: Charge-off on due date when loan behaviour is zero-interest and interestRecalculation = false - When Admin sets the business date to "1 March 2023" - And Admin creates a client with random data - When Admin creates a new zero charge-off Loan without interest recalculation and with date: "1 January 2023" - 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | - | 1 | 31 | 01 February 2023 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 28 | 01 March 2023 | | 67.04 | 16.55 | 0.45 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2023 | | 50.44 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2023 | | 33.73 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2023 | | 16.93 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2023 | | 0.0 | 16.93 | 0.1 | 0.0 | 0.0 | 17.03 | 0.0 | 0.0 | 0.0 | 17.03 | + | 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | + | 01 April 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 50.43 | false | false | + | 01 May 2024 | Repayment | 17.01 | 16.72 | 0.29 | 0.0 | 0.0 | 33.71 | false | false | + | 01 June 2024 | Repayment | 17.01 | 16.81 | 0.2 | 0.0 | 0.0 | 16.9 | false | false | + | 01 July 2024 | Repayment | 20.0 | 16.9 | 0.1 | 0.0 | 0.0 | 0.0 | false | false | + | 01 July 2024 | Accrual | 2.05 | 0.0 | 2.05 | 0.0 | 0.0 | 0.0 | false | false | + | 02 July 2024 | Credit Balance Refund | 3.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | + When Customer undo "1"th "Repayment" transaction made on "01 July 2024" + Then Loan Repayment schedule has 7 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 5 | 31 | 01 June 2024 | 01 June 2024 | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 7 | 1 | 02 July 2024 | | 0.0 | 3.0 | 0.0 | 0.0 | 0.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 | 2.03 | 0 | 0 | 102.03 | 0 | 0 | 0 | 102.03 | - And Admin successfully approves the loan on "1 January 2023" with "100" amount and expected disbursement date on "1 January 2023" - And Admin successfully disburse the loan on "1 January 2023" with "100" EUR transaction amount - And Admin does charge-off the loan on "1 March 2023" - 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2023 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 28 | 01 March 2023 | | 67.04 | 16.55 | 0.45 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2023 | | 50.04 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2023 | | 33.04 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2023 | | 16.04 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2023 | | 0.0 | 16.04 | 0.0 | 0.0 | 0.0 | 16.04 | 0.0 | 0.0 | 0.0 | 16.04 | + | 103 | 2.05 | 0 | 0 | 105.05 | 85.05| 0 | 0 | 20.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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | + | 01 April 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 50.43 | false | false | + | 01 May 2024 | Repayment | 17.01 | 16.72 | 0.29 | 0.0 | 0.0 | 33.71 | false | false | + | 01 June 2024 | Repayment | 17.01 | 16.81 | 0.2 | 0.0 | 0.0 | 16.9 | false | false | + | 01 July 2024 | Repayment | 20.0 | 16.9 | 0.1 | 0.0 | 0.0 | 0.0 | true | false | + | 01 July 2024 | Accrual | 2.05 | 0.0 | 2.05 | 0.0 | 0.0 | 0.0 | false | false | + | 02 July 2024 | Credit Balance Refund | 3.0 | 3.0 | 0.0 | 0.0 | 0.0 | 19.9 | false | true | + When Admin sets the business date to "15 July 2024" + And Admin does charge-off the loan on "15 July 2024" + Then Loan Repayment schedule has 7 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 5 | 31 | 01 June 2024 | 01 June 2024 | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 1.04 | 0 | 0 | 101.04 | 0 | 0 | 0 | 101.04 | + | 103 | 2.05 | 0 | 0 | 105.05 | 85.05| 0 | 0 | 20.0 | Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | - | 01 January 2023 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | - | 01 March 2023 | Charge-off | 101.04 | 100.0 | 1.04 | 0.0 | 0.0 | 0.0 | + | 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | + | 01 April 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 50.43 | false | false | + | 01 May 2024 | Repayment | 17.01 | 16.72 | 0.29 | 0.0 | 0.0 | 33.71 | false | false | + | 01 June 2024 | Repayment | 17.01 | 16.81 | 0.2 | 0.0 | 0.0 | 16.9 | false | false | + | 01 July 2024 | Repayment | 20.0 | 16.9 | 0.1 | 0.0 | 0.0 | 0.0 | true | false | + | 01 July 2024 | Accrual | 2.05 | 0.0 | 2.05 | 0.0 | 0.0 | 0.0 | false | false | + | 02 July 2024 | Credit Balance Refund | 3.0 | 3.0 | 0.0 | 0.0 | 0.0 | 19.9 | false | true | + | 15 July 2024 | Charge-off | 20.0 | 19.9 | 0.1 | 0.0 | 0.0 | 0.0 | false | false | - Scenario: Charge-off after installment date when loan behaviour is zero-interest and interestRecalculation = false - When Admin sets the business date to "1 March 2023" + @TestRailId:C3351 + Scenario: Charge-off with adjust to last installment scenario when loan behavior is zero-interest and interestRecalculation - UC12 + When Admin sets the business date to "1 January 2024" And Admin creates a client with random data - When Admin creates a new zero charge-off Loan without interest recalculation and with date: "1 January 2023" + And Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF" loan product "DEFAULT" transaction type to "LAST_INSTALLMENT" future installment allocation rule + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | - | 1 | 31 | 01 February 2023 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 28 | 01 March 2023 | | 67.04 | 16.55 | 0.45 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2023 | | 50.44 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2023 | | 33.73 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2023 | | 16.93 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2023 | | 0.0 | 16.93 | 0.1 | 0.0 | 0.0 | 17.03 | 0.0 | 0.0 | 0.0 | 17.03 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.03 | 0 | 0 | 102.03 | 0 | 0 | 0 | 102.03 | - And Admin successfully approves the loan on "1 January 2023" with "100" amount and expected disbursement date on "1 January 2023" - And Admin successfully disburse the loan on "1 January 2023" with "100" EUR transaction amount - And Admin does charge-off the loan on "28 February 2023" + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin sets the business date to "15 January 2024" + And Customer makes "AUTOPAY" repayment on "15 January 2024" with 17.01 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2023 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 28 | 01 March 2023 | | 67.02 | 16.57 | 0.43 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2023 | | 50.02 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2023 | | 33.02 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2023 | | 16.02 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2023 | | 0.0 | 16.02 | 0.0 | 0.0 | 0.0 | 16.02 | 0.0 | 0.0 | 0.0 | 16.02 | + | 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 | 31 | 01 February 2024 | | 83.52 | 16.48 | 0.53 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 66.9 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.18 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.36 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 17.01 | 16.35 | 0.1 | 0.0 | 0.0 | 16.45 | 0.0 | 0.0 | 0.0 | 16.45 | + | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01| 17.01 | 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 | 1.5 | 0 | 0 | 101.5 | 17.01| 17.01 | 0 | 84.49 | + When Admin sets the business date to "29 February 2024" + And Admin does charge-off the loan on "29 February 2024" + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.52 | 16.48 | 0.53 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 66.98 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 49.97 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 32.96 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 17.01 | 15.95 | 0.0 | 0.0 | 0.0 | 15.95 | 0.0 | 0.0 | 0.0 | 15.95 | + | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 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 | 1.02 | 0 | 0 | 101.02 | 0 | 0 | 0 | 101.02 | + | 100 | 1.0 | 0 | 0 | 101.0 | 17.01| 17.01 | 0 | 83.99 | Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | - | 01 January 2023 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | - | 28 February 2023 | Charge-off | 101.02 | 100.0 | 1.02 | 0.0 | 0.0 | 0.0 | + | 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 | + | 15 January 2024 | Repayment | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 82.99 | false | false | + | 29 February 2024 | Charge-off | 83.99 | 82.99 | 1.0 | 0.0 | 0.0 | 0.0 | false | false | + And Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - Scenario: Charge-off in the middle of installment period when loan behaviour is zero-interest and interestRecalculation = false + @TestRailId:C3376 + Scenario: Undo the charge-off when loan behaviour is zero-interest and interestRecalculation = true When Admin sets the business date to "1 March 2023" And Admin creates a client with random data - When Admin creates a new zero charge-off Loan without interest recalculation and with date: "1 January 2023" + When Admin creates a new zero charge-off Loan with interest recalculation and date: "1 January 2023" + And Admin successfully approves the loan on "1 January 2023" with "100" amount and expected disbursement date on "1 January 2023" + And Admin successfully disburse the loan on "1 January 2023" with "100" 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | - | 1 | 31 | 01 February 2023 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 28 | 01 March 2023 | | 67.04 | 16.55 | 0.45 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2023 | | 50.44 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2023 | | 33.73 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2023 | | 16.93 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2023 | | 0.0 | 16.93 | 0.1 | 0.0 | 0.0 | 17.03 | 0.0 | 0.0 | 0.0 | 17.03 | + | | | 01 January 2023 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2023 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 28 | 01 March 2023 | | 67.14 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2023 | | 50.52 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2023 | | 33.8 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2023 | | 16.99 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2023 | | 0.0 | 16.99 | 0.1 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.03 | 0 | 0 | 102.03 | 0 | 0 | 0 | 102.03 | - And Admin successfully approves the loan on "1 January 2023" with "100" amount and expected disbursement date on "1 January 2023" - And Admin successfully disburse the loan on "1 January 2023" with "100" EUR transaction amount + | 100 | 2.14 | 0 | 0 | 102.14 | 0 | 0 | 0 | 102.14 | And Admin does charge-off the loan on "14 February 2023" 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2023 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 28 | 01 March 2023 | | 66.8 | 16.79 | 0.21 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2023 | | 49.8 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2023 | | 32.8 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2023 | | 15.8 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 1 | 31 | 01 February 2023 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 28 | 01 March 2023 | | 66.83 | 16.74 | 0.27 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2023 | | 49.82 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2023 | | 32.81 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2023 | | 15.8 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 6 | 30 | 01 July 2023 | | 0.0 | 15.8 | 0.0 | 0.0 | 0.0 | 15.8 | 0.0 | 0.0 | 0.0 | 15.8 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 0.8 | 0 | 0 | 100.8 | 0 | 0 | 0 | 100.8 | + | 100 | 0.85 | 0 | 0 | 100.85 | 0 | 0 | 0 | 100.85 | Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | | 01 January 2023 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | - | 14 February 2023 | Charge-off | 100.8 | 100.0 | 0.8 | 0.0 | 0.0 | 0.0 | - - Scenario: Charge-off after maturity date when loan behaviour is zero-interest and interestRecalculation = false - When Admin sets the business date to "1 August 2023" - And Admin creates a client with random data - When Admin creates a new zero charge-off Loan without interest recalculation and with date: "1 January 2023" - 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | - | 1 | 31 | 01 February 2023 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 28 | 01 March 2023 | | 67.04 | 16.55 | 0.45 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2023 | | 50.44 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2023 | | 33.73 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2023 | | 16.93 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2023 | | 0.0 | 16.93 | 0.1 | 0.0 | 0.0 | 17.03 | 0.0 | 0.0 | 0.0 | 17.03 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.03 | 0 | 0 | 102.03 | 0 | 0 | 0 | 102.03 | - And Admin successfully approves the loan on "1 January 2023" with "100" amount and expected disbursement date on "1 January 2023" - And Admin successfully disburse the loan on "1 January 2023" with "100" EUR transaction amount - And Admin does charge-off the loan on "15 July 2023" + | 14 February 2023 | Charge-off | 100.85 | 100.0 | 0.85 | 0.0 | 0.0 | 0.0 | + And Admin does a charge-off undo the loan 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2023 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 28 | 01 March 2023 | | 67.04 | 16.55 | 0.45 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2023 | | 50.44 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2023 | | 33.73 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2023 | | 16.93 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2023 | | 0.0 | 16.93 | 0.1 | 0.0 | 0.0 | 17.03 | 0.0 | 0.0 | 0.0 | 17.03 | + | 1 | 31 | 01 February 2023 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 28 | 01 March 2023 | | 67.14 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2023 | | 50.52 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2023 | | 33.8 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2023 | | 16.99 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2023 | | 0.0 | 16.99 | 0.1 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.03 | 0 | 0 | 102.03 | 0 | 0 | 0 | 102.03 | + | 100 | 2.14 | 0 | 0 | 102.14 | 0 | 0 | 0 | 102.14 | Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | | 01 January 2023 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | - | 15 July 2023 | Charge-off | 102.03 | 100.0 | 2.03 | 0.0 | 0.0 | 0.0 | + | 14 February 2023 | Charge-off | 100.85 | 100.0 | 0.85 | 0.0 | 0.0 | 0.0 | - Scenario: Charge-off when charge is added before the charge-off date, loan behaviour is zero-interest and interestRecalculation = false - When Admin sets the business date to "1 January 2023" - And Admin creates a client with random data - When Admin creates a new zero charge-off Loan without interest recalculation and with date: "1 January 2023" + @TestRailId:C3352 @AdvancedPaymentAllocation + Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when charge-off occurs on due date + 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | - | 1 | 31 | 01 February 2023 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 28 | 01 March 2023 | | 67.04 | 16.55 | 0.45 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2023 | | 50.44 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2023 | | 33.73 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2023 | | 16.93 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2023 | | 0.0 | 16.93 | 0.1 | 0.0 | 0.0 | 17.03 | 0.0 | 0.0 | 0.0 | 17.03 | + | 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 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.03 | 0 | 0 | 102.03 | 0 | 0 | 0 | 102.03 | - And Admin successfully approves the loan on "1 January 2023" with "100" amount and expected disbursement date on "1 January 2023" - And Admin successfully disburse the loan on "1 January 2023" with "100" EUR transaction amount - When Admin adds "LOAN_SNOOZE_FEE" due date charge with "27 February 2023" due date and 3 EUR transaction amount - When Admin sets the business date to "28 February 2023" - And Admin does charge-off the loan on "28 February 2023" + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + 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 | + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2023 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 28 | 01 March 2023 | | 67.02 | 16.57 | 0.43 | 3.0 | 0.0 | 20.0 | 0.0 | 0.0 | 0.0 | 20.0 | - | 3 | 31 | 01 April 2023 | | 50.02 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2023 | | 33.02 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2023 | | 16.02 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2023 | | 0.0 | 16.02 | 0.0 | 0.0 | 0.0 | 16.02 | 0.0 | 0.0 | 0.0 | 16.02 | + | 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 1.02 | 3.0 | 0 | 104.02 | 0 | 0 | 0 | 104.02 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | - | 01 January 2023 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | - | 28 February 2023 | Charge-off | 104.02 | 100.0 | 1.02 | 3.0 | 0.0 | 0.0 | - - Scenario: Charge-off when charge is added on charge-off date, loan behaviour is zero-interest and interestRecalculation = false - When Admin sets the business date to "1 January 2023" - And Admin creates a client with random data - When Admin creates a new zero charge-off Loan without interest recalculation and with date: "1 January 2023" - 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | - | 1 | 31 | 01 February 2023 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 28 | 01 March 2023 | | 67.04 | 16.55 | 0.45 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2023 | | 50.44 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2023 | | 33.73 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2023 | | 16.93 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2023 | | 0.0 | 16.93 | 0.1 | 0.0 | 0.0 | 17.03 | 0.0 | 0.0 | 0.0 | 17.03 | + | 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + When Admin sets the business date to "1 March 2024" + And Admin does charge-off the loan on "1 March 2024" + Then Loan Repayment schedule has 2 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 0.0 | 83.57 | 0.49 | 0.0 | 0.0 | 84.06 | 0.0 | 0.0 | 0.0 | 84.06 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.03 | 0 | 0 | 102.03 | 0 | 0 | 0 | 102.03 | - And Admin successfully approves the loan on "1 January 2023" with "100" amount and expected disbursement date on "1 January 2023" - And Admin successfully disburse the loan on "1 January 2023" with "100" EUR transaction amount - When Admin adds "LOAN_SNOOZE_FEE" due date charge with "28 February 2023" due date and 3 EUR transaction amount - When Admin sets the business date to "28 February 2023" - And Admin does charge-off the loan on "28 February 2023" + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.07 | 0.0 | 0.0 | 101.07 | 17.01 | 0.0 | 0.0 | 84.06 | + 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Charge-off | 84.06 | 83.57 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | + When Admin sets the business date to "1 March 2024" + And Admin does a charge-off undo the loan 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2023 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 28 | 01 March 2023 | | 67.02 | 16.57 | 0.43 | 3.0 | 0.0 | 20.0 | 0.0 | 0.0 | 0.0 | 20.0 | - | 3 | 31 | 01 April 2023 | | 50.02 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2023 | | 33.02 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2023 | | 16.02 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2023 | | 0.0 | 16.02 | 0.0 | 0.0 | 0.0 | 16.02 | 0.0 | 0.0 | 0.0 | 16.02 | + | 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 1.02 | 3.0 | 0 | 104.02 | 0 | 0 | 0 | 104.02 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | - | 01 January 2023 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | - | 28 February 2023 | Charge-off | 104.02 | 100.0 | 1.02 | 3.0 | 0.0 | 0.0 | + | 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Charge-off | 84.06 | 83.57 | 0.49 | 0.0 | 0.0 | 0.0 | true | false | - Scenario: Charge-off when charge is added after the charge off date, loan behaviour is zero-interest and interestRecalculation = false - When Admin sets the business date to "1 January 2023" - And Admin creates a client with random data - When Admin creates a new zero charge-off Loan without interest recalculation and with date: "1 January 2023" + @TestRailId:C3353 @AdvancedPaymentAllocation + Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when charge-off occurs before installment date + 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | - | 1 | 31 | 01 February 2023 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 28 | 01 March 2023 | | 67.04 | 16.55 | 0.45 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2023 | | 50.44 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2023 | | 33.73 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2023 | | 16.93 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2023 | | 0.0 | 16.93 | 0.1 | 0.0 | 0.0 | 17.03 | 0.0 | 0.0 | 0.0 | 17.03 | + | 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 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.03 | 0 | 0 | 102.03 | 0 | 0 | 0 | 102.03 | - And Admin successfully approves the loan on "1 January 2023" with "100" amount and expected disbursement date on "1 January 2023" - And Admin successfully disburse the loan on "1 January 2023" with "100" EUR transaction amount - When Admin adds "LOAN_SNOOZE_FEE" due date charge with "1 March 2023" due date and 3 EUR transaction amount - When Admin sets the business date to "28 February 2023" - And Admin does charge-off the loan on "28 February 2023" + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + 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 | + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2023 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 28 | 01 March 2023 | | 67.02 | 16.57 | 0.43 | 3.0 | 0.0 | 20.0 | 0.0 | 0.0 | 0.0 | 20.0 | - | 3 | 31 | 01 April 2023 | | 50.02 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2023 | | 33.02 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2023 | | 16.02 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2023 | | 0.0 | 16.02 | 0.0 | 0.0 | 0.0 | 16.02 | 0.0 | 0.0 | 0.0 | 16.02 | + | 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 1.02 | 3.0 | 0 | 104.02 | 0 | 0 | 0 | 104.02 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | - | 01 January 2023 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | - | 28 February 2023 | Charge-off | 104.02 | 100.0 | 1.02 | 3.0 | 0.0 | 0.0 | + | 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + When Admin sets the business date to "29 February 2024" + And Admin does charge-off the loan on "29 February 2024" + Then Loan Repayment schedule has 2 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 28 | 29 February 2024 | | 0.0 | 83.57 | 0.47 | 0.0 | 0.0 | 84.04 | 0.0 | 0.0 | 0.0 | 84.04 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.05 | 0.0 | 0.0 | 101.05 | 17.01 | 0.0 | 0.0 | 84.04 | + 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | false | - Scenario: Undo the charge-off when loan behaviour is zero-interest and interestRecalculation = false - When Admin sets the business date to "1 March 2023" - And Admin creates a client with random data - When Admin creates a new zero charge-off Loan without interest recalculation and with date: "1 January 2023" + @TestRailId:C3354 @AdvancedPaymentAllocation + Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when charge-off occurs in the middle of installment period + 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | - | 1 | 31 | 01 February 2023 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 28 | 01 March 2023 | | 67.04 | 16.55 | 0.45 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2023 | | 50.44 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2023 | | 33.73 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2023 | | 16.93 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2023 | | 0.0 | 16.93 | 0.1 | 0.0 | 0.0 | 17.03 | 0.0 | 0.0 | 0.0 | 17.03 | + | 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 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.03 | 0 | 0 | 102.03 | 0 | 0 | 0 | 102.03 | - And Admin successfully approves the loan on "1 January 2023" with "100" amount and expected disbursement date on "1 January 2023" - And Admin successfully disburse the loan on "1 January 2023" with "100" EUR transaction amount - And Admin does charge-off the loan on "14 February 2023" + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + 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 | + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2023 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 28 | 01 March 2023 | | 66.8 | 16.79 | 0.21 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2023 | | 49.8 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2023 | | 32.8 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2023 | | 15.8 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2023 | | 0.0 | 15.8 | 0.0 | 0.0 | 0.0 | 15.8 | 0.0 | 0.0 | 0.0 | 15.8 | + | 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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.8 | 0 | 0 | 100.8 | 0 | 0 | 0 | 100.8 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | - | 01 January 2023 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | - | 14 February 2023 | Charge-off | 100.8 | 100.0 | 0.8 | 0.0 | 0.0 | 0.0 | - And Admin does a charge-off undo the loan - 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2023 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 28 | 01 March 2023 | | 67.04 | 16.55 | 0.45 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2023 | | 50.44 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2023 | | 33.73 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2023 | | 16.93 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2023 | | 0.0 | 16.93 | 0.1 | 0.0 | 0.0 | 17.03 | 0.0 | 0.0 | 0.0 | 17.03 | + | 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + When Admin sets the business date to "14 February 2024" + And Admin does charge-off the loan on "14 February 2024" + Then Loan Repayment schedule has 2 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 13 | 14 February 2024 | | 0.0 | 83.57 | 0.22 | 0.0 | 0.0 | 83.79 | 0.0 | 0.0 | 0.0 | 83.79 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.03 | 0 | 0 | 102.03 | 0 | 0 | 0 | 102.03 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 0.8 | 0.0 | 0.0 | 100.8 | 17.01 | 0.0 | 0.0 | 83.79 | Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | - | 01 January 2023 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | - | 14 February 2023 | Charge-off | 100.8 | 100.0 | 0.8 | 0.0 | 0.0 | 0.0 | + | 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 14 February 2024 | Charge-off | 83.79 | 83.57 | 0.22 | 0.0 | 0.0 | 0.0 | false | false | - Scenario: Charge-off on due date when loan behaviour is zero-interest and interestRecalculation = false - repayment after charge off - When Admin sets the business date to "1 January 2024" - And Admin creates a client with random data - When Admin creates a new zero charge-off Loan without interest recalculation and with date: "1 January 2024" - 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | - | 1 | 31 | 01 February 2024 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.04 | 0 | 0 | 102.04 | 0 | 0 | 0 | 102.04 | - And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" - And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount - When Admin sets the business date to "1 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.00 EUR transaction amount + @TestRailId:C3355 @AdvancedPaymentAllocation + Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when charge-off occurs after maturity date + Given Global configuration "is-principal-compounding-disabled-for-overdue-loans" is enabled + 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | + | 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 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.04 | 0 | 0 | 102.04 | 17.0 | 0 | 0 | 85.04 | - When Admin sets the business date to "29 February 2024" - And Admin does charge-off the loan on "29 February 2024" - 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.03 | 16.56 | 0.44 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.03 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.03 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.03 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.03 | 0.0 | 0.0 | 0.0 | 16.03 | 0.0 | 0.0 | 0.0 | 16.03 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 1.03 | 0 | 0 | 101.03 | 17.0 | 0 | 0 | 84.03 | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | 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 | - | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - | 29 February 2024 | Charge-off | 84.03 | 83.59 | 0.44 | 0.0 | 0.0 | 0.0 | false | false | -# ----- repayment after charge off on 1st March ----- # + | 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 | + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount When Admin sets the business date to "01 March 2024" - And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.00 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR transaction amount + When Admin sets the business date to "01 April 2024" + And Customer makes "AUTOPAY" repayment on "01 April 2024" with 17.01 EUR transaction amount + When Admin sets the business date to "01 May 2024" + And Customer makes "AUTOPAY" repayment on "01 May 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.03 | 16.56 | 0.44 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | | 50.03 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.03 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.03 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.03 | 0.0 | 0.0 | 0.0 | 16.03 | 0.0 | 0.0 | 0.0 | 16.03 | + | 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 1.03 | 0 | 0 | 101.03 | 34.0 | 0 | 0 | 67.03 | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 68.04 | 0.0 | 0.0 | 34.01 | 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 | - | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - | 29 February 2024 | Charge-off | 84.03 | 83.59 | 0.44 | 0.0 | 0.0 | 0.0 | false | false | - | 01 March 2024 | Repayment | 17.0 | 16.56 | 0.44 | 0.0 | 0.0 | 67.03 | false | false | - - @PS-2137-s5 - Scenario: Charge-off on due date when loan behaviour is zero-interest and interestRecalculation = false - charge off after one installment is overdue (31st March) - When Admin sets the business date to "1 January 2024" - And Admin creates a client with random data - When Admin creates a new zero charge-off Loan without interest recalculation and with date: "1 January 2024" - 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | - | 1 | 31 | 01 February 2024 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.04 | 0 | 0 | 102.04 | 0 | 0 | 0 | 102.04 | - And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" - And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount - When Admin sets the business date to "1 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.00 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.04 | 0 | 0 | 102.04 | 17.0 | 0 | 0 | 85.04 | - When Admin sets the business date to "31 March 2024" - And Admin does charge-off the loan on "31 March 2024" + | 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | + | 01 April 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 50.43 | false | false | + | 01 May 2024 | Repayment | 17.01 | 16.72 | 0.29 | 0.0 | 0.0 | 33.71 | false | false | + When Admin sets the business date to "15 July 2024" + And Admin does charge-off the loan on "15 July 2024" 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.44 | 16.61 | 0.39 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.44 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.44 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.44 | 0.0 | 0.0 | 0.0 | 16.44 | 0.0 | 0.0 | 0.0 | 16.44 | + | 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.2 | 0.0 | 0.0 | 17.1 | 0.0 | 0.0 | 0.0 | 17.1 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 1.44 | 0 | 0 | 101.44 | 17.0 | 0 | 0 | 84.44 | + | 100.0 | 2.15 | 0.0 | 0.0 | 102.15 | 68.04 | 0.0 | 0.0 | 34.11 | 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 | - | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - | 31 March 2024 | Charge-off | 84.44 | 83.59 | 0.85 | 0.0 | 0.0 | 0.0 | false | false | + | 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | + | 01 April 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 50.43 | false | false | + | 01 May 2024 | Repayment | 17.01 | 16.72 | 0.29 | 0.0 | 0.0 | 33.71 | false | false | + | 15 July 2024 | Charge-off | 34.11 | 33.71 | 0.4 | 0.0 | 0.0 | 0.0 | false | false | + Given Global configuration "is-principal-compounding-disabled-for-overdue-loans" is disabled - @PS-2137-s6 - Scenario: Charge-off on due date when loan behaviour is zero-interest and interestRecalculation = false - backdated repayment - When Admin sets the business date to "1 January 2024" - And Admin creates a client with random data - When Admin creates a new zero charge-off Loan without interest recalculation and with date: "1 January 2024" + @TestRailId:C3356 @AdvancedPaymentAllocation + Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when charge-off occurs after one installment is overdue + 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | - | 1 | 31 | 01 February 2024 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | + | 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 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.04 | 0 | 0 | 102.04 | 0 | 0 | 0 | 102.04 | - And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" - And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount - When Admin sets the business date to "1 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.00 EUR transaction amount + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + 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 | + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | + | 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.04 | 0 | 0 | 102.04 | 17.0 | 0 | 0 | 85.04 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | When Admin sets the business date to "31 March 2024" And Admin does charge-off the loan on "31 March 2024" - 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.44 | 16.61 | 0.39 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.44 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.44 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.44 | 0.0 | 0.0 | 0.0 | 16.44 | 0.0 | 0.0 | 0.0 | 16.44 | + 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 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 30 | 31 March 2024 | | 0.0 | 67.05 | 0.47 | 0.0 | 0.0 | 67.52 | 0.0 | 0.0 | 0.0 | 67.52 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 1.44 | 0 | 0 | 101.44 | 17.0 | 0 | 0 | 84.44 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.54 | 0.0 | 0.0 | 101.54 | 17.01 | 0.0 | 0.0 | 84.53 | 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 | - | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - | 31 March 2024 | Charge-off | 84.44 | 83.59 | 0.85 | 0.0 | 0.0 | 0.0 | false | false | -# ----- backdated repayment on 1 March made on 31 March ----- # - And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.00 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | | 50.44 | 16.61 | 0.39 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.44 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.44 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.44 | 0.0 | 0.0 | 0.0 | 16.44 | 0.0 | 0.0 | 0.0 | 16.44 | + | 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 31 March 2024 | Charge-off | 84.53 | 83.57 | 0.96 | 0.0 | 0.0 | 0.0 | false | false | + When Admin sets the business date to "02 April 2024" + When Admin runs inline COB job for Loan + Then Loan has 17.01 total overdue 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 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 30 | 31 March 2024 | | 0.0 | 67.05 | 0.47 | 0.0 | 0.0 | 67.52 | 0.0 | 0.0 | 0.0 | 67.52 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 1.44 | 0 | 0 | 101.44 | 34.0 | 0 | 0 | 67.44 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.54 | 0.0 | 0.0 | 101.54 | 17.01 | 0.0 | 0.0 | 84.53 | 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 | - | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - | 01 March 2024 | Repayment | 17.0 | 16.54 | 0.46 | 0.0 | 0.0 | 67.05 | false | false | - | 31 March 2024 | Charge-off | 67.44 | 67.05 | 0.39 | 0.0 | 0.0 | 0.0 | false | true | + | 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 31 March 2024 | Charge-off | 84.53 | 83.57 | 0.96 | 0.0 | 0.0 | 0.0 | false | false | - @PS-2137-s11 - Scenario: Charge-off on due date when loan behaviour is zero-interest and interestRecalculation = false - CBR scenario - When Admin sets the business date to "1 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF_BEHAVIOUR" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - When Admin creates a new zero charge-off Loan without interest recalculation and with date: "1 January 2024" - 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | - | 1 | 31 | 01 February 2024 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.04 | 0 | 0 | 102.04 | 0 | 0 | 0 | 102.04 | - And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" - And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount - When Admin sets the business date to "1 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.00 EUR transaction amount - When Admin sets the business date to "1 March 2024" - And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.00 EUR transaction amount - When Admin sets the business date to "1 April 2024" - And Customer makes "AUTOPAY" repayment on "01 April 2024" with 17.00 EUR transaction amount - When Admin sets the business date to "1 May 2024" - And Customer makes "AUTOPAY" repayment on "01 May 2024" with 17.00 EUR transaction amount - When Admin sets the business date to "1 June 2024" - And Customer makes "AUTOPAY" repayment on "01 June 2024" with 17.00 EUR transaction amount - When Admin sets the business date to "1 July 2024" - And Customer makes "AUTOPAY" repayment on "01 July 2024" with 20.04 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 5 | 31 | 01 June 2024 | 01 June 2024 | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 6 | 30 | 01 July 2024 | 01 July 2024 | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 17.04 | 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 | 2.04 | 0 | 0 | 102.04 | 102.04 | 0 | 0 | 0.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 | - | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - | 01 March 2024 | Repayment | 17.0 | 16.54 | 0.46 | 0.0 | 0.0 | 67.05 | false | false | - | 01 April 2024 | Repayment | 17.0 | 16.6 | 0.4 | 0.0 | 0.0 | 50.45 | false | false | - | 01 May 2024 | Repayment | 17.0 | 16.71 | 0.29 | 0.0 | 0.0 | 33.74 | false | false | - | 01 June 2024 | Repayment | 17.0 | 16.8 | 0.2 | 0.0 | 0.0 | 16.94 | false | false | - | 01 July 2024 | Repayment | 20.04 | 16.94 | 0.1 | 0.0 | 0.0 | 0.0 | false | false | - | 01 July 2024 | Accrual | 2.04 | 0.0 | 2.04 | 0.0 | 0.0 | 0.0 | false | false | - When Admin sets the business date to "2 July 2024" - When Admin makes Credit Balance Refund transaction on "02 July 2024" with 3 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 5 | 31 | 01 June 2024 | 01 June 2024 | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 6 | 30 | 01 July 2024 | 01 July 2024 | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 17.04 | 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 | 2.04 | 0 | 0 | 102.04 | 102.04 | 0 | 0 | 0.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 | - | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - | 01 March 2024 | Repayment | 17.0 | 16.54 | 0.46 | 0.0 | 0.0 | 67.05 | false | false | - | 01 April 2024 | Repayment | 17.0 | 16.6 | 0.4 | 0.0 | 0.0 | 50.45 | false | false | - | 01 May 2024 | Repayment | 17.0 | 16.71 | 0.29 | 0.0 | 0.0 | 33.74 | false | false | - | 01 June 2024 | Repayment | 17.0 | 16.8 | 0.2 | 0.0 | 0.0 | 16.94 | false | false | - | 01 July 2024 | Repayment | 20.04 | 16.94 | 0.1 | 0.0 | 0.0 | 0.0 | false | false | - | 01 July 2024 | Accrual | 2.04 | 0.0 | 2.04 | 0.0 | 0.0 | 0.0 | false | false | - | 02 July 2024 | Credit Balance Refund | 3.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | - When Customer undo "1"th "Repayment" transaction made on "01 July 2024" - Then Loan Repayment schedule has 7 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 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 5 | 31 | 01 June 2024 | 01 June 2024 | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | - | 7 | 1 | 02 July 2024 | | 0.0 | 3.0 | 0.0 | 0.0 | 0.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 | - | 103 | 2.04 | 0 | 0 | 105.04 | 85.0 | 0 | 0 | 20.04 | - 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 | - | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - | 01 March 2024 | Repayment | 17.0 | 16.54 | 0.46 | 0.0 | 0.0 | 67.05 | false | false | - | 01 April 2024 | Repayment | 17.0 | 16.6 | 0.4 | 0.0 | 0.0 | 50.45 | false | false | - | 01 May 2024 | Repayment | 17.0 | 16.71 | 0.29 | 0.0 | 0.0 | 33.74 | false | false | - | 01 June 2024 | Repayment | 17.0 | 16.8 | 0.2 | 0.0 | 0.0 | 16.94 | false | false | - | 01 July 2024 | Repayment | 20.04 | 16.94 | 0.1 | 0.0 | 0.0 | 0.0 | true | false | - | 01 July 2024 | Accrual | 2.04 | 0.0 | 2.04 | 0.0 | 0.0 | 0.0 | false | false | - | 02 July 2024 | Credit Balance Refund | 3.0 | 3.0 | 0.0 | 0.0 | 0.0 | 19.94 | false | true | - When Admin sets the business date to "15 July 2024" - And Admin does charge-off the loan on "15 July 2024" - Then Loan Repayment schedule has 7 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 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 5 | 31 | 01 June 2024 | 01 June 2024 | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | - | 7 | 1 | 02 July 2024 | | 0.0 | 3.0 | 0.0 | 0.0 | 0.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 | - | 103 | 2.04 | 0 | 0 | 105.04 | 85.0 | 0 | 0 | 20.04 | - 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 | - | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - | 01 March 2024 | Repayment | 17.0 | 16.54 | 0.46 | 0.0 | 0.0 | 67.05 | false | false | - | 01 April 2024 | Repayment | 17.0 | 16.6 | 0.4 | 0.0 | 0.0 | 50.45 | false | false | - | 01 May 2024 | Repayment | 17.0 | 16.71 | 0.29 | 0.0 | 0.0 | 33.74 | false | false | - | 01 June 2024 | Repayment | 17.0 | 16.8 | 0.2 | 0.0 | 0.0 | 16.94 | false | false | - | 01 July 2024 | Repayment | 20.04 | 16.94 | 0.1 | 0.0 | 0.0 | 0.0 | true | false | - | 01 July 2024 | Accrual | 2.04 | 0.0 | 2.04 | 0.0 | 0.0 | 0.0 | false | false | - | 02 July 2024 | Credit Balance Refund | 3.0 | 3.0 | 0.0 | 0.0 | 0.0 | 19.94 | false | true | - | 15 July 2024 | Charge-off | 20.04 | 19.94 | 0.1 | 0.0 | 0.0 | 0.0 | false | false | - - @PS-2137-s12 - Scenario: Charge-off on due date when loan behaviour is zero-interest and interestRecalculation = false - adjust to last installment scenario - When Admin sets the business date to "1 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF_BEHAVIOUR" loan product "DEFAULT" transaction type to "LAST_INSTALLMENT" future installment allocation rule - And Admin creates a fully customized loan with the following data: - | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | - | LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF_BEHAVIOUR | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | - | 1 | 31 | 01 February 2024 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.04 | 0 | 0 | 102.04 | 0 | 0 | 0 | 102.04 | - And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" - And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount - When Admin sets the business date to "15 January 2024" - And Customer makes "AUTOPAY" repayment on "15 January 2024" with 17.04 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 17.04 | 17.04 | 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 | 2.04 | 0 | 0 | 102.04 | 17.04 | 17.04 | 0 | 85.0 | - When Admin sets the business date to "29 February 2024" - And Admin does charge-off the loan on "29 February 2024" - 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 29 | 01 March 2024 | | 67.03 | 16.56 | 0.44 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.03 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.03 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.09 | 0.0 | 0.0 | 0.0 | 16.09 | 0.0 | 0.0 | 0.0 | 16.09 | - | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 17.04 | 17.04 | 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 | 1.13 | 0 | 0 | 101.13 | 17.04 | 17.04 | 0 | 84.09 | - 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 | - | 15 January 2024 | Repayment | 17.04 | 16.94 | 0.1 | 0.0 | 0.0 | 83.06 | false | false | - | 29 February 2024 | Charge-off | 84.09 | 83.06 | 1.03 | 0.0 | 0.0 | 0.0 | false | false | - And Admin set "LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF_BEHAVIOUR" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - - @PS-2137-s12 - Scenario: Charge-off on due date when loan behaviour is zero-interest and interestRecalculation = false - adjust to last installment scenario, not fully paid - When Admin sets the business date to "1 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF_BEHAVIOUR" loan product "DEFAULT" transaction type to "LAST_INSTALLMENT" future installment allocation rule - And Admin creates a fully customized loan with the following data: - | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | - | LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF_BEHAVIOUR | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | - | 1 | 31 | 01 February 2024 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.04 | 0 | 0 | 102.04 | 0 | 0 | 0 | 102.04 | - And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" - And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount - When Admin sets the business date to "15 January 2024" - And Customer makes "AUTOPAY" repayment on "15 January 2024" with 17.15 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.11 | 0.11 | 0.0 | 16.89 | - | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 17.04 | 17.04 | 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 | 2.04 | 0 | 0 | 102.04 | 17.15 | 17.15 | 0 | 84.89 | - When Admin sets the business date to "29 February 2024" - And Admin does charge-off the loan on "29 February 2024" - 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 29 | 01 March 2024 | | 67.03 | 16.56 | 0.44 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.03 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.03 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.09 | 0.11 | 0.0 | 0.0 | 16.2 | 0.11 | 0.11 | 0.0 | 16.09 | - | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 17.04 | 17.04 | 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 | 1.24 | 0 | 0 | 101.24 | 17.15 | 17.15 | 0 | 84.09 | - 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 | - | 15 January 2024 | Repayment | 17.15 | 16.94 | 0.21 | 0.0 | 0.0 | 83.06 | false | false | - | 29 February 2024 | Charge-off | 84.09 | 83.06 | 1.03 | 0.0 | 0.0 | 0.0 | false | false | - And Admin set "LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF_BEHAVIOUR" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - - @TestRailId:C3352 @AdvancedPaymentAllocation - Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when charge-off occurs on due date + @TestRailId:C3357 @AdvancedPaymentAllocation + Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when backdated repayment occurs after charge-off + Given Global configuration "is-principal-compounding-disabled-for-overdue-loans" is enabled 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 | + | 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_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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 @@ -3424,47 +3394,51 @@ Feature: Charge-off | 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 | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - When Admin sets the business date to "1 March 2024" - And Admin does charge-off the loan on "1 March 2024" - Then Loan Repayment schedule has 2 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 0.0 | 83.57 | 0.49 | 0.0 | 0.0 | 84.06 | 0.0 | 0.0 | 0.0 | 84.06 | + When Admin sets the business date to "31 March 2024" + And Admin does charge-off the loan on "31 March 2024" + Then Loan Repayment schedule has 3 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 30 | 31 March 2024 | | 0.0 | 67.05 | 0.47 | 0.0 | 0.0 | 67.52 | 0.0 | 0.0 | 0.0 | 67.52 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.07 | 0.0 | 0.0 | 101.07 | 17.01 | 0.0 | 0.0 | 84.06 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.54 | 0.0 | 0.0 | 101.54 | 17.01 | 0.0 | 0.0 | 84.53 | 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 | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Charge-off | 84.06 | 83.57 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | - When Admin sets the business date to "1 March 2024" - And Admin does a charge-off undo the loan - Then Loan Repayment schedule has 6 periods, with the following data for periods: + | 31 March 2024 | Charge-off | 84.53 | 83.57 | 0.96 | 0.0 | 0.0 | 0.0 | false | false | +# --- Backdated repayment --- + And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 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 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + #invalid calculation of loan balance - expected result is | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + #but was + #| 1 | 31 | 01 February 2024 | 01 March 2024 | 66.86 | 33.14 | 0.58 | 0.0 | 0.0 | 33.72 | 33.72 | 0.0 | 16.71 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 30 | 31 March 2024 | | 0.0 | 67.05 | 0.38 | 0.0 | 0.0 | 67.43 | 0.0 | 0.0 | 0.0 | 67.43 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.45 | 0.0 | 0.0 | 101.45 | 34.02 | 0.0 | 0.0 | 67.43 | 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 | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Charge-off | 84.06 | 83.57 | 0.49 | 0.0 | 0.0 | 0.0 | true | false | + | 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | + | 31 March 2024 | Charge-off | 67.43 | 67.05 | 0.38 | 0.0 | 0.0 | 0.0 | false | true | + And Global configuration "is-principal-compounding-disabled-for-overdue-loans" is disabled - @TestRailId:C3353 @AdvancedPaymentAllocation - Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when charge-off occurs before installment date + @TestRailId:C3358 @AdvancedPaymentAllocation + Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when repayment reversal occurs after charge-off + Given Global configuration "is-principal-compounding-disabled-for-overdue-loans" is enabled 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 | + | 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_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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 @@ -3516,13 +3490,32 @@ Feature: Charge-off | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | false | + When Customer undo "1"th repayment on "01 February 2024" + Then Loan Repayment schedule has 2 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 | | | | + #invalid calculation of loan balance - expected result is + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + #but was + #| 1 | 31 | 01 February 2024 | | 50.14 | 49.86 | 0.58 | 0.0 | 0.0 | 50.44 | 0.0 | 0.0 | 0.0 | 50.44 | + | 2 | 28 | 29 February 2024 | | 0.0 | 83.57 | 0.56 | 0.0 | 0.0 | 84.13 | 0.0 | 0.0 | 0.0 | 84.13 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.14 | 0.0 | 0.0 | 101.14 | 0.0 | 0.0 | 0.0 | 101.14 | + 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | true | false | + | 29 February 2024 | Charge-off | 101.14 | 100.0 | 1.14 | 0.0 | 0.0 | 0.0 | false | true | + And Global configuration "is-principal-compounding-disabled-for-overdue-loans" is disabled - @TestRailId:C3354 @AdvancedPaymentAllocation - Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when charge-off occurs in the middle of installment period + @TestRailId:C3359 @AdvancedPaymentAllocation + Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when repayment occurs after charge-off + Given Global configuration "is-principal-compounding-disabled-for-overdue-loans" is enabled 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 | + | 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_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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 @@ -3559,29 +3552,45 @@ Feature: Charge-off | 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 | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - When Admin sets the business date to "14 February 2024" - And Admin does charge-off the loan on "14 February 2024" + When Admin sets the business date to "29 February 2024" + And Admin does charge-off the loan on "29 February 2024" Then Loan Repayment schedule has 2 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 13 | 14 February 2024 | | 0.0 | 83.57 | 0.22 | 0.0 | 0.0 | 83.79 | 0.0 | 0.0 | 0.0 | 83.79 | + | 2 | 28 | 29 February 2024 | | 0.0 | 83.57 | 0.47 | 0.0 | 0.0 | 84.04 | 0.0 | 0.0 | 0.0 | 84.04 | 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.8 | 0.0 | 0.0 | 100.8 | 17.01 | 0.0 | 0.0 | 83.79 | + | 100.0 | 1.05 | 0.0 | 0.0 | 101.05 | 17.01 | 0.0 | 0.0 | 84.04 | 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 | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 14 February 2024 | Charge-off | 83.79 | 83.57 | 0.22 | 0.0 | 0.0 | 0.0 | false | false | + | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | false | + When Admin sets the business date to "01 March 2024" + And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 2 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 28 | 29 February 2024 | | 0.0 | 83.57 | 0.47 | 0.0 | 0.0 | 84.04 | 17.01 | 0.0 | 17.01 | 67.03 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.05 | 0.0 | 0.0 | 101.05 | 34.02 | 0.0 | 17.01 | 67.03 | + 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.54 | 0.47 | 0.0 | 0.0 | 67.03 | false | false | + And Global configuration "is-principal-compounding-disabled-for-overdue-loans" is disabled - @TestRailId:C3355 @AdvancedPaymentAllocation - Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when charge-off occurs after maturity date - Given Global configuration "is-principal-compounding-disabled-for-overdue-loans" is enabled + @Skip @TestRailId:C3360 @AdvancedPaymentAllocation + Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when charge-off occurs with adjustment to last installment 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 | + | 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_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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 @@ -3600,63 +3609,49 @@ Feature: Charge-off 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 | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - When Admin sets the business date to "01 March 2024" - And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR transaction amount - When Admin sets the business date to "01 April 2024" - And Customer makes "AUTOPAY" repayment on "01 April 2024" with 17.01 EUR transaction amount - When Admin sets the business date to "01 May 2024" - And Customer makes "AUTOPAY" repayment on "01 May 2024" with 17.01 EUR transaction amount + When Admin sets the business date to "15 January 2024" + And Customer makes "AUTOPAY" repayment on "15 January 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + #invalid calculation of loan balance - expected result is + | 1 | 31 | 01 February 2024 | 15 January 2024 | 66.51 | 16.48 | 0.53 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + #but was + #| 1 | 31 | 01 February 2024 | 15 January 2024 | 83.25 | 16.75 | 0.26 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 49.89 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 33.17 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 16.35 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 0.0 | 16.35 | 0.1 | 0.0 | 0.0 | 16.45 | 0.0 | 0.0 | 0.0 | 16.45 | + | 6 | 30 | 01 July 2024 | | -17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.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 | 2.05 | 0.0 | 0.0 | 102.05 | 68.04 | 0.0 | 0.0 | 34.01 | + | 100.0 | 1.5 | 0.0 | 0.0 | 101.5 | 17.01 | 0.0 | 0.0 | 84.49 | 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 | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | - | 01 April 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 50.43 | false | false | - | 01 May 2024 | Repayment | 17.01 | 16.72 | 0.29 | 0.0 | 0.0 | 33.71 | false | false | - When Admin sets the business date to "15 July 2024" - And Admin does charge-off the loan on "15 July 2024" - Then Loan Repayment schedule has 6 periods, with the following data for periods: + | 15 January 2024 | Repayment | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 82.99 | false | false | + When Admin sets the business date to "29 February 2024" + And Admin does charge-off the loan on "29 February 2024" + Then Loan Repayment schedule has 2 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.2 | 0.0 | 0.0 | 17.1 | 0.0 | 0.0 | 0.0 | 17.1 | + | 1 | 31 | 01 February 2024 | 15 January 2024 | 83.52 | 16.48 | 0.53 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 28 | 29 February 2024 | | 0.0 | 83.89 | 0.37 | 0.0 | 0.0 | 83.89 | 0.0 | 0.0 | 0.0 | 83.89 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.15 | 0.0 | 0.0 | 102.15 | 68.04 | 0.0 | 0.0 | 34.11 | + | 100.0 | 0.9 | 0.0 | 0.0 | 100.9 | 17.01 | 0.0 | 0.0 | 83.89 | 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 | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | - | 01 April 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 50.43 | false | false | - | 01 May 2024 | Repayment | 17.01 | 16.72 | 0.29 | 0.0 | 0.0 | 33.71 | false | false | - | 15 July 2024 | Charge-off | 34.11 | 33.71 | 0.4 | 0.0 | 0.0 | 0.0 | false | false | - Given Global configuration "is-principal-compounding-disabled-for-overdue-loans" is disabled + | 15 January 2024 | Repayment | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 82.99 | false | false | + | 29 February 2024 | Charge-off | 83.89 | 82.99 | 0.9 | 0.0 | 0.0 | 0.0 | false | false | - @TestRailId:C3356 @AdvancedPaymentAllocation - Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when charge-off occurs after one installment is overdue + @Skip @TestRailId:C3361 @AdvancedPaymentAllocation + Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when charge-off occurs with allocation to last installment with interest allocation change 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 | + | 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_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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 @@ -3693,325 +3688,1381 @@ Feature: Charge-off | 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 | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - When Admin sets the business date to "31 March 2024" - And Admin does charge-off the loan on "31 March 2024" - Then Loan Repayment schedule has 3 periods, with the following data for periods: - | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 30 | 31 March 2024 | | 0.0 | 67.05 | 0.47 | 0.0 | 0.0 | 67.52 | 0.0 | 0.0 | 0.0 | 67.52 | + When Admin sets the business date to "15 February 2024" + And Customer makes "AUTOPAY" repayment on "15 February 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + #invalid calculation of loan balance - expected result is + | 1 | 31 | 01 February 2024 | 01 February 2024 | 66.56 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + #but was + #| 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 February 2024 | 49.94 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 33.32 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 16.40 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 0.05 | 16.35 | 0.1 | 0.0 | 0.0 | 16.45 | 0.0 | 0.0 | 0.0 | 16.45 | + | 6 | 30 | 01 July 2024 | | -16.96 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 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 | 1.54 | 0.0 | 0.0 | 101.54 | 17.01 | 0.0 | 0.0 | 84.53 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | 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 | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 31 March 2024 | Charge-off | 84.53 | 83.57 | 0.96 | 0.0 | 0.0 | 0.0 | false | false | - When Admin sets the business date to "02 April 2024" - When Admin runs inline COB job for Loan - Then Loan has 17.01 total overdue amount + | 15 February 2024 | Repayment | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 66.56 | false | false | + When Admin sets the business date to "29 February 2024" + And Admin does charge-off the loan on "29 February 2024" Then Loan Repayment schedule has 3 periods, with the following data for periods: - | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 30 | 31 March 2024 | | 0.0 | 67.05 | 0.47 | 0.0 | 0.0 | 67.52 | 0.0 | 0.0 | 0.0 | 67.52 | + | 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 28 | 29 February 2024 | | 0.0 | 83.57 | 0.41 | 0.0 | 0.0 | 83.98 | 17.01 | 0.0 | 0.0 | 66.97 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.54 | 0.0 | 0.0 | 101.54 | 17.01 | 0.0 | 0.0 | 84.53 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 0.99 | 0.0 | 0.0 | 100.99 | 17.01 | 0.0 | 0.0 | 83.98 | 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 | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 31 March 2024 | Charge-off | 84.53 | 83.57 | 0.96 | 0.0 | 0.0 | 0.0 | false | false | + | 15 February 2024 | Repayment | 17.01 | 16.79 | 0.22 | 0.0 | 0.0 | 66.78 | false | true | + | 29 February 2024 | Charge-off | 66.97 | 66.78 | 0.47 | 0.19 | 0.0 | 0.0 | false | false | - @TestRailId:C3359 @AdvancedPaymentAllocation - Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when repayment occurs after charge-off - Given Global configuration "is-principal-compounding-disabled-for-overdue-loans" is enabled + @TestRailId:C3362 @AdvancedPaymentAllocation + Scenario: Verify that interest is not recalculated after the loan is charged-off 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_ALLOW_PARTIAL_PERIOD | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 1 | 31 | 01 February 2024 | | 86.02 | 13.98 | 7.0 | 0.0 | 0.0 | 20.98 | 0.0 | 0.0 | 0.0 | 20.98 | + | 2 | 29 | 01 March 2024 | | 71.06 | 14.96 | 6.02 | 0.0 | 0.0 | 20.98 | 0.0 | 0.0 | 0.0 | 20.98 | + | 3 | 31 | 01 April 2024 | | 55.05 | 16.01 | 4.97 | 0.0 | 0.0 | 20.98 | 0.0 | 0.0 | 0.0 | 20.98 | + | 4 | 30 | 01 May 2024 | | 37.92 | 17.13 | 3.85 | 0.0 | 0.0 | 20.98 | 0.0 | 0.0 | 0.0 | 20.98 | + | 5 | 31 | 01 June 2024 | | 19.59 | 18.33 | 2.65 | 0.0 | 0.0 | 20.98 | 0.0 | 0.0 | 0.0 | 20.98 | + | 6 | 30 | 01 July 2024 | | 0.0 | 19.59 | 1.37 | 0.0 | 0.0 | 20.96 | 0.0 | 0.0 | 0.0 | 20.96 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + | 100.0 | 25.86 | 0.0 | 0.0 | 125.86 | 0.0 | 0.0 | 0.0 | 125.86 | 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 | When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 20.98 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 86.02 | 13.98 | 7.0 | 0.0 | 0.0 | 20.98 | 20.98 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 71.06 | 14.96 | 6.02 | 0.0 | 0.0 | 20.98 | 0.0 | 0.0 | 0.0 | 20.98 | + | 3 | 31 | 01 April 2024 | | 55.05 | 16.01 | 4.97 | 0.0 | 0.0 | 20.98 | 0.0 | 0.0 | 0.0 | 20.98 | + | 4 | 30 | 01 May 2024 | | 37.92 | 17.13 | 3.85 | 0.0 | 0.0 | 20.98 | 0.0 | 0.0 | 0.0 | 20.98 | + | 5 | 31 | 01 June 2024 | | 19.59 | 18.33 | 2.65 | 0.0 | 0.0 | 20.98 | 0.0 | 0.0 | 0.0 | 20.98 | + | 6 | 30 | 01 July 2024 | | 0.0 | 19.59 | 1.37 | 0.0 | 0.0 | 20.96 | 0.0 | 0.0 | 0.0 | 20.96 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + | 100.0 | 25.86 | 0.0 | 0.0 | 125.86 | 20.98 | 0.0 | 0.0 | 104.88 | 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 | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - When Admin sets the business date to "29 February 2024" - And Admin does charge-off the loan on "29 February 2024" - Then Loan Repayment schedule has 2 periods, with the following data for periods: + | 01 February 2024 | Repayment | 20.98 | 13.98 | 7.0 | 0.0 | 0.0 | 86.02 | false | false | + When Admin sets the business date to "16 March 2024" + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 28 | 29 February 2024 | | 0.0 | 83.57 | 0.47 | 0.0 | 0.0 | 84.04 | 0.0 | 0.0 | 0.0 | 84.04 | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 86.02 | 13.98 | 7.0 | 0.0 | 0.0 | 20.98 | 20.98 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 71.06 | 14.96 | 6.02 | 0.0 | 0.0 | 20.98 | 0.0 | 0.0 | 0.0 | 20.98 | + | 3 | 31 | 01 April 2024 | | 55.05 | 16.01 | 4.97 | 0.0 | 0.0 | 20.98 | 0.0 | 0.0 | 0.0 | 20.98 | + | 4 | 30 | 01 May 2024 | | 37.92 | 17.13 | 3.85 | 0.0 | 0.0 | 20.98 | 0.0 | 0.0 | 0.0 | 20.98 | + | 5 | 31 | 01 June 2024 | | 19.59 | 18.33 | 2.65 | 0.0 | 0.0 | 20.98 | 0.0 | 0.0 | 0.0 | 20.98 | + | 6 | 30 | 01 July 2024 | | 0.0 | 19.59 | 1.37 | 0.0 | 0.0 | 20.96 | 0.0 | 0.0 | 0.0 | 20.96 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.05 | 0.0 | 0.0 | 101.05 | 17.01 | 0.0 | 0.0 | 84.04 | + | 100.0 | 25.86 | 0.0 | 0.0 | 125.86 | 20.98 | 0.0 | 0.0 | 104.88 | 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 | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | false | - When Admin sets the business date to "01 March 2024" - And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 2 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 28 | 29 February 2024 | | 0.0 | 83.57 | 0.47 | 0.0 | 0.0 | 84.04 | 17.01 | 0.0 | 17.01 | 67.03 | + | 01 February 2024 | Repayment | 20.98 | 13.98 | 7.0 | 0.0 | 0.0 | 86.02 | false | false | + When Admin sets the business date to "02 April 2024" + And Admin does charge-off the loan on "02 April 2024" + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 86.02 | 13.98 | 7.0 | 0.0 | 0.0 | 20.98 | 20.98 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 71.06 | 14.96 | 6.02 | 0.0 | 0.0 | 20.98 | 0.0 | 0.0 | 0.0 | 20.98 | + | 3 | 31 | 01 April 2024 | | 56.1 | 14.96 | 6.02 | 0.0 | 0.0 | 20.98 | 0.0 | 0.0 | 0.0 | 20.98 | + | 4 | 30 | 01 May 2024 | | 41.14 | 14.96 | 6.02 | 0.0 | 0.0 | 20.98 | 0.0 | 0.0 | 0.0 | 20.98 | + | 5 | 31 | 01 June 2024 | | 23.04 | 18.1 | 2.88 | 0.0 | 0.0 | 20.98 | 0.0 | 0.0 | 0.0 | 20.98 | + | 6 | 30 | 01 July 2024 | | 0.0 | 23.04 | 1.61 | 0.0 | 0.0 | 24.65 | 0.0 | 0.0 | 0.0 | 24.65 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.05 | 0.0 | 0.0 | 101.05 | 34.02 | 0.0 | 17.01 | 67.03 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 29.55 | 0.0 | 0.0 | 129.55 | 20.98 | 0.0 | 0.0 | 108.57 | 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 | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | false | - | 01 March 2024 | Repayment | 17.01 | 16.54 | 0.47 | 0.0 | 0.0 | 67.03 | false | false | - And Global configuration "is-principal-compounding-disabled-for-overdue-loans" is disabled + | 01 February 2024 | Repayment | 20.98 | 13.98 | 7.0 | 0.0 | 0.0 | 86.02 | false | false | + | 02 April 2024 | Charge-off | 108.57 | 86.02 | 22.55 | 0.0 | 0.0 | 0.0 | false | false | - @TestRailId:C3358 @AdvancedPaymentAllocation - Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when repayment reversal occurs after charge-off - Given Global configuration "is-principal-compounding-disabled-for-overdue-loans" is enabled - 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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 + @TestRailId:C3363 + Scenario: Charge-off on due date when loan behavior is zero-interest with interestRecalculation disabled - UC1 + When Admin sets the business date to "1 January 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - 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 | - When Admin sets the business date to "01 February 2024" + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin sets the business date to "1 February 2024" And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 17.01| 0 | 0 | 85.04 | + When Admin sets the business date to "1 March 2024" + And Admin does charge-off the loan on "1 March 2024" + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.04 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.03 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.02 | 0.0 | 0.0 | 0.0 | 16.02 | 0.0 | 0.0 | 0.0 | 16.02 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 1.07 | 0 | 0 | 101.07 | 17.01| 0 | 0 | 84.06 | 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 | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Charge-off | 84.06 | 83.57 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | + + @TestRailId:C3364 + Scenario: Charge-off after installment date when loan behavior is zero-interest with interestRecalculation disabled - UC2 + When Admin sets the business date to "1 January 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin sets the business date to "1 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 17.01| 0 | 0 | 85.04 | When Admin sets the business date to "29 February 2024" And Admin does charge-off the loan on "29 February 2024" - Then Loan Repayment schedule has 2 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 28 | 29 February 2024 | | 0.0 | 83.57 | 0.47 | 0.0 | 0.0 | 84.04 | 0.0 | 0.0 | 0.0 | 84.04 | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.03 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.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 | 1.05 | 0.0 | 0.0 | 101.05 | 17.01 | 0.0 | 0.0 | 84.04 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 1.05 | 0 | 0 | 101.05 | 17.01| 0 | 0 | 84.04 | 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 | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | false | - When Customer undo "1"th repayment on "01 February 2024" - Then Loan Repayment schedule has 2 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 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 28 | 29 February 2024 | | 0.0 | 83.57 | 0.56 | 0.0 | 0.0 | 84.13 | 0.0 | 0.0 | 0.0 | 84.13 | + | 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | false | + + @TestRailId:C3365 + Scenario: Charge-off in the middle of installment period when loan behavior is zero-interest with interestRecalculation disabled - UC3 + When Admin sets the business date to "1 January 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin sets the business date to "1 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 17.01| 0 | 0 | 85.04 | + When Admin sets the business date to "14 February 2024" + And Admin does charge-off the loan on "14 February 2024" + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 66.78 | 16.79 | 0.22 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 49.77 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 32.76 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 15.75 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 15.75 | 0.0 | 0.0 | 0.0 | 15.75 | 0.0 | 0.0 | 0.0 | 15.75 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 0.8 | 0 | 0 | 100.8 | 17.01| 0 | 0 | 83.79 | + 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 14 February 2024 | Charge-off | 83.79 | 83.57 | 0.22 | 0.0 | 0.0 | 0.0 | false | false | + + @TestRailId:C3366 + Scenario: Charge-off after maturity date when loan behavior is zero-interest with interestRecalculation disabled - UC4 + When Admin sets the business date to "1 January 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin sets the business date to "1 May 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 April 2024" with 17.01 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 May 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 68.04 | 0 | 0 | 34.01 | + When Admin sets the business date to "15 July 2024" + And Admin does charge-off the loan on "15 July 2024" + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 68.04| 0 | 0 | 34.01 | + 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | + | 01 April 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 50.43 | false | false | + | 01 May 2024 | Repayment | 17.01 | 16.72 | 0.29 | 0.0 | 0.0 | 33.71 | false | false | + | 15 July 2024 | Charge-off | 34.01 | 33.71 | 0.3 | 0.0 | 0.0 | 0.0 | false | false | + + @TestRailId:C3367 + Scenario: Charge-off after one installment is overdue when loan behavior is zero-interest and interestRecalculation disabled - UC5 + When Admin sets the business date to "1 January 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin sets the business date to "1 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 17.01| 0 | 0 | 85.04 | + When Admin sets the business date to "31 March 2024" + And Admin does charge-off the loan on "31 March 2024" + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.42 | 16.63 | 0.38 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.41 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.4 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.4 | 0.0 | 0.0 | 0.0 | 16.4 | 0.0 | 0.0 | 0.0 | 16.4 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 1.45 | 0 | 0 | 101.45 | 17.01 | 0 | 0 | 84.44 | + 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 31 March 2024 | Charge-off | 84.44 | 83.57 | 0.87 | 0.0 | 0.0 | 0.0 | false | false | + + @TestRailId:C3368 + Scenario: Charge-off with backdated repayment when loan behavior is zero-interest with interestRecalculation disabled - UC6 + When Admin sets the business date to "1 January 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin sets the business date to "1 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 17.01| 0 | 0 | 85.04 | + When Admin sets the business date to "31 March 2024" + And Admin does charge-off the loan on "31 March 2024" + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.42 | 16.63 | 0.38 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.41 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.4 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.4 | 0.0 | 0.0 | 0.0 | 16.4 | 0.0 | 0.0 | 0.0 | 16.4 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 1.45 | 0 | 0 | 101.45 | 17.01 | 0 | 0 | 84.44 | + 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 31 March 2024 | Charge-off | 84.44 | 83.57 | 0.87 | 0.0 | 0.0 | 0.0 | false | false | +# ----- backdated repayment on 1 March made on 31 March ----- # + And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | | 50.42 | 16.63 | 0.38 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.41 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.4 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.4 | 0.0 | 0.0 | 0.0 | 16.4 | 0.0 | 0.0 | 0.0 | 16.4 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 1.45 | 0 | 0 | 101.45 | 34.02 | 0 | 0 | 67.43 | + 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | + | 31 March 2024 | Charge-off | 67.43 | 67.05 | 0.38 | 0.0 | 0.0 | 0.0 | false | true | + + @TestRailId:C3369 + Scenario: Charge-off with reversal afterwards when loan behavior is zero-interest with interestRecalculation disabled - UC7 + When Admin sets the business date to "1 January 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin sets the business date to "1 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 17.01| 0 | 0 | 85.04 | + When Admin sets the business date to "29 February 2024" + And Admin does charge-off the loan on "29 February 2024" + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.03 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 1.05 | 0 | 0 | 101.05 | 17.01 | 0 | 0 | 84.04 | + 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | false | +# ----- repayment reversal of 1st February ----- # + When Customer undo "1"th "Repayment" transaction made on "01 February 2024" + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.03 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 1.05 | 0 | 0 | 101.05 | 0.0 | 0 | 0 | 101.05 | + 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | true | false | + | 29 February 2024 | Charge-off | 101.05 | 100.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | true | + And In Loan Transactions the "2"th Transaction has Transaction type="Repayment" and is reverted + + @TestRailId:C3370 + Scenario: Charge-off with repayment afterwards when loan behavior is zero-interest and interestRecalculation disabled - UC8 + When Admin sets the business date to "1 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin sets the business date to "1 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 17.01| 0 | 0 | 85.04 | + When Admin sets the business date to "29 February 2024" + And Admin does charge-off the loan on "29 February 2024" + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.03 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 1.05 | 0 | 0 | 101.05 | 17.01 | 0 | 0 | 84.04 | + 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | false | +# ----- repayment after charge off on 1st March ----- # + When Admin sets the business date to "1 March 2024" + And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.03 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 1.05 | 0 | 0 | 101.05 | 34.02 | 0 | 0 | 67.03 | + 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.54 | 0.47 | 0.0 | 0.0 | 67.03 | false | false | + + @TestRailId:C3371 + Scenario: Charge-off with charge that added before the charge off date when loan behavior is zero-interest with interestRecalculation disabled - UC9.1 + When Admin sets the business date to "1 January 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin sets the business date to "1 February 2024" + When Admin adds "LOAN_SNOOZE_FEE" due date charge with "01 February 2024" due date and 5 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 22.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 5.0 | 0.0 | 22.01 | 22.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 5.0 | 0 | 107.05 | 22.01| 0 | 0 | 85.04 | + When Admin sets the business date to "28 February 2024" + When Admin adds "LOAN_SNOOZE_FEE" due date charge with "28 February 2024" due date and 3 EUR transaction amount + When Admin sets the business date to "29 February 2024" + And Admin does charge-off the loan on "29 February 2024" + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 5.0 | 0.0 | 22.01 | 22.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.03 | 16.54 | 0.47 | 3.0 | 0.0 | 20.01 | 0.0 | 0.0 | 0.0 | 20.01 | + | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 1.05 | 8.0 | 0 | 109.05 | 22.01| 0 | 0 | 87.04 | + 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 | + | 01 February 2024 | Repayment | 22.01 | 16.43 | 0.58 | 5.0 | 0.0 | 83.57 | false | false | + | 29 February 2024 | Charge-off | 87.04 | 83.57 | 0.47 | 3.0 | 0.0 | 0.0 | false | false | + + @TestRailId:C3372 + Scenario: Charge-off with charge that added as on charge off date when loan behavior is zero-interest with interestRecalculation disabled - UC9.2 + When Admin sets the business date to "1 January 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin sets the business date to "1 February 2024" + When Admin adds "LOAN_SNOOZE_FEE" due date charge with "01 February 2024" due date and 5 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 22.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 5.0 | 0.0 | 22.01 | 22.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 5.0 | 0 | 107.05 | 22.01| 0 | 0 | 85.04 | + When Admin sets the business date to "29 February 2024" + When Admin adds "LOAN_SNOOZE_FEE" due date charge with "29 February 2024" due date and 3 EUR transaction amount + And Admin does charge-off the loan on "29 February 2024" + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 5.0 | 0.0 | 22.01 | 22.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.03 | 16.54 | 0.47 | 3.0 | 0.0 | 20.01 | 0.0 | 0.0 | 0.0 | 20.01 | + | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 1.05 | 8.0 | 0 | 109.05 | 22.01| 0 | 0 | 87.04 | + 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 | + | 01 February 2024 | Repayment | 22.01 | 16.43 | 0.58 | 5.0 | 0.0 | 83.57 | false | false | + | 29 February 2024 | Charge-off | 87.04 | 83.57 | 0.47 | 3.0 | 0.0 | 0.0 | false | false | + + @TestRailId:C3373 + Scenario: Charge-off with charge waive is added after the charge off date when loan behavior is zero-interest with interestRecalculation disabled - UC9.3 + When Admin sets the business date to "1 January 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin sets the business date to "1 February 2024" + When Admin adds "LOAN_SNOOZE_FEE" due date charge with "01 February 2024" due date and 5 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 22.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 5.0 | 0.0 | 22.01 | 22.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 5.0 | 0 | 107.05 | 22.01| 0 | 0 | 85.04 | + When Admin sets the business date to "29 February 2024" + When Admin adds "LOAN_SNOOZE_FEE" due date charge with "05 March 2024" due date and 3 EUR transaction amount + And Admin does charge-off the loan on "29 February 2024" + And Admin waives charge + 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 | Waived | Outstanding | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 5.0 | 0.0 | 22.01 | 22.01| 0.0 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.03 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 3.0 | 0.0 | 20.01 | 0.0 | 0.0 | 0.0 | 3.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 0.0 | 16.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Waived | Outstanding | + | 100 | 1.05 | 8.0 | 0 | 109.05 | 22.01| 0 | 0 | 3.0 | 84.04 | + 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 | + | 01 February 2024 | Repayment | 22.01 | 16.43 | 0.58 | 5.0 | 0.0 | 83.57 | false | false | + | 29 February 2024 | Waive loan charges | 3.0 | 0.0 | 0.0 | 0.0 | 0.0 | 83.57 | false | false | + | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | true | + + @TestRailId:C3414 + Scenario: Charge-off with charge is added after the charge off date when loan behavior is zero-interest with interestRecalculation disabled - UC9.4 + When Admin sets the business date to "1 January 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin sets the business date to "1 February 2024" + When Admin adds "LOAN_SNOOZE_FEE" due date charge with "01 February 2024" due date and 5 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 22.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 5.0 | 0.0 | 22.01 | 22.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 5.0 | 0 | 107.05 | 22.01| 0 | 0 | 85.04 | + When Admin sets the business date to "29 February 2024" + When Admin adds "LOAN_SNOOZE_FEE" due date charge with "05 March 2024" due date and 3 EUR transaction amount + And Admin does charge-off the loan on "29 February 2024" + 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 | Waived | Outstanding | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 5.0 | 0.0 | 22.01 | 22.01| 0.0 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.03 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 3.0 | 0.0 | 20.01 | 0.0 | 0.0 | 0.0 | 0.0 | 20.01 | + | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 0.0 | 16.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Waived | Outstanding | + | 100 | 1.05 | 8.0 | 0 | 109.05 | 22.01| 0 | 0 | 0.0 | 87.04 | + 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 | + | 01 February 2024 | Repayment | 22.01 | 16.43 | 0.58 | 5.0 | 0.0 | 83.57 | false | false | + | 29 February 2024 | Charge-off | 87.04 | 83.57 | 0.47 | 3.0 | 0.0 | 0.0 | false | false | + + @TestRailId:C3415 + Scenario: Backdated charge-off with charge is added after the charge off date when loan behavior is zero-interest with interestRecalculation disabled is forbidden - UC9.5 + When Admin sets the business date to "1 January 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin sets the business date to "1 February 2024" + When Admin adds "LOAN_SNOOZE_FEE" due date charge with "01 February 2024" due date and 5 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 22.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 5.0 | 0.0 | 22.01 | 22.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 5.0 | 0 | 107.05 | 22.01| 0 | 0 | 85.04 | + When Admin sets the business date to "01 March 2024" + When Admin adds "LOAN_SNOOZE_FEE" due date charge with "05 March 2024" due date and 3 EUR transaction amount + Then Backdated charge-off on a date "29 February 2024" is forbidden + + @TestRailId:C3374 + Scenario: Charge-off with Credit Balance Refund when loan behavior is zero-interest and interestRecalculation disabled - UC11 + When Admin sets the business date to "1 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin sets the business date to "1 July 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 April 2024" with 17.01 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 May 2024" with 17.01 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 June 2024" with 17.01 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 July 2024" with 20 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 5 | 31 | 01 June 2024 | 01 June 2024 | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 6 | 30 | 01 July 2024 | 01 July 2024 | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 17.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 | 2.05 | 0 | 0 | 102.05 | 102.05 | 0 | 0 | 0.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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | + | 01 April 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 50.43 | false | false | + | 01 May 2024 | Repayment | 17.01 | 16.72 | 0.29 | 0.0 | 0.0 | 33.71 | false | false | + | 01 June 2024 | Repayment | 17.01 | 16.81 | 0.2 | 0.0 | 0.0 | 16.9 | false | false | + | 01 July 2024 | Repayment | 20.0 | 16.9 | 0.1 | 0.0 | 0.0 | 0.0 | false | false | + | 01 July 2024 | Accrual | 2.05 | 0.0 | 2.05 | 0.0 | 0.0 | 0.0 | false | false | + When Admin sets the business date to "2 July 2024" + When Admin makes Credit Balance Refund transaction on "02 July 2024" with 3 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 5 | 31 | 01 June 2024 | 01 June 2024 | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 6 | 30 | 01 July 2024 | 01 July 2024 | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 17.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 | 2.05 | 0 | 0 | 102.05 | 102.05 | 0 | 0 | 0.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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | + | 01 April 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 50.43 | false | false | + | 01 May 2024 | Repayment | 17.01 | 16.72 | 0.29 | 0.0 | 0.0 | 33.71 | false | false | + | 01 June 2024 | Repayment | 17.01 | 16.81 | 0.2 | 0.0 | 0.0 | 16.9 | false | false | + | 01 July 2024 | Repayment | 20.0 | 16.9 | 0.1 | 0.0 | 0.0 | 0.0 | false | false | + | 01 July 2024 | Accrual | 2.05 | 0.0 | 2.05 | 0.0 | 0.0 | 0.0 | false | false | + | 02 July 2024 | Credit Balance Refund | 3.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | + When Customer undo "1"th "Repayment" transaction made on "01 July 2024" + Then Loan Repayment schedule has 7 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 5 | 31 | 01 June 2024 | 01 June 2024 | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 7 | 1 | 02 July 2024 | | 0.0 | 3.0 | 0.0 | 0.0 | 0.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 | + | 103 | 2.05 | 0 | 0 | 105.05 | 85.05| 0 | 0 | 20.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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | + | 01 April 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 50.43 | false | false | + | 01 May 2024 | Repayment | 17.01 | 16.72 | 0.29 | 0.0 | 0.0 | 33.71 | false | false | + | 01 June 2024 | Repayment | 17.01 | 16.81 | 0.2 | 0.0 | 0.0 | 16.9 | false | false | + | 01 July 2024 | Repayment | 20.0 | 16.9 | 0.1 | 0.0 | 0.0 | 0.0 | true | false | + | 01 July 2024 | Accrual | 2.05 | 0.0 | 2.05 | 0.0 | 0.0 | 0.0 | false | false | + | 02 July 2024 | Credit Balance Refund | 3.0 | 3.0 | 0.0 | 0.0 | 0.0 | 19.9 | false | true | + When Admin sets the business date to "15 July 2024" + And Admin does charge-off the loan on "15 July 2024" + Then Loan Repayment schedule has 7 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 5 | 31 | 01 June 2024 | 01 June 2024 | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 103 | 2.05 | 0 | 0 | 105.05 | 85.05| 0 | 0 | 20.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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | + | 01 April 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 50.43 | false | false | + | 01 May 2024 | Repayment | 17.01 | 16.72 | 0.29 | 0.0 | 0.0 | 33.71 | false | false | + | 01 June 2024 | Repayment | 17.01 | 16.81 | 0.2 | 0.0 | 0.0 | 16.9 | false | false | + | 01 July 2024 | Repayment | 20.0 | 16.9 | 0.1 | 0.0 | 0.0 | 0.0 | true | false | + | 01 July 2024 | Accrual | 2.05 | 0.0 | 2.05 | 0.0 | 0.0 | 0.0 | false | false | + | 02 July 2024 | Credit Balance Refund | 3.0 | 3.0 | 0.0 | 0.0 | 0.0 | 19.9 | false | true | + | 15 July 2024 | Charge-off | 20.0 | 19.9 | 0.1 | 0.0 | 0.0 | 0.0 | false | false | + + @TestRailId:C3375 + Scenario: Charge-off with adjust to last installment scenario when loan behavior is zero-interest and interestRecalculation disabled - UC12 + When Admin sets the business date to "1 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF" loan product "DEFAULT" transaction type to "LAST_INSTALLMENT" future installment allocation rule + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin sets the business date to "15 January 2024" + And Customer makes "AUTOPAY" repayment on "15 January 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.01 | 0.01 | 0.0 | 17.0 | + | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 17.0 | 17.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 | 2.05 | 0 | 0 | 102.05 | 17.01| 17.01 | 0 | 85.04 | + When Admin sets the business date to "29 February 2024" + And Admin does charge-off the loan on "29 February 2024" + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.03 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.11 | 0.0 | 0.0 | 0.0 | 16.11 | 0.01 | 0.01 | 0.0 | 16.1 | + | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 17.0 | 17.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 | 1.15 | 0 | 0 | 101.15 | 17.01| 17.01 | 0 | 84.14 | + 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 | + | 15 January 2024 | Repayment | 17.01 | 16.91 | 0.1 | 0.0 | 0.0 | 83.09 | false | false | + | 29 February 2024 | Charge-off | 84.14 | 83.09 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | + And Admin set "LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + + @TestRailId:C3377 + Scenario: Charge-off on due date when loan behaviour is zero-interest and interestRecalculation = false - adjust to last installment scenario, not fully paid + When Admin sets the business date to "1 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF_BEHAVIOUR" loan product "DEFAULT" transaction type to "LAST_INSTALLMENT" future installment allocation rule + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF_BEHAVIOUR | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.04 | 0 | 0 | 102.04 | 0 | 0 | 0 | 102.04 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin sets the business date to "15 January 2024" + And Customer makes "AUTOPAY" repayment on "15 January 2024" with 17.15 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.11 | 0.11 | 0.0 | 16.89 | + | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 17.04 | 17.04 | 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 | 2.04 | 0 | 0 | 102.04 | 17.15 | 17.15 | 0 | 84.89 | + When Admin sets the business date to "29 February 2024" + And Admin does charge-off the loan on "29 February 2024" + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 2 | 29 | 01 March 2024 | | 67.03 | 16.56 | 0.44 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 3 | 31 | 01 April 2024 | | 50.03 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 4 | 30 | 01 May 2024 | | 33.03 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 5 | 31 | 01 June 2024 | | 16.94 | 16.09 | 0.11 | 0.0 | 0.0 | 16.2 | 0.11 | 0.11 | 0.0 | 16.09 | + | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 17.04 | 17.04 | 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 | 1.24 | 0 | 0 | 101.24 | 17.15 | 17.15 | 0 | 84.09 | + 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 | + | 15 January 2024 | Repayment | 17.15 | 16.94 | 0.21 | 0.0 | 0.0 | 83.06 | false | false | + | 29 February 2024 | Charge-off | 84.09 | 83.06 | 1.03 | 0.0 | 0.0 | 0.0 | false | false | + And Admin set "LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF_BEHAVIOUR" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + + @TestRailId:C3378 + Scenario: Undo the charge-off when loan behaviour is zero-interest and interestRecalculation = false + When Admin sets the business date to "1 March 2023" + And Admin creates a client with random data + When Admin creates a new zero charge-off Loan without interest recalculation and with date: "1 January 2023" + 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2023 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 2 | 28 | 01 March 2023 | | 67.04 | 16.55 | 0.45 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 3 | 31 | 01 April 2023 | | 50.44 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 4 | 30 | 01 May 2023 | | 33.73 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 5 | 31 | 01 June 2023 | | 16.93 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 6 | 30 | 01 July 2023 | | 0.0 | 16.93 | 0.1 | 0.0 | 0.0 | 17.03 | 0.0 | 0.0 | 0.0 | 17.03 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.03 | 0 | 0 | 102.03 | 0 | 0 | 0 | 102.03 | + And Admin successfully approves the loan on "1 January 2023" with "100" amount and expected disbursement date on "1 January 2023" + And Admin successfully disburse the loan on "1 January 2023" with "100" EUR transaction amount + And Admin does charge-off the loan on "14 February 2023" + 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2023 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 2 | 28 | 01 March 2023 | | 66.8 | 16.79 | 0.21 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 3 | 31 | 01 April 2023 | | 49.8 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 4 | 30 | 01 May 2023 | | 32.8 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 5 | 31 | 01 June 2023 | | 15.8 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 6 | 30 | 01 July 2023 | | 0.0 | 15.8 | 0.0 | 0.0 | 0.0 | 15.8 | 0.0 | 0.0 | 0.0 | 15.8 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 0.8 | 0 | 0 | 100.8 | 0 | 0 | 0 | 100.8 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 January 2023 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | + | 14 February 2023 | Charge-off | 100.8 | 100.0 | 0.8 | 0.0 | 0.0 | 0.0 | + And Admin does a charge-off undo the loan + 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 January 2023 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2023 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 2 | 28 | 01 March 2023 | | 67.04 | 16.55 | 0.45 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 3 | 31 | 01 April 2023 | | 50.44 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 4 | 30 | 01 May 2023 | | 33.73 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 5 | 31 | 01 June 2023 | | 16.93 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 6 | 30 | 01 July 2023 | | 0.0 | 16.93 | 0.1 | 0.0 | 0.0 | 17.03 | 0.0 | 0.0 | 0.0 | 17.03 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.03 | 0 | 0 | 102.03 | 0 | 0 | 0 | 102.03 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 01 January 2023 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | + | 14 February 2023 | Charge-off | 100.8 | 100.0 | 0.8 | 0.0 | 0.0 | 0.0 | + + @TestRailId:C3379 + Scenario: Charge-off with FRAUD reason after installment date when loan behavior is zero-interest with interestRecalculation - UC10.1 + When Admin sets the business date to "1 January 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin sets the business date to "1 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 17.01| 0 | 0 | 85.04 | + When Admin sets the business date to "29 February 2024" + And Admin does charge-off the loan with reason "FRAUD" on "29 February 2024" + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.03 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.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 | 1.14 | 0.0 | 0.0 | 101.14 | 0.0 | 0.0 | 0.0 | 101.14 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 1.05 | 0 | 0 | 101.05 | 17.01| 0 | 0 | 84.04 | 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 | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | true | false | - | 29 February 2024 | Charge-off | 101.14 | 100.0 | 1.14 | 0.0 | 0.0 | 0.0 | false | true | - And Global configuration "is-principal-compounding-disabled-for-overdue-loans" is disabled + | 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | false | + Then Loan Transactions tab has a "CHARGE_OFF" transaction with date "29 February 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | | 83.57 | + | ASSET | 112603 | Interest/Fee Receivable | | 0.47 | + | EXPENSE | 744037 | Credit Loss/Bad Debt-Fraud | 83.57 | | + | INCOME | 404001 | Interest Income Charge Off | 0.47 | | - @TestRailId:C3357 @AdvancedPaymentAllocation - Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when backdated repayment occurs after charge-off - Given Global configuration "is-principal-compounding-disabled-for-overdue-loans" is enabled - 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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 + @TestRailId:C3380 + Scenario: Charge-off with DELINQUENT reason after installment date when loan behavior is zero-interest with interestRecalculation - UC10.2 + When Admin sets the business date to "1 January 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - 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 | - When Admin sets the business date to "01 February 2024" + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin sets the business date to "1 February 2024" And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - 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 | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - When Admin sets the business date to "31 March 2024" - And Admin does charge-off the loan on "31 March 2024" - Then Loan Repayment schedule has 3 periods, with the following data for periods: - | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 30 | 31 March 2024 | | 0.0 | 67.05 | 0.47 | 0.0 | 0.0 | 67.52 | 0.0 | 0.0 | 0.0 | 67.52 | + | 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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 | 1.54 | 0.0 | 0.0 | 101.54 | 17.01 | 0.0 | 0.0 | 84.53 | - 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 | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 31 March 2024 | Charge-off | 84.53 | 83.57 | 0.96 | 0.0 | 0.0 | 0.0 | false | false | -# --- Backdated repayment --- - And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 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 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 3 | 30 | 31 March 2024 | | 0.0 | 67.05 | 0.38 | 0.0 | 0.0 | 67.43 | 0.0 | 0.0 | 0.0 | 67.43 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 17.01| 0 | 0 | 85.04 | + When Admin sets the business date to "29 February 2024" + And Admin does charge-off the loan with reason "DELINQUENT" on "29 February 2024" + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.03 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.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 | 1.45 | 0.0 | 0.0 | 101.45 | 34.02 | 0.0 | 0.0 | 67.43 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 1.05 | 0 | 0 | 101.05 | 17.01| 0 | 0 | 84.04 | 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 | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | - | 31 March 2024 | Charge-off | 67.43 | 67.05 | 0.38 | 0.0 | 0.0 | 0.0 | false | true | - And Global configuration "is-principal-compounding-disabled-for-overdue-loans" is disabled + | 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | false | + Then Loan Transactions tab has a "CHARGE_OFF" transaction with date "29 February 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | | 83.57 | + | ASSET | 112603 | Interest/Fee Receivable | | 0.47 | + | EXPENSE | 744007 | Credit Loss/Bad Debt | 83.57 | | + | INCOME | 404001 | Interest Income Charge Off | 0.47 | | - Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when one fee charge due date is before charge-off date - 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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 + @TestRailId:C3381 + Scenario: Charge-off with OTHER reason after installment date when loan behavior is zero-interest with interestRecalculation disabled - UC10.3 + When Admin sets the business date to "1 January 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - 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 | - When Admin sets the business date to "01 February 2024" + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin sets the business date to "1 February 2024" And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - When Admin adds "LOAN_SNOOZE_FEE" due date charge with "15 February 2024" due date and 5 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 5.0 | 0.0 | 22.01 | 0.0 | 0.0 | 0.0 | 22.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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 | 2.05 | 5.0 | 0.0 | 107.05 | 17.01 | 0.0 | 0.0 | 90.04 | - 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 | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - When Admin sets the business date to "01 March 2024" - And Admin does charge-off the loan on "01 March 2024" - Then Loan Repayment schedule has 2 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 0.0 | 83.57 | 0.49 | 5.0 | 0.0 | 89.06 | 0.0 | 0.0 | 0.0 | 89.06 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 17.01| 0 | 0 | 85.04 | + When Admin sets the business date to "29 February 2024" + And Admin does charge-off the loan with reason "OTHER" on "29 February 2024" + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01| 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.03 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.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 | 1.07 | 5.0 | 0.0 | 106.07 | 17.01 | 0.0 | 0.0 | 89.06 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 1.05 | 0 | 0 | 101.05 | 17.01| 0 | 0 | 84.04 | 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 | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Charge-off | 89.06 | 83.57 | 0.49 | 5.0 | 0.0 | 0.0 | false | false | + | 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | false | + Then Loan Transactions tab has a "CHARGE_OFF" transaction with date "29 February 2024" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | ASSET | 112601 | Loans Receivable | | 83.57 | + | ASSET | 112603 | Interest/Fee Receivable | | 0.47 | + | EXPENSE | 744007 | Credit Loss/Bad Debt | 83.57 | | + | INCOME | 404001 | Interest Income Charge Off | 0.47 | | Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when couple fee charges due dates is before charge-off date When Admin sets the business date to "01 January 2024" @@ -4304,89 +5355,29 @@ Feature: Charge-off | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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 | 2.05 | 7.0 | 0.0 | 109.05 | 17.01 | 0.0 | 0.0 | 92.04 | - 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 | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - When Admin sets the business date to "01 March 2024" - And Admin does charge-off the loan on "01 March 2024" - Then Loan Repayment schedule has 3 periods, with the following data for periods: - | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 0.0 | 83.57 | 0.49 | 0.0 | 0.0 | 84.06 | 0.0 | 0.0 | 0.0 | 84.06 | - | 3 | 45 | 15 April 2024 | | 0.0 | 0.0 | 0.0 | 7.0 | 0.0 | 7.0 | 0.0 | 0.0 | 0.0 | 7.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 | 1.07 | 7.0 | 0.0 | 108.07 | 17.01 | 0.0 | 0.0 | 91.06 | - 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 | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Charge-off | 91.06 | 83.57 | 0.49 | 7.0 | 0.0 | 0.0 | false | false | - - Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when fee and penalty charges due dates is after charge-off date - 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - 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 | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - When Admin adds "LOAN_SNOOZE_FEE" due date charge with "05 March 2024" due date and 5 EUR transaction amount - When Admin sets the business date to "15 February 2024" - And Admin adds an NSF fee because of payment bounce with "29 February 2024" transaction date - 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 10.0 | 27.01 | 0.0 | 0.0 | 0.0 | 27.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 5.0 | 0.0 | 22.01 | 0.0 | 0.0 | 0.0 | 22.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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 | 2.05 | 5.0 | 10.0 | 117.05 | 17.01 | 0.0 | 0.0 | 100.04 | + | 100.0 | 2.05 | 7.0 | 0.0 | 109.05 | 17.01 | 0.0 | 0.0 | 92.04 | 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 | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - And Admin does charge-off the loan on "15 February 2024" + When Admin sets the business date to "01 March 2024" + And Admin does charge-off the loan on "01 March 2024" Then Loan Repayment schedule has 3 periods, with the following data for periods: | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 14 | 15 February 2024 | | 0.0 | 83.57 | 0.24 | 0.0 | 10.0 | 93.81 | 0.0 | 0.0 | 0.0 | 93.81 | - | 3 | 19 | 05 March 2024 | | 0.0 | 0.0 | 0.0 | 5.0 | 0.0 | 5.0 | 0.0 | 0.0 | 0.0 | 5.0 | + | 2 | 29 | 01 March 2024 | | 0.0 | 83.57 | 0.49 | 0.0 | 0.0 | 84.06 | 0.0 | 0.0 | 0.0 | 84.06 | + | 3 | 45 | 15 April 2024 | | 0.0 | 0.0 | 0.0 | 7.0 | 0.0 | 7.0 | 0.0 | 0.0 | 0.0 | 7.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.82 | 5.0 | 10.0 | 115.82 | 17.01 | 0.0 | 0.0 | 98.81 | + | 100.0 | 1.07 | 7.0 | 0.0 | 108.07 | 17.01 | 0.0 | 0.0 | 91.06 | 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 | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 February 2024 | Charge-off | 98.81 | 83.57 | 0.24 | 5.0 | 10.0 | 0.0 | false | false | + | 01 March 2024 | Charge-off | 91.06 | 83.57 | 0.49 | 7.0 | 0.0 | 0.0 | false | false | - Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when fee and penalty charges due dates is after charge-off date, and one charge is waived after charge-off + Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when fee and penalty charges due dates is after charge-off date 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: @@ -4445,386 +5436,224 @@ Feature: Charge-off | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | | 15 February 2024 | Charge-off | 98.81 | 83.57 | 0.24 | 5.0 | 10.0 | 0.0 | false | false | - And Admin waives charge - 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 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 14 | 15 February 2024 | | 0.0 | 83.57 | 0.24 | 0.0 | 10.0 | 93.81 | 0.0 | 0.0 | 0.0 | 83.81 | - | 3 | 19 | 05 March 2024 | | 0.0 | 0.0 | 0.0 | 5.0 | 0.0 | 5.0 | 0.0 | 0.0 | 0.0 | 5.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.82 | 5.0 | 10.0 | 115.82 | 17.01 | 0.0 | 0.0 | 88.81 | - 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 | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 February 2024 | Waive loan charges | 10.0 | 0.0 | 0.0 | 0.0 | 0.0 | 83.57 | false | false | - | 15 February 2024 | Charge-off | 88.81 | 83.57 | 0.24 | 5.0 | 0.0 | 0.0 | false | true | - - Scenario: Verify accelerate maturity to charge-off date when interest recalculation is disabled - case when one fee charge due date is before charge-off date - When Admin sets the business date to "01 January 2024" - When Admin creates a client with random data - When Admin creates a new accelerate maturity charge-off Loan without interest recalculation and with date: "1 January 2024" - 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 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.04 | 0 | 0 | 102.04 | 0 | 0 | 0 | 102.04 | - 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 | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.00 EUR transaction amount - When Admin adds "LOAN_SNOOZE_FEE" due date charge with "15 February 2024" due date and 5 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 5.0 | 0.0 | 22.0 | 0.0 | 0.0 | 0.0 | 22.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.04 | 5 | 0 | 107.04 | 17.0 | 0 | 0 | 90.04 | - 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 | - | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - When Admin sets the business date to "1 March 2024" - And Admin does charge-off the loan on "1 March 2024" - Then Loan Repayment schedule has 2 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 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 0.0 | 83.59 | 0.46 | 5.0 | 0.0 | 89.05 | 0.0 | 0.0 | 0.0 | 89.05 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.05 | 5.0 | 0.0 | 106.05 | 17.0 | 0.0 | 0.0 | 89.05 | - 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 | - | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - | 01 March 2024 | Charge-off | 89.05 | 83.59 | 0.46 | 5.0 | 0.0 | 0.0 | false | false | - - Scenario: Verify accelerate maturity to charge-off date when interest recalculation is disabled - case when couple fee charges due dates is before charge-off date - When Admin sets the business date to "01 January 2024" - When Admin creates a client with random data - When Admin creates a new accelerate maturity charge-off Loan without interest recalculation and with date: "1 January 2024" - 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 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.04 | 0 | 0 | 102.04 | 0 | 0 | 0 | 102.04 | - 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 | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.00 EUR transaction amount - When Admin adds "LOAN_SNOOZE_FEE" due date charge with "15 February 2024" due date and 5 EUR transaction amount - When Admin adds "LOAN_SNOOZE_FEE" due date charge with "20 February 2024" due date and 3 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 8.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.04 | 8 | 0 | 110.04 | 17.0 | 0 | 0 | 93.04 | - 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 | - | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - When Admin sets the business date to "1 March 2024" - And Admin does charge-off the loan on "1 March 2024" - Then Loan Repayment schedule has 2 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 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 0.0 | 83.59 | 0.46 | 8.0 | 0.0 | 92.05 | 0.0 | 0.0 | 0.0 | 92.05 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.05 | 8.0 | 0.0 | 109.05 | 17.0 | 0.0 | 0.0 | 92.05 | - 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 | - | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - | 01 March 2024 | Charge-off | 92.05 | 83.59 | 0.46 | 8.0 | 0.0 | 0.0 | false | false | - Scenario: Verify accelerate maturity to charge-off date when interest recalculation is disabled - case when fee and penalty charges due dates is before charge-off date + Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when fee and penalty charges due dates is after charge-off date, and one charge is waived after charge-off When Admin sets the business date to "01 January 2024" When Admin creates a client with random data - When Admin creates a new accelerate maturity charge-off Loan without interest recalculation and with date: "1 January 2024" + When Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.04 | 0 | 0 | 102.04 | 0 | 0 | 0 | 102.04 | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | 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 | When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.00 EUR transaction amount - When Admin adds "LOAN_SNOOZE_FEE" due date charge with "15 February 2024" due date and 5 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + When Admin adds "LOAN_SNOOZE_FEE" due date charge with "05 March 2024" due date and 5 EUR transaction amount When Admin sets the business date to "15 February 2024" - And Admin adds an NSF fee because of payment bounce with "15 February 2024" transaction date + And Admin adds an NSF fee because of payment bounce with "29 February 2024" transaction date 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 5.0 | 10.0 | 32.0 | 0.0 | 0.0 | 0.0 | 32.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.04 | 5 | 10 | 117.04 | 17.0 | 0 | 0 | 100.04 | - 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 | - | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - When Admin sets the business date to "1 March 2024" - And Admin does charge-off the loan on "1 March 2024" - Then Loan Repayment schedule has 2 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 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 0.0 | 83.59 | 0.46 | 5.0 | 10.0 | 99.05 | 0.0 | 0.0 | 0.0 | 99.05 | + | 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 10.0 | 27.01 | 0.0 | 0.0 | 0.0 | 27.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 5.0 | 0.0 | 22.01 | 0.0 | 0.0 | 0.0 | 22.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.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 | 1.05 | 5.0 | 10.0 | 116.05 | 17.0 | 0.0 | 0.0 | 99.05 | - 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 | - | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - | 01 March 2024 | Charge-off | 99.05 | 83.59 | 0.46 | 5.0 | 10.0 | 0.0 | false | false | - - Scenario: Verify accelerate maturity to charge-off date when interest recalculation is disabled - case when fee and penalty charges due dates is before charge-off date, and one charge is waived after charge-off - When Admin sets the business date to "01 January 2024" - When Admin creates a client with random data - When Admin creates a new accelerate maturity charge-off Loan without interest recalculation and with date: "1 January 2024" - 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 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.04 | 0 | 0 | 102.04 | 0 | 0 | 0 | 102.04 | - 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 | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.00 EUR transaction amount - When Admin adds "LOAN_SNOOZE_FEE" due date charge with "15 February 2024" due date and 5 EUR transaction amount - When Admin sets the business date to "15 February 2024" - And Admin adds an NSF fee because of payment bounce with "15 February 2024" transaction date - 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 5.0 | 10.0 | 32.0 | 0.0 | 0.0 | 0.0 | 32.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.04 | 5 | 10 | 117.04 | 17.0 | 0 | 0 | 100.04 | - 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 | - | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - When Admin sets the business date to "1 March 2024" - And Admin does charge-off the loan on "1 March 2024" - Then Loan Repayment schedule has 2 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 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 0.0 | 83.59 | 0.46 | 5.0 | 10.0 | 99.05 | 0.0 | 0.0 | 0.0 | 99.05 | + | 100.0 | 2.05 | 5.0 | 10.0 | 117.05 | 17.01 | 0.0 | 0.0 | 100.04 | + 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + And Admin does charge-off the loan on "15 February 2024" + Then Loan Repayment schedule has 3 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 14 | 15 February 2024 | | 0.0 | 83.57 | 0.24 | 0.0 | 10.0 | 93.81 | 0.0 | 0.0 | 0.0 | 93.81 | + | 3 | 19 | 05 March 2024 | | 0.0 | 0.0 | 0.0 | 5.0 | 0.0 | 5.0 | 0.0 | 0.0 | 0.0 | 5.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 | 1.05 | 5.0 | 10.0 | 116.05 | 17.0 | 0.0 | 0.0 | 99.05 | + | 100.0 | 0.82 | 5.0 | 10.0 | 115.82 | 17.01 | 0.0 | 0.0 | 98.81 | 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 | - | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - | 01 March 2024 | Charge-off | 99.05 | 83.59 | 0.46 | 5.0 | 10.0 | 0.0 | false | false | - And Admin waives due date charge - Then Loan Repayment schedule has 2 periods, with the following data for periods: + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 February 2024 | Charge-off | 98.81 | 83.57 | 0.24 | 5.0 | 10.0 | 0.0 | false | false | + And Admin waives charge + 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 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 0.0 | 83.59 | 0.46 | 5.0 | 10.0 | 99.05 | 0.0 | 0.0 | 0.0 | 94.05 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 14 | 15 February 2024 | | 0.0 | 83.57 | 0.24 | 0.0 | 10.0 | 93.81 | 0.0 | 0.0 | 0.0 | 83.81 | + | 3 | 19 | 05 March 2024 | | 0.0 | 0.0 | 0.0 | 5.0 | 0.0 | 5.0 | 0.0 | 0.0 | 0.0 | 5.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 | 1.05 | 5.0 | 10.0 | 116.05 | 17.0 | 0.0 | 0.0 | 94.05 | + | 100.0 | 0.82 | 5.0 | 10.0 | 115.82 | 17.01 | 0.0 | 0.0 | 88.81 | 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 | - | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - | 15 February 2024 | Waive loan charges | 5.0 | 0.0 | 0.0 | 0.0 | 0.0 | 83.59 | false | false | - | 01 March 2024 | Charge-off | 94.05 | 83.59 | 0.46 | 0.0 | 10.0 | 0.0 | false | true | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 February 2024 | Waive loan charges | 10.0 | 0.0 | 0.0 | 0.0 | 0.0 | 83.57 | false | false | + | 15 February 2024 | Charge-off | 88.81 | 83.57 | 0.24 | 5.0 | 0.0 | 0.0 | false | true | - Scenario: Verify accelerate maturity to charge-off date when interest recalculation is disabled - case when one fee charge is added after the charge off date + @TestRailId:C3360 @AdvancedPaymentAllocation + Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when charge-off occurs with adjustment to last installment When Admin sets the business date to "01 January 2024" When Admin creates a client with random data - When Admin creates a new accelerate maturity charge-off Loan without interest recalculation and with date: "1 January 2024" + When Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR_LAST_INSTALLMENT_STRATEGY | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.04 | 0 | 0 | 102.04 | 0 | 0 | 0 | 102.04 | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | 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 | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.00 EUR transaction amount - When Admin adds "LOAN_SNOOZE_FEE" due date charge with "05 March 2024" due date and 5 EUR transaction amount + When Admin sets the business date to "15 January 2024" + And Customer makes "AUTOPAY" repayment on "15 January 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 5.0 | 0.0 | 22.0 | 0.0 | 0.0 | 0.0 | 22.0 | - | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | + | 1 | 31 | 01 February 2024 | | 83.52 | 16.48 | 0.53 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 66.9 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.18 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.36 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 17.01 | 16.35 | 0.1 | 0.0 | 0.0 | 16.45 | 0.0 | 0.0 | 0.0 | 16.45 | + | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01| 17.01 | 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 | 2.04 | 5 | 0 | 107.04 | 17.0 | 0 | 0 | 90.04 | + | 100 | 1.5 | 0 | 0 | 101.5 | 17.01| 17.01 | 0 | 84.49 | 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 | - | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - When Admin sets the business date to "1 March 2024" - And Admin does charge-off the loan on "1 March 2024" - Then Loan Repayment schedule has 3 periods, with the following data for periods: - | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 0.0 | 83.59 | 0.46 | 0.0 | 0.0 | 84.05 | 0.0 | 0.0 | 0.0 | 84.05 | - | 3 | 4 | 05 March 2024 | | 0.0 | 0.0 | 0.0 | 5.0 | 0.0 | 5.0 | 0.0 | 0.0 | 0.0 | 5.0 | + | 15 January 2024 | Repayment | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 82.99 | false | false | + When Admin sets the business date to "29 February 2024" + And Admin does charge-off the loan on "29 February 2024" + Then Loan Repayment schedule has 2 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 | 31 | 01 February 2024 | | 83.52 | 16.48 | 0.53 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 28 | 29 February 2024 | | 0.0 | 83.52 | 0.47 | 0.0 | 0.0 | 83.99 | 17.01 | 17.01 | 0.0 | 66.98 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.05 | 5.0 | 0.0 | 106.05 | 17.0 | 0.0 | 0.0 | 89.05 | + | 100.0 | 1.0 | 0.0 | 0.0 | 101.0 | 17.01 | 17.01 | 0.0 | 83.99 | 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 | - | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - | 01 March 2024 | Charge-off | 89.05 | 83.59 | 0.46 | 5.0 | 0.0 | 0.0 | false | false | + | 15 January 2024 | Repayment | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 82.99 | false | false | + | 29 February 2024 | Charge-off | 83.99 | 82.99 | 1.0 | 0.0 | 0.0 | 0.0 | false | false | - Scenario: Verify accelerate maturity to charge-off date when interest recalculation is disabled - case when couple fee charges due dates is after charge-off date + @TestRailId:C3361 @AdvancedPaymentAllocation + Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when charge-off occurs with allocation to last installment with interest allocation change When Admin sets the business date to "01 January 2024" When Admin creates a client with random data - When Admin creates a new accelerate maturity charge-off Loan without interest recalculation and with date: "1 January 2024" + When Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR_LAST_INSTALLMENT_STRATEGY | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.04 | 0 | 0 | 102.04 | 0 | 0 | 0 | 102.04 | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | 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 | When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.00 EUR transaction amount - When Admin adds "LOAN_SNOOZE_FEE" due date charge with "05 March 2024" due date and 5 EUR transaction amount - When Admin adds "LOAN_SNOOZE_FEE" due date charge with "15 April 2024" due date and 2 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 5.0 | 0.0 | 22.0 | 0.0 | 0.0 | 0.0 | 22.0 | - | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 2.0 | 0.0 | 19.0 | 0.0 | 0.0 | 0.0 | 19.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | + | 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.04 | 7 | 0 | 109.04 | 17.0 | 0 | 0 | 92.04 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | 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 | - | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - When Admin sets the business date to "1 March 2024" - And Admin does charge-off the loan on "1 March 2024" - Then Loan Repayment schedule has 3 periods, with the following data for periods: - | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 0.0 | 83.59 | 0.46 | 0.0 | 0.0 | 84.05 | 0.0 | 0.0 | 0.0 | 84.05 | - | 3 | 45 | 15 April 2024 | | 0.0 | 0.0 | 0.0 | 7.0 | 0.0 | 7.0 | 0.0 | 0.0 | 0.0 | 7.0 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + When Admin sets the business date to "15 February 2024" + And Customer makes "AUTOPAY" repayment on "15 February 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.28 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.46 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 17.01 | 16.45 | 0.1 | 0.0 | 0.0 | 16.55 | 0.0 | 0.0 | 0.0 | 16.55 | + | 6 | 30 | 01 July 2024 | 15 February 2024 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 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 | 1.05 | 7.0 | 0.0 | 108.05 | 17.0 | 0.0 | 0.0 | 91.05 | + | 100.0 | 1.6 | 0.0 | 0.0 | 101.6 | 34.02 | 17.01 | 0.0 | 67.58 | 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 | - | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - | 01 March 2024 | Charge-off | 91.05 | 83.59 | 0.46 | 7.0 | 0.0 | 0.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 February 2024 | Repayment | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 66.56 | false | false | + When Admin sets the business date to "29 February 2024" + And Admin does charge-off the loan on "29 February 2024" + Then Loan Repayment schedule has 2 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 28 | 29 February 2024 | | 0.0 | 83.57 | 0.43 | 0.0 | 0.0 | 84.0 | 17.01 | 17.01 | 0.0 | 66.99 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.01 | 0.0 | 0.0 | 101.01 | 34.02 | 17.01 | 0.0 | 66.99 | + 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 February 2024 | Repayment | 17.01 | 16.77 | 0.24 | 0.0 | 0.0 | 66.8 | false | true | + | 29 February 2024 | Charge-off | 66.99 | 66.8 | 0.19 | 0.0 | 0.0 | 0.0 | false | false | - Scenario: Verify accelerate maturity to charge-off date when interest recalculation is disabled - case when fee and penalty charges due dates is after charge-off date + @TestRailId:C3360 @AdvancedPaymentAllocation + Scenario: Verify accelerate maturity to charge-off date when interest recalculation is disabled - case when charge-off occurs with adjustment to last installment When Admin sets the business date to "01 January 2024" When Admin creates a client with random data - When Admin creates a new accelerate maturity charge-off Loan without interest recalculation and with date: "1 January 2024" + When Admin creates a new accelerate maturity charge-off Loan with last installment strategy, without interest recalculation and with date: "1 January 2024" 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 6 periods, with the following data for periods: @@ -4842,47 +5671,45 @@ Feature: Charge-off 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 | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.00 EUR transaction amount - When Admin adds "LOAN_SNOOZE_FEE" due date charge with "05 March 2024" due date and 5 EUR transaction amount - When Admin sets the business date to "15 February 2024" - And Admin adds an NSF fee because of payment bounce with "29 February 2024" transaction date + When Admin sets the business date to "15 January 2024" + And Customer makes "AUTOPAY" repayment on "15 January 2024" with 17.04 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 10.0 | 27.0 | 0.0 | 0.0 | 0.0 | 27.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 5.0 | 0.0 | 22.0 | 0.0 | 0.0 | 0.0 | 22.0 | - | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | + | 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 | 31 | 01 February 2024 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 17.04 | 17.04 | 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 | 2.04 | 5 | 10 | 117.04 | 17.0 | 0 | 0 | 100.04 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.04 | 0 | 0 | 102.04 | 17.04 | 17.04 | 0 | 85.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 | - | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - And Admin does charge-off the loan on "15 February 2024" - Then Loan Repayment schedule has 3 periods, with the following data for periods: + | 15 January 2024 | Repayment | 17.04 | 16.94 | 0.1 | 0.0 | 0.0 | 83.06 | false | false | + When Admin sets the business date to "29 February 2024" + And Admin does charge-off the loan on "29 February 2024" + Then Loan Repayment schedule has 2 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 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 14 | 15 February 2024 | | 0.0 | 83.59 | 0.22 | 0.0 | 10.0 | 93.81 | 0.0 | 0.0 | 0.0 | 93.81 | - | 3 | 19 | 05 March 2024 | | 0.0 | 0.0 | 0.0 | 5.0 | 0.0 | 5.0 | 0.0 | 0.0 | 0.0 | 5.0 | + | 1 | 31 | 01 February 2024 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 2 | 28 | 29 February 2024 | | 0.0 | 83.59 | 0.44 | 0.0 | 0.0 | 84.03 | 17.04 | 17.04 | 0.0 | 66.99 | 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.81 | 5.0 | 10.0 | 115.81 | 17.0 | 0.0 | 0.0 | 98.81 | + | 100.0 | 1.03 | 0.0 | 0.0 | 101.03 | 17.04 | 17.04 | 0.0 | 83.99 | 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 | - | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - | 15 February 2024 | Charge-off | 98.81 | 83.59 | 0.22 | 5.0 | 10.0 | 0.0 | false | false | + | 15 January 2024 | Repayment | 17.04 | 16.6 | 0.44 | 0.0 | 0.0 | 83.4 | false | true | + | 29 February 2024 | Charge-off | 83.99 | 83.4 | 0.59 | 0.0 | 0.0 | 0.0 | false | false | - Scenario: Verify accelerate maturity to charge-off date when interest recalculation is disabled - case when fee and penalty charges due dates is after charge-off date, and one charge is waived after charge-off + @TestRailId:C3361 @AdvancedPaymentAllocation + Scenario: Verify accelerate maturity to charge-off date when interest recalculation is disabled - case when charge-off occurs with allocation to last installment with interest allocation change When Admin sets the business date to "01 January 2024" When Admin creates a client with random data - When Admin creates a new accelerate maturity charge-off Loan without interest recalculation and with date: "1 January 2024" + When Admin creates a new accelerate maturity charge-off Loan with last installment strategy, without interest recalculation and with date: "1 January 2024" 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 6 periods, with the following data for periods: @@ -4902,59 +5729,60 @@ Feature: Charge-off | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | When Admin sets the business date to "01 February 2024" And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.00 EUR transaction amount - When Admin adds "LOAN_SNOOZE_FEE" due date charge with "05 March 2024" due date and 5 EUR transaction amount - When Admin sets the business date to "15 February 2024" - And Admin adds an NSF fee because of payment bounce with "29 February 2024" transaction date 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 10.0 | 27.0 | 0.0 | 0.0 | 0.0 | 27.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 5.0 | 0.0 | 22.0 | 0.0 | 0.0 | 0.0 | 22.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.04 | 5 | 10 | 117.04 | 17.0 | 0 | 0 | 100.04 | + | 100 | 2.04 | 0 | 0 | 102.04 | 17.0 | 0 | 0 | 85.04 | 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 | | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - And Admin does charge-off the loan on "15 February 2024" - Then Loan Repayment schedule has 3 periods, with the following data for periods: - | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 14 | 15 February 2024 | | 0.0 | 83.59 | 0.22 | 0.0 | 10.0 | 93.81 | 0.0 | 0.0 | 0.0 | 93.81 | - | 3 | 19 | 05 March 2024 | | 0.0 | 0.0 | 0.0 | 5.0 | 0.0 | 5.0 | 0.0 | 0.0 | 0.0 | 5.0 | + When Admin sets the business date to "15 February 2024" + And Customer makes "AUTOPAY" repayment on "15 February 2024" with 17.04 EUR transaction amount + When Admin sets the business date to "01 February 2024" + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 6 | 30 | 01 July 2024 | 15 February 2024 | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 17.04 | 17.04 | 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.81 | 5.0 | 10.0 | 115.81 | 17.0 | 0.0 | 0.0 | 98.81 | + | 100 | 2.04 | 0 | 0 | 102.04 | 34.04 | 17.04 | 0 | 68.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 | | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - | 15 February 2024 | Charge-off | 98.81 | 83.59 | 0.22 | 5.0 | 10.0 | 0.0 | false | false | - And Admin waives charge - Then Loan Repayment schedule has 3 periods, with the following data for periods: + | 15 February 2024 | Repayment | 17.04 | 16.94 | 0.1 | 0.0 | 0.0 | 66.65 | false | false | + When Admin sets the business date to "29 February 2024" + And Admin does charge-off the loan on "29 February 2024" + Then Loan Repayment schedule has 2 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 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 14 | 15 February 2024 | | 0.0 | 83.59 | 0.22 | 0.0 | 10.0 | 93.81 | 0.0 | 0.0 | 0.0 | 83.81 | - | 3 | 19 | 05 March 2024 | | 0.0 | 0.0 | 0.0 | 5.0 | 0.0 | 5.0 | 0.0 | 0.0 | 0.0 | 5.0 | + | 2 | 28 | 29 February 2024 | | 0.0 | 83.59 | 0.44 | 0.0 | 0.0 | 84.03 | 17.04 | 17.04 | 0.0 | 66.99 | 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.81 | 5.0 | 10.0 | 115.81 | 17.0 | 0.0 | 0.0 | 88.81 | + | 100.0 | 1.03 | 0.0 | 0.0 | 101.03 | 34.04 | 17.04 | 0.0 | 66.99 | 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 | - | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - | 15 February 2024 | Waive loan charges | 10.0 | 0.0 | 0.0 | 0.0 | 0.0 | 83.59 | false | false | - | 15 February 2024 | Charge-off | 88.81 | 83.59 | 0.22 | 5.0 | 0.0 | 0.0 | false | true | + | 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 | + | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | + | 15 February 2024 | Repayment | 17.04 | 16.6 | 0.44 | 0.0 | 0.0 | 66.99 | false | true | + | 29 February 2024 | Charge-off | 66.99 | 66.99 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | - @TestRailId:C3352 @AdvancedPaymentAllocation - Scenario: Verify accelerate maturity to charge-off date when interest recalculation is disabled - case when charge-off occurs on due date + Scenario: Verify accelerate maturity to charge-off date when interest recalculation is disabled - case when one fee charge due date is before charge-off date When Admin sets the business date to "01 January 2024" When Admin creates a client with random data When Admin creates a new accelerate maturity charge-off Loan without interest recalculation and with date: "1 January 2024" @@ -4977,18 +5805,19 @@ Feature: Charge-off | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | When Admin sets the business date to "01 February 2024" And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.00 EUR transaction amount + When Admin adds "LOAN_SNOOZE_FEE" due date charge with "15 February 2024" due date and 5 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 5.0 | 0.0 | 22.0 | 0.0 | 0.0 | 0.0 | 22.0 | | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.04 | 0 | 0 | 102.04 | 17.0 | 0 | 0 | 85.04 | + | 100 | 2.04 | 5 | 0 | 107.04 | 17.0 | 0 | 0 | 90.04 | 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 | @@ -4999,37 +5828,17 @@ Feature: Charge-off | 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 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 0.0 | 83.59 | 0.46 | 0.0 | 0.0 | 84.05 | 0.0 | 0.0 | 0.0 | 84.05 | + | 2 | 29 | 01 March 2024 | | 0.0 | 83.59 | 0.46 | 5.0 | 0.0 | 89.05 | 0.0 | 0.0 | 0.0 | 89.05 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.05 | 0.0 | 0.0 | 101.05 | 17.0 | 0.0 | 0.0 | 84.05 | - 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 | - | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - | 01 March 2024 | Charge-off | 84.05 | 83.59 | 0.46 | 0.0 | 0.0 | 0.0 | false | false | - When Admin sets the business date to "1 March 2024" - And Admin does a charge-off undo the loan - 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.04 | 0 | 0 | 102.04 | 17.0 | 0 | 0 | 85.04 | + | 100.0 | 1.05 | 5.0 | 0.0 | 106.05 | 17.0 | 0.0 | 0.0 | 89.05 | 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 | | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - | 01 March 2024 | Charge-off | 84.05 | 83.59 | 0.46 | 0.0 | 0.0 | 0.0 | true | false | + | 01 March 2024 | Charge-off | 89.05 | 83.59 | 0.46 | 5.0 | 0.0 | 0.0 | false | false | - @TestRailId:C3353 @AdvancedPaymentAllocation - Scenario: Verify accelerate maturity to charge-off date when interest recalculation is disabled - case when charge-off occurs before installment date + Scenario: Verify accelerate maturity to charge-off date when interest recalculation is disabled - case when couple fee charges due dates is before charge-off date When Admin sets the business date to "01 January 2024" When Admin creates a client with random data When Admin creates a new accelerate maturity charge-off Loan without interest recalculation and with date: "1 January 2024" @@ -5052,40 +5861,41 @@ Feature: Charge-off | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | When Admin sets the business date to "01 February 2024" And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.00 EUR transaction amount + When Admin adds "LOAN_SNOOZE_FEE" due date charge with "15 February 2024" due date and 5 EUR transaction amount + When Admin adds "LOAN_SNOOZE_FEE" due date charge with "20 February 2024" due date and 3 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 8.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.04 | 0 | 0 | 102.04 | 17.0 | 0 | 0 | 85.04 | + | 100 | 2.04 | 8 | 0 | 110.04 | 17.0 | 0 | 0 | 93.04 | 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 | | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - When Admin sets the business date to "29 February 2024" - And Admin does charge-off the loan on "29 February 2024" + When Admin sets the business date to "1 March 2024" + And Admin does charge-off the loan on "1 March 2024" Then Loan Repayment schedule has 2 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 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 28 | 29 February 2024 | | 0.0 | 83.59 | 0.44 | 0.0 | 0.0 | 84.03 | 0.0 | 0.0 | 0.0 | 84.03 | + | 2 | 29 | 01 March 2024 | | 0.0 | 83.59 | 0.46 | 8.0 | 0.0 | 92.05 | 0.0 | 0.0 | 0.0 | 92.05 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.03 | 0.0 | 0.0 | 101.03 | 17.0 | 0.0 | 0.0 | 84.03 | + | 100.0 | 1.05 | 8.0 | 0.0 | 109.05 | 17.0 | 0.0 | 0.0 | 92.05 | 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 | | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - | 29 February 2024 | Charge-off | 84.03 | 83.59 | 0.44 | 0.0 | 0.0 | 0.0 | false | false | + | 01 March 2024 | Charge-off | 92.05 | 83.59 | 0.46 | 8.0 | 0.0 | 0.0 | false | false | - @TestRailId:C3354 @AdvancedPaymentAllocation - Scenario: Verify accelerate maturity to charge-off date when interest recalculation is disabled - case when charge-off occurs in the middle of installment period + Scenario: Verify accelerate maturity to charge-off date when interest recalculation is disabled - case when fee and penalty charges due dates is before charge-off date When Admin sets the business date to "01 January 2024" When Admin creates a client with random data When Admin creates a new accelerate maturity charge-off Loan without interest recalculation and with date: "1 January 2024" @@ -5108,41 +5918,42 @@ Feature: Charge-off | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | When Admin sets the business date to "01 February 2024" And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.00 EUR transaction amount + When Admin adds "LOAN_SNOOZE_FEE" due date charge with "15 February 2024" due date and 5 EUR transaction amount + When Admin sets the business date to "15 February 2024" + And Admin adds an NSF fee because of payment bounce with "15 February 2024" transaction date 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 5.0 | 10.0 | 32.0 | 0.0 | 0.0 | 0.0 | 32.0 | | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.04 | 0 | 0 | 102.04 | 17.0 | 0 | 0 | 85.04 | + | 100 | 2.04 | 5 | 10 | 117.04 | 17.0 | 0 | 0 | 100.04 | 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 | | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - When Admin sets the business date to "14 February 2024" - And Admin does charge-off the loan on "14 February 2024" + When Admin sets the business date to "1 March 2024" + And Admin does charge-off the loan on "1 March 2024" Then Loan Repayment schedule has 2 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 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 13 | 14 February 2024 | | 0.0 | 83.59 | 0.21 | 0.0 | 0.0 | 83.8 | 0.0 | 0.0 | 0.0 | 83.8 | + | 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 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 0.0 | 83.59 | 0.46 | 5.0 | 10.0 | 99.05 | 0.0 | 0.0 | 0.0 | 99.05 | 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.8 | 0.0 | 0.0 | 100.8 | 17.0 | 0.0 | 0.0 | 83.8 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.05 | 5.0 | 10.0 | 116.05 | 17.0 | 0.0 | 0.0 | 99.05 | 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 | | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - | 14 February 2024 | Charge-off | 83.8 | 83.59 | 0.21 | 0.0 | 0.0 | 0.0 | false | false | + | 01 March 2024 | Charge-off | 99.05 | 83.59 | 0.46 | 5.0 | 10.0 | 0.0 | false | false | - @TestRailId:C3355 @AdvancedPaymentAllocation - Scenario: Verify accelerate maturity to charge-off date when interest recalculation is disabled - case when charge-off occurs after maturity date - Given Global configuration "is-principal-compounding-disabled-for-overdue-loans" is enabled + Scenario: Verify accelerate maturity to charge-off date when interest recalculation is disabled - case when fee and penalty charges due dates is before charge-off date, and one charge is waived after charge-off When Admin sets the business date to "01 January 2024" When Admin creates a client with random data When Admin creates a new accelerate maturity charge-off Loan without interest recalculation and with date: "1 January 2024" @@ -5165,57 +5976,57 @@ Feature: Charge-off | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | When Admin sets the business date to "01 February 2024" And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.00 EUR transaction amount - When Admin sets the business date to "01 March 2024" - And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.00 EUR transaction amount - When Admin sets the business date to "01 April 2024" - And Customer makes "AUTOPAY" repayment on "01 April 2024" with 17.00 EUR transaction amount - When Admin sets the business date to "01 May 2024" - And Customer makes "AUTOPAY" repayment on "01 May 2024" with 17.00 EUR transaction amount + When Admin adds "LOAN_SNOOZE_FEE" due date charge with "15 February 2024" due date and 5 EUR transaction amount + When Admin sets the business date to "15 February 2024" + And Admin adds an NSF fee because of payment bounce with "15 February 2024" transaction date 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | + | 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 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 5.0 | 10.0 | 32.0 | 0.0 | 0.0 | 0.0 | 32.0 | + | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.04 | 0.0 | 0.0 | 102.04 | 68.0 | 0.0 | 0.0 | 34.04 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.04 | 5 | 10 | 117.04 | 17.0 | 0 | 0 | 100.04 | 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 | | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - | 01 March 2024 | Repayment | 17.0 | 16.54 | 0.46 | 0.0 | 0.0 | 67.05 | false | false | - | 01 April 2024 | Repayment | 17.0 | 16.6 | 0.4 | 0.0 | 0.0 | 50.45 | false | false | - | 01 May 2024 | Repayment | 17.0 | 16.71 | 0.29 | 0.0 | 0.0 | 33.74 | false | false | - When Admin sets the business date to "15 July 2024" - And Admin does charge-off the loan on "15 July 2024" - Then Loan Repayment schedule has 6 periods, with the following data for periods: + When Admin sets the business date to "1 March 2024" + And Admin does charge-off the loan on "1 March 2024" + Then Loan Repayment schedule has 2 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 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | + | 2 | 29 | 01 March 2024 | | 0.0 | 83.59 | 0.46 | 5.0 | 10.0 | 99.05 | 0.0 | 0.0 | 0.0 | 99.05 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.04 | 0.0 | 0.0 | 102.04 | 68.0 | 0.0 | 0.0 | 34.04 | + | 100.0 | 1.05 | 5.0 | 10.0 | 116.05 | 17.0 | 0.0 | 0.0 | 99.05 | 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 | | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - | 01 March 2024 | Repayment | 17.0 | 16.54 | 0.46 | 0.0 | 0.0 | 67.05 | false | false | - | 01 April 2024 | Repayment | 17.0 | 16.6 | 0.4 | 0.0 | 0.0 | 50.45 | false | false | - | 01 May 2024 | Repayment | 17.0 | 16.71 | 0.29 | 0.0 | 0.0 | 33.74 | false | false | - | 15 July 2024 | Charge-off | 34.04 | 33.74 | 0.3 | 0.0 | 0.0 | 0.0 | false | false | - Given Global configuration "is-principal-compounding-disabled-for-overdue-loans" is disabled + | 01 March 2024 | Charge-off | 99.05 | 83.59 | 0.46 | 5.0 | 10.0 | 0.0 | false | false | + And Admin waives due date charge + Then Loan Repayment schedule has 2 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 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 0.0 | 83.59 | 0.46 | 5.0 | 10.0 | 99.05 | 0.0 | 0.0 | 0.0 | 94.05 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.05 | 5.0 | 10.0 | 116.05 | 17.0 | 0.0 | 0.0 | 94.05 | + 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 | + | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | + | 15 February 2024 | Waive loan charges | 5.0 | 0.0 | 0.0 | 0.0 | 0.0 | 83.59 | false | false | + | 01 March 2024 | Charge-off | 94.05 | 83.59 | 0.46 | 0.0 | 10.0 | 0.0 | false | true | - @TestRailId:C3356 @AdvancedPaymentAllocation - Scenario: Verify accelerate maturity to charge-off date when interest recalculation is disabled - case when charge-off occurs after one installment is overdue + Scenario: Verify accelerate maturity to charge-off date when interest recalculation is disabled - case when one fee charge is added after the charge off date When Admin sets the business date to "01 January 2024" When Admin creates a client with random data When Admin creates a new accelerate maturity charge-off Loan without interest recalculation and with date: "1 January 2024" @@ -5238,59 +6049,41 @@ Feature: Charge-off | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | When Admin sets the business date to "01 February 2024" And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.00 EUR transaction amount + When Admin adds "LOAN_SNOOZE_FEE" due date charge with "05 March 2024" due date and 5 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 5.0 | 0.0 | 22.0 | 0.0 | 0.0 | 0.0 | 22.0 | | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.04 | 0 | 0 | 102.04 | 17.0 | 0 | 0 | 85.04 | - 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 | - | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - When Admin sets the business date to "31 March 2024" - And Admin does charge-off the loan on "31 March 2024" - Then Loan Repayment schedule has 3 periods, with the following data for periods: - | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 30 | 31 March 2024 | | 0.0 | 67.05 | 0.39 | 0.0 | 0.0 | 67.44 | 0.0 | 0.0 | 0.0 | 67.44 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.44 | 0.0 | 0.0 | 101.44 | 17.0 | 0.0 | 0.0 | 84.44 | + | 100 | 2.04 | 5 | 0 | 107.04 | 17.0 | 0 | 0 | 90.04 | 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 | | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - | 31 March 2024 | Charge-off | 84.44 | 83.59 | 0.85 | 0.0 | 0.0 | 0.0 | false | false | - When Admin sets the business date to "02 April 2024" - When Admin runs inline COB job for Loan - Then Loan has 17.0 total overdue amount + When Admin sets the business date to "1 March 2024" + And Admin does charge-off the loan on "1 March 2024" Then Loan Repayment schedule has 3 periods, with the following data for periods: | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 30 | 31 March 2024 | | 0.0 | 67.05 | 0.39 | 0.0 | 0.0 | 67.44 | 0.0 | 0.0 | 0.0 | 67.44 | + | 2 | 29 | 01 March 2024 | | 0.0 | 83.59 | 0.46 | 0.0 | 0.0 | 84.05 | 0.0 | 0.0 | 0.0 | 84.05 | + | 3 | 4 | 05 March 2024 | | 0.0 | 0.0 | 0.0 | 5.0 | 0.0 | 5.0 | 0.0 | 0.0 | 0.0 | 5.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 | 1.44 | 0.0 | 0.0 | 101.44 | 17.0 | 0.0 | 0.0 | 84.44 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.05 | 5.0 | 0.0 | 106.05 | 17.0 | 0.0 | 0.0 | 89.05 | 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 | | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - | 31 March 2024 | Charge-off | 84.44 | 83.59 | 0.85 | 0.0 | 0.0 | 0.0 | false | false | + | 01 March 2024 | Charge-off | 89.05 | 83.59 | 0.46 | 5.0 | 0.0 | 0.0 | false | false | - @TestRailId:C3359 @AdvancedPaymentAllocation - Scenario: Verify accelerate maturity to charge-off date when interest recalculation is disabled - case when repayment occurs after charge-off - Given Global configuration "is-principal-compounding-disabled-for-overdue-loans" is enabled + Scenario: Verify accelerate maturity to charge-off date when interest recalculation is disabled - case when couple fee charges due dates is after charge-off date When Admin sets the business date to "01 January 2024" When Admin creates a client with random data When Admin creates a new accelerate maturity charge-off Loan without interest recalculation and with date: "1 January 2024" @@ -5313,58 +6106,42 @@ Feature: Charge-off | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | When Admin sets the business date to "01 February 2024" And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.00 EUR transaction amount + When Admin adds "LOAN_SNOOZE_FEE" due date charge with "05 March 2024" due date and 5 EUR transaction amount + When Admin adds "LOAN_SNOOZE_FEE" due date charge with "15 April 2024" due date and 2 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 5.0 | 0.0 | 22.0 | 0.0 | 0.0 | 0.0 | 22.0 | + | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 2.0 | 0.0 | 19.0 | 0.0 | 0.0 | 0.0 | 19.0 | | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.04 | 0 | 0 | 102.04 | 17.0 | 0 | 0 | 85.04 | + | 100 | 2.04 | 7 | 0 | 109.04 | 17.0 | 0 | 0 | 92.04 | 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 | | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - When Admin sets the business date to "29 February 2024" - And Admin does charge-off the loan on "29 February 2024" - Then Loan Repayment schedule has 2 periods, with the following data for periods: + When Admin sets the business date to "1 March 2024" + And Admin does charge-off the loan on "1 March 2024" + Then Loan Repayment schedule has 3 periods, with the following data for periods: | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 28 | 29 February 2024 | | 0.0 | 83.59 | 0.44 | 0.0 | 0.0 | 84.03 | 0.0 | 0.0 | 0.0 | 84.03 | + | 2 | 29 | 01 March 2024 | | 0.0 | 83.59 | 0.46 | 0.0 | 0.0 | 84.05 | 0.0 | 0.0 | 0.0 | 84.05 | + | 3 | 45 | 15 April 2024 | | 0.0 | 0.0 | 0.0 | 7.0 | 0.0 | 7.0 | 0.0 | 0.0 | 0.0 | 7.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 | 1.03 | 0.0 | 0.0 | 101.03 | 17.0 | 0.0 | 0.0 | 84.03 | - 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 | - | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - | 29 February 2024 | Charge-off | 84.03 | 83.59 | 0.44 | 0.0 | 0.0 | 0.0 | false | false | - When Admin sets the business date to "01 March 2024" - And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.0 EUR transaction amount - Then Loan Repayment schedule has 2 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 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 28 | 29 February 2024 | | 0.0 | 83.59 | 0.44 | 0.0 | 0.0 | 84.03 | 17.0 | 0.0 | 17.0 | 67.03 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.03 | 0.0 | 0.0 | 101.03 | 34.0 | 0.0 | 17.0 | 67.03 | + | 100.0 | 1.05 | 7.0 | 0.0 | 108.05 | 17.0 | 0.0 | 0.0 | 91.05 | 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 | | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - | 29 February 2024 | Charge-off | 84.03 | 83.59 | 0.44 | 0.0 | 0.0 | 0.0 | false | false | - | 01 March 2024 | Repayment | 17.0 | 16.56 | 0.44 | 0.0 | 0.0 | 67.03 | false | false | - And Global configuration "is-principal-compounding-disabled-for-overdue-loans" is disabled + | 01 March 2024 | Charge-off | 91.05 | 83.59 | 0.46 | 7.0 | 0.0 | 0.0 | false | false | - @TestRailId:C3358 @AdvancedPaymentAllocation - Scenario: Verify accelerate maturity to charge-off date when interest recalculation is disabled - case when repayment reversal occurs after charge-off - Given Global configuration "is-principal-compounding-disabled-for-overdue-loans" is enabled + Scenario: Verify accelerate maturity to charge-off date when interest recalculation is disabled - case when fee and penalty charges due dates is after charge-off date When Admin sets the business date to "01 January 2024" When Admin creates a client with random data When Admin creates a new accelerate maturity charge-off Loan without interest recalculation and with date: "1 January 2024" @@ -5387,56 +6164,42 @@ Feature: Charge-off | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | When Admin sets the business date to "01 February 2024" And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.00 EUR transaction amount + When Admin adds "LOAN_SNOOZE_FEE" due date charge with "05 March 2024" due date and 5 EUR transaction amount + When Admin sets the business date to "15 February 2024" + And Admin adds an NSF fee because of payment bounce with "29 February 2024" transaction date 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 10.0 | 27.0 | 0.0 | 0.0 | 0.0 | 27.0 | + | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 5.0 | 0.0 | 22.0 | 0.0 | 0.0 | 0.0 | 22.0 | | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.04 | 0 | 0 | 102.04 | 17.0 | 0 | 0 | 85.04 | + | 100 | 2.04 | 5 | 10 | 117.04 | 17.0 | 0 | 0 | 100.04 | 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 | | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - When Admin sets the business date to "29 February 2024" - And Admin does charge-off the loan on "29 February 2024" - Then Loan Repayment schedule has 2 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 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 28 | 29 February 2024 | | 0.0 | 83.59 | 0.44 | 0.0 | 0.0 | 84.03 | 0.0 | 0.0 | 0.0 | 84.03 | + And Admin does charge-off the loan on "15 February 2024" + Then Loan Repayment schedule has 3 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | + | 2 | 14 | 15 February 2024 | | 0.0 | 83.59 | 0.22 | 0.0 | 10.0 | 93.81 | 0.0 | 0.0 | 0.0 | 93.81 | + | 3 | 19 | 05 March 2024 | | 0.0 | 0.0 | 0.0 | 5.0 | 0.0 | 5.0 | 0.0 | 0.0 | 0.0 | 5.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 | 1.03 | 0.0 | 0.0 | 101.03 | 17.0 | 0.0 | 0.0 | 84.03 | + | 100.0 | 0.81 | 5.0 | 10.0 | 115.81 | 17.0 | 0.0 | 0.0 | 98.81 | 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 | | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - | 29 February 2024 | Charge-off | 84.03 | 83.59 | 0.44 | 0.0 | 0.0 | 0.0 | false | false | - When Customer undo "1"th repayment on "01 February 2024" - Then Loan Repayment schedule has 2 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 | 31 | 01 February 2024 | | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 2 | 28 | 29 February 2024 | | 0.0 | 83.59 | 0.44 | 0.0 | 0.0 | 84.03 | 0.0 | 0.0 | 0.0 | 84.03 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.03 | 0.0 | 0.0 | 101.03 | 0.0 | 0.0 | 0.0 | 101.03 | - 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 | - | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | true | false | - | 29 February 2024 | Charge-off | 101.03 | 100.0 | 1.03 | 0.0 | 0.0 | 0.0 | false | true | - And Global configuration "is-principal-compounding-disabled-for-overdue-loans" is disabled + | 15 February 2024 | Charge-off | 98.81 | 83.59 | 0.22 | 5.0 | 10.0 | 0.0 | false | false | - @TestRailId:C3357 @AdvancedPaymentAllocation - Scenario: Verify accelerate maturity to charge-off date when interest recalculation is disabled - case when backdated repayment occurs after charge-off - Given Global configuration "is-principal-compounding-disabled-for-overdue-loans" is enabled + Scenario: Verify accelerate maturity to charge-off date when interest recalculation is disabled - case when fee and penalty charges due dates is after charge-off date, and one charge is waived after charge-off When Admin sets the business date to "01 January 2024" When Admin creates a client with random data When Admin creates a new accelerate maturity charge-off Loan without interest recalculation and with date: "1 January 2024" @@ -5459,53 +6222,54 @@ Feature: Charge-off | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | When Admin sets the business date to "01 February 2024" And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.00 EUR transaction amount + When Admin adds "LOAN_SNOOZE_FEE" due date charge with "05 March 2024" due date and 5 EUR transaction amount + When Admin sets the business date to "15 February 2024" + And Admin adds an NSF fee because of payment bounce with "29 February 2024" transaction date 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 10.0 | 27.0 | 0.0 | 0.0 | 0.0 | 27.0 | + | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.4 | 5.0 | 0.0 | 22.0 | 0.0 | 0.0 | 0.0 | 22.0 | | 4 | 30 | 01 May 2024 | | 33.74 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | | 5 | 31 | 01 June 2024 | | 16.94 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100 | 2.04 | 0 | 0 | 102.04 | 17.0 | 0 | 0 | 85.04 | + | 100 | 2.04 | 5 | 10 | 117.04 | 17.0 | 0 | 0 | 100.04 | 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 | | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - When Admin sets the business date to "31 March 2024" - And Admin does charge-off the loan on "31 March 2024" + And Admin does charge-off the loan on "15 February 2024" Then Loan Repayment schedule has 3 periods, with the following data for periods: - | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 30 | 31 March 2024 | | 0.0 | 67.05 | 0.39 | 0.0 | 0.0 | 67.44 | 0.0 | 0.0 | 0.0 | 67.44 | + | 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 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | + | 2 | 14 | 15 February 2024 | | 0.0 | 83.59 | 0.22 | 0.0 | 10.0 | 93.81 | 0.0 | 0.0 | 0.0 | 93.81 | + | 3 | 19 | 05 March 2024 | | 0.0 | 0.0 | 0.0 | 5.0 | 0.0 | 5.0 | 0.0 | 0.0 | 0.0 | 5.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 | 1.44 | 0.0 | 0.0 | 101.44 | 17.0 | 0.0 | 0.0 | 84.44 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 0.81 | 5.0 | 10.0 | 115.81 | 17.0 | 0.0 | 0.0 | 98.81 | 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 | | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - | 31 March 2024 | Charge-off | 84.44 | 83.59 | 0.85 | 0.0 | 0.0 | 0.0 | false | false | -# --- Backdated repayment --- - And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.0 EUR transaction amount + | 15 February 2024 | Charge-off | 98.81 | 83.59 | 0.22 | 5.0 | 10.0 | 0.0 | false | false | + And Admin waives charge 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 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.54 | 0.46 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | - | 3 | 30 | 31 March 2024 | | 0.0 | 67.05 | 0.39 | 0.0 | 0.0 | 67.44 | 0.0 | 0.0 | 0.0 | 67.44 | + | 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 | 31 | 01 February 2024 | 01 February 2024 | 83.59 | 16.41 | 0.59 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | + | 2 | 14 | 15 February 2024 | | 0.0 | 83.59 | 0.22 | 0.0 | 10.0 | 93.81 | 0.0 | 0.0 | 0.0 | 83.81 | + | 3 | 19 | 05 March 2024 | | 0.0 | 0.0 | 0.0 | 5.0 | 0.0 | 5.0 | 0.0 | 0.0 | 0.0 | 5.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 | 1.44 | 0.0 | 0.0 | 101.44 | 34.0 | 0.0 | 0.0 | 67.44 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 0.81 | 5.0 | 10.0 | 115.81 | 17.0 | 0.0 | 0.0 | 88.81 | 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 | - | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | - | 01 March 2024 | Repayment | 17.0 | 16.54 | 0.46 | 0.0 | 0.0 | 67.05 | false | false | - | 31 March 2024 | Charge-off | 67.44 | 67.05 | 0.39 | 0.0 | 0.0 | 0.0 | false | true | - And Global configuration "is-principal-compounding-disabled-for-overdue-loans" is disabled + | 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 | + | 01 February 2024 | Repayment | 17.0 | 16.41 | 0.59 | 0.0 | 0.0 | 83.59 | false | false | + | 15 February 2024 | Waive loan charges | 10.0 | 0.0 | 0.0 | 0.0 | 0.0 | 83.59 | false | false | + | 15 February 2024 | Charge-off | 88.81 | 83.59 | 0.22 | 5.0 | 0.0 | 0.0 | false | true | + 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 4b7805a2768..e4adbe9f967 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/LoanChargeback.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/LoanChargeback.feature @@ -1030,7 +1030,7 @@ Feature: LoanChargeback 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 | - | LP1 | 01 January 2023 | 750 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | PENALTIES_FEES_INTEREST_PRINCIPAL_ORDER | + | LP1 | 01 January 2023 | 750 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | PENALTIES_FEES_INTEREST_PRINCIPAL_ORDER | And Admin successfully approves the loan on "01 January 2023" with "750" amount and expected disbursement date on "01 January 2023" When Admin successfully disburse the loan on "01 January 2023" with "750" EUR transaction amount When Admin sets the business date to "01 February 2023" @@ -1327,7 +1327,7 @@ Feature: LoanChargeback 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 | + | 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 September 2023 | 400 | 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 September 2023" with "400" amount and expected disbursement date on "01 September 2023" When Admin successfully disburse the loan on "01 September 2023" with "400" EUR transaction amount @@ -1369,7 +1369,7 @@ Feature: LoanChargeback 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 | + | 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 September 2023 | 400 | 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 September 2023" with "400" amount and expected disbursement date on "01 September 2023" When Admin successfully disburse the loan on "01 September 2023" with "400" EUR transaction amount @@ -1411,7 +1411,7 @@ Feature: LoanChargeback 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 | + | 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 September 2023 | 400 | 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 September 2023" with "400" amount and expected disbursement date on "01 September 2023" When Admin successfully disburse the loan on "01 September 2023" with "400" EUR transaction amount @@ -1455,7 +1455,7 @@ Feature: LoanChargeback 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 | + | 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 September 2023 | 400 | 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 September 2023" with "400" amount and expected disbursement date on "01 September 2023" When Admin successfully disburse the loan on "01 September 2023" with "400" EUR transaction amount @@ -1499,7 +1499,7 @@ Feature: LoanChargeback 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 | + | 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 September 2023 | 400 | 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 September 2023" with "400" amount and expected disbursement date on "01 September 2023" When Admin successfully disburse the loan on "01 September 2023" with "400" EUR transaction amount @@ -1544,7 +1544,7 @@ Feature: LoanChargeback 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 | + | 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 September 2023 | 400 | 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 September 2023" with "400" amount and expected disbursement date on "01 September 2023" When Admin successfully disburse the loan on "01 September 2023" with "400" EUR transaction amount @@ -1589,7 +1589,7 @@ Feature: LoanChargeback 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 | + | 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 September 2023 | 400 | 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 September 2023" with "400" amount and expected disbursement date on "01 September 2023" When Admin successfully disburse the loan on "01 September 2023" with "400" EUR transaction amount @@ -1637,7 +1637,7 @@ Feature: LoanChargeback 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 | + | 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 September 2023 | 400 | 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 September 2023" with "400" amount and expected disbursement date on "01 September 2023" When Admin successfully disburse the loan on "01 September 2023" with "400" EUR transaction amount @@ -1679,7 +1679,7 @@ Feature: LoanChargeback 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 | + | 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 September 2023 | 400 | 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 September 2023" with "400" amount and expected disbursement date on "01 September 2023" When Admin successfully disburse the loan on "01 September 2023" with "400" EUR transaction amount @@ -1720,7 +1720,7 @@ Feature: LoanChargeback 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 | + | 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 September 2023 | 400 | 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 September 2023" with "400" amount and expected disbursement date on "01 September 2023" When Admin successfully disburse the loan on "01 September 2023" with "400" EUR transaction amount @@ -1761,7 +1761,7 @@ Feature: LoanChargeback 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 | + | 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 September 2023 | 400 | 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 September 2023" with "400" amount and expected disbursement date on "01 September 2023" When Admin successfully disburse the loan on "01 September 2023" with "400" EUR transaction amount @@ -1799,7 +1799,7 @@ Feature: LoanChargeback 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 | + | 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 September 2023 | 400 | 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 September 2023" with "400" amount and expected disbursement date on "01 September 2023" When Admin successfully disburse the loan on "01 September 2023" with "400" EUR transaction amount @@ -1848,7 +1848,7 @@ Feature: LoanChargeback When Admin sets the business date to "01 September 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 September 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 September 2023" with "1000" amount and expected disbursement date on "01 September 2023" When Admin successfully disburse the loan on "01 September 2023" with "1000" EUR transaction amount @@ -1878,7 +1878,7 @@ Feature: LoanChargeback 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 | + | 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 January 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 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 @@ -1905,7 +1905,7 @@ Feature: LoanChargeback 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 | + | 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 January 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 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 @@ -1931,7 +1931,7 @@ Feature: LoanChargeback 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 | + | 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 | 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 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 @@ -1949,7 +1949,7 @@ Feature: LoanChargeback 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 | + | 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 January 2024 | 500 | 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 January 2024" with "500" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "500" EUR transaction amount @@ -2028,7 +2028,7 @@ Feature: LoanChargeback 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 | + | 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 January 2024 | 500 | 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 January 2024" with "500" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "500" EUR transaction amount @@ -2107,7 +2107,7 @@ Feature: LoanChargeback 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 | + | 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 | 500 | 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 January 2024" with "500" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "500" EUR transaction amount @@ -2145,7 +2145,7 @@ Feature: LoanChargeback 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 | + | 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 | 500 | 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 January 2024" with "500" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "500" EUR transaction amount @@ -2185,7 +2185,7 @@ Feature: LoanChargeback 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 | + | 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 | 500 | 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 January 2024" with "500" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "500" EUR transaction amount @@ -2225,7 +2225,7 @@ Feature: LoanChargeback 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 | + | 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 | 500 | 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 January 2024" with "500" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "500" EUR transaction amount @@ -2267,7 +2267,7 @@ Feature: LoanChargeback 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 | + | 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 | 500 | 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 January 2024" with "500" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "500" EUR transaction amount @@ -2307,7 +2307,7 @@ Feature: LoanChargeback 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 | + | 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 | 500 | 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 January 2024" with "500" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "500" EUR transaction amount @@ -2355,7 +2355,7 @@ Feature: LoanChargeback 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 | + | 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 | 500 | 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 January 2024" with "500" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "500" EUR transaction amount @@ -2397,7 +2397,7 @@ Feature: LoanChargeback 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 | + | 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 | 500 | 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 January 2024" with "500" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "500" EUR transaction amount @@ -2438,7 +2438,7 @@ Feature: LoanChargeback 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 | + | 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 | 1000 | 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 "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 @@ -2480,7 +2480,7 @@ Feature: LoanChargeback 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 | + | 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 | 1000 | 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 "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 @@ -2525,7 +2525,7 @@ Feature: LoanChargeback 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 | + | 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 | 1000 | 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 "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 @@ -2570,7 +2570,7 @@ Feature: LoanChargeback 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 | + | 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 | 1000 | 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 "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 @@ -2616,7 +2616,7 @@ Feature: LoanChargeback 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 | + | 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 | 1000 | 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 "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 @@ -2667,7 +2667,7 @@ Feature: LoanChargeback 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 | + | 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 | 1000 | 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 "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 @@ -2712,7 +2712,7 @@ Feature: LoanChargeback 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 | + | 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 | 1000 | 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 "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 @@ -2755,7 +2755,7 @@ Feature: LoanChargeback 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 | + | 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 | 1000 | 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 "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 @@ -2801,7 +2801,7 @@ Feature: LoanChargeback 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 | + | 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 | 1000 | 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 "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 @@ -2847,7 +2847,7 @@ Feature: LoanChargeback 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 | + | 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 @@ -2975,7 +2975,7 @@ Feature: LoanChargeback 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 | + | 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 @@ -3096,7 +3096,7 @@ Feature: LoanChargeback 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 | + | 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 @@ -3229,7 +3229,7 @@ Feature: LoanChargeback 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 | + | 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 @@ -3391,7 +3391,7 @@ Feature: LoanChargeback 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 | + | 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 @@ -3756,6 +3756,486 @@ Feature: LoanChargeback | 15 July 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | false | false | | 15 July 2024 | Chargeback | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | 34.01 | false | false | + @TestRailId:C3417 + Scenario: Full chargeback before the maturity date and interest recalculation DISABLED - Allocation priority: interest, fees, principal - UC1 + When Admin sets the business date to "1 January 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_CHARGEBACK_INTEREST_FEE_PRINCIPAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin sets the business date to "1 March 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 34.02 | 0 | 0 | 68.03 | + 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | +# --- full chargeback for 2nd repayment made on March, 1st --- # + And Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount for Payment nr. 2 + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | | 50.43 | 33.14 | 0.88 | 0.0 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 116.52 | 2.54 | 0 | 0 | 119.06 | 34.02 | 0 | 0 | 85.04 | + 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | + | 01 March 2024 | Chargeback | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 83.57 | false | false | + + @TestRailId:C3418 + Scenario: Partial chargeback before the maturity date and interest recalculation DISABLED - Allocation priority: interest, fees, principal - UC2 + When Admin sets the business date to "1 January 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_CHARGEBACK_INTEREST_FEE_PRINCIPAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin sets the business date to "1 March 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 34.02 | 0 | 0 | 68.03 | + 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | + # --- partial chargeback for 2nd repayment made on March, 1st --- # + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 15 EUR transaction amount for Payment nr. 2 + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | | 50.43 | 31.13 | 0.88 | 0.0 | 0.0 | 32.01 | 0.0 | 0.0 | 0.0 | 32.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 114.51 | 2.54 | 0 | 0 | 117.05 | 34.02 | 0 | 0 | 83.03 | + 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | + | 01 March 2024 | Chargeback | 15.0 | 14.51 | 0.49 | 0.0 | 0.0 | 81.56 | false | false | + + @TestRailId:C3419 + Scenario: Partial chargeback before the maturity date and interest recalculation DISABLED - Allocation priority: principal, interest, fees - UC3 + When Admin sets the business date to "1 January 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_CHARGEBACK_PRINCIPAL_INTEREST_FEE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin sets the business date to "1 March 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 34.02 | 0 | 0 | 68.03 | + 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | +# --- partial chargeback for 2nd repayment made on March, 1st --- # + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 15 EUR transaction amount for Payment nr. 2 + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | | 50.43 | 31.62 | 0.39 | 0.0 | 0.0 | 32.01 | 0.0 | 0.0 | 0.0 | 32.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 115.0 | 2.05 | 0 | 0 | 117.05 | 34.02 | 0 | 0 | 83.03 | + 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | + | 01 March 2024 | Chargeback | 15.0 | 15.0 | 0.0 | 0.0 | 0.0 | 82.05 | false | false | + + @TestRailId:C3420 + Scenario: Two chargeback before the maturity date and interest recalculation DISABLED - Allocation priority: principal, interest, fees - UC4 + When Admin sets the business date to "1 January 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_CHARGEBACK_PRINCIPAL_INTEREST_FEE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin sets the business date to "1 March 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 34.02 | 0 | 0 | 68.03 | + 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | +# --- partial chargeback for 1st repayment made on February, 1st --- # + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 15 EUR transaction amount for Payment nr. 1 + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | | 50.43 | 31.62 | 0.39 | 0.0 | 0.0 | 32.01 | 0.0 | 0.0 | 0.0 | 32.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 115.0 | 2.05 | 0 | 0 | 117.05 | 34.02 | 0 | 0 | 83.03 | + 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | + | 01 March 2024 | Chargeback | 15.0 | 15.0 | 0.0 | 0.0 | 0.0 | 82.05 | false | false | +# --- full chargeback for 2nd repayment made on March, 1st --- # + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount for Payment nr. 2 + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | | 50.43 | 48.14 | 0.88 | 0.0 | 0.0 | 49.02 | 0.0 | 0.0 | 0.0 | 49.02 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 131.52 | 2.54 | 0 | 0 | 134.06 | 34.02 | 0 | 0 | 100.04 | + 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | + | 01 March 2024 | Chargeback | 15.0 | 15.0 | 0.0 | 0.0 | 0.0 | 82.05 | false | false | + | 01 March 2024 | Chargeback | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 98.57 | false | false | + + @TestRailId:C3421 + Scenario: Full chargeback before the maturity date on different business date and interest recalculation DISABLED - Allocation priority: interest, fees, principal - UC5 + When Admin sets the business date to "1 January 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_CHARGEBACK_INTEREST_FEE_PRINCIPAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin sets the business date to "1 March 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 34.02 | 0 | 0 | 68.03 | + 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | +# --- full chargeback for 2nd repayment made on March, 1st --- # + When Admin sets the business date to "15 March 2024" + And Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount for Payment nr. 2 + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | | 50.43 | 33.14 | 0.88 | 0.0 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 116.52 | 2.54 | 0 | 0 | 119.06 | 34.02 | 0 | 0 | 85.04 | + 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | + | 15 March 2024 | Chargeback | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 83.57 | false | false | + + @TestRailId:C3422 + Scenario: Full chargeback after the maturity date and interest recalculation DISABLED - Allocation priority: interest, fees, principal - UC6 + When Admin sets the business date to "1 January 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_CHARGEBACK_INTEREST_FEE_PRINCIPAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + When Admin sets the business date to "01 March 2024" + And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR transaction amount + When Admin sets the business date to "01 April 2024" + And Customer makes "AUTOPAY" repayment on "01 April 2024" with 17.01 EUR transaction amount + When Admin sets the business date to "01 May 2024" + And Customer makes "AUTOPAY" repayment on "01 May 2024" with 17.01 EUR transaction amount + When Admin sets the business date to "01 June 2024" + And Customer makes "AUTOPAY" repayment on "01 June 2024" with 17.01 EUR transaction amount + When Admin sets the business date to "01 July 2024" + And Customer makes "AUTOPAY" repayment on "01 July 2024" with 17 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 5 | 31 | 01 June 2024 | 01 June 2024 | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 6 | 30 | 01 July 2024 | 01 July 2024 | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 17.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 | 2.05 | 0 | 0 | 102.05 | 102.05 | 0 | 0 | 0.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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | + | 01 April 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 50.43 | false | false | + | 01 May 2024 | Repayment | 17.01 | 16.72 | 0.29 | 0.0 | 0.0 | 33.71 | false | false | + | 01 June 2024 | Repayment | 17.01 | 16.81 | 0.2 | 0.0 | 0.0 | 16.9 | false | false | + | 01 July 2024 | Repayment | 17.0 | 16.9 | 0.1 | 0.0 | 0.0 | 0.0 | false | false | + | 01 July 2024 | Accrual | 2.05 | 0.0 | 2.05 | 0.0 | 0.0 | 0.0 | false | false | +# --- full chargeback for 5th repayment made on June, 1st --- # + When Admin sets the business date to "15 July 2024" + And Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount for Payment nr. 5 + Then Loan Repayment schedule has 7 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 5 | 31 | 01 June 2024 | 01 June 2024 | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 6 | 30 | 01 July 2024 | 01 July 2024 | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | + | 7 | 14 | 15 July 2024 | | 0.0 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 116.81 | 2.25 | 0 | 0 | 119.06 | 102.05 | 0 | 0 | 17.01 | + 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | + | 01 April 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 50.43 | false | false | + | 01 May 2024 | Repayment | 17.01 | 16.72 | 0.29 | 0.0 | 0.0 | 33.71 | false | false | + | 01 June 2024 | Repayment | 17.01 | 16.81 | 0.2 | 0.0 | 0.0 | 16.9 | false | false | + | 01 July 2024 | Repayment | 17.0 | 16.9 | 0.1 | 0.0 | 0.0 | 0.0 | false | false | + | 01 July 2024 | Accrual | 2.05 | 0.0 | 2.05 | 0.0 | 0.0 | 0.0 | false | false | + | 15 July 2024 | Chargeback | 17.01 | 16.81 | 0.2 | 0.0 | 0.0 | 16.81 | false | false | + + @TestRailId:C3423 + Scenario: Two chargebacks after the maturity date and interest recalculation DISABLED - Allocation priority: interest, fees, principal - UC7 + When Admin sets the business date to "1 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 | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_CHARGEBACK_INTEREST_FEE_PRINCIPAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | + And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" + And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + When Admin sets the business date to "01 March 2024" + And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR transaction amount + When Admin sets the business date to "01 April 2024" + And Customer makes "AUTOPAY" repayment on "01 April 2024" with 17.01 EUR transaction amount + When Admin sets the business date to "01 May 2024" + And Customer makes "AUTOPAY" repayment on "01 May 2024" with 17.01 EUR transaction amount + When Admin sets the business date to "01 June 2024" + And Customer makes "AUTOPAY" repayment on "01 June 2024" with 17.01 EUR transaction amount + When Admin sets the business date to "01 July 2024" + And Customer makes "AUTOPAY" repayment on "01 July 2024" with 17 EUR transaction amount +# --- full chargeback for 5th repayment made on June, 1st --- # + When Admin sets the business date to "15 July 2024" + And Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount for Payment nr. 5 +# --- full chargeback for 6th repayment made on July, 1st --- # + When Admin sets the business date to "30 July 2024" + And Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17 EUR transaction amount for Payment nr. 6 + Then Loan Repayment schedule has 7 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 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 5 | 31 | 01 June 2024 | 01 June 2024 | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 6 | 30 | 01 July 2024 | 01 July 2024 | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 17.0 | 0.0 | 0.0 | 0.0 | + | 7 | 29 | 30 July 2024 | | 0.0 | 33.71 | 0.3 | 0.0 | 0.0 | 34.01 | 0.0 | 0.0 | 0.0 | 34.01 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 133.71 | 2.35 | 0 | 0 | 136.06 | 102.05 | 0 | 0 | 34.01 | + 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 | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | + | 01 April 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 50.43 | false | false | + | 01 May 2024 | Repayment | 17.01 | 16.72 | 0.29 | 0.0 | 0.0 | 33.71 | false | false | + | 01 June 2024 | Repayment | 17.01 | 16.81 | 0.2 | 0.0 | 0.0 | 16.9 | false | false | + | 01 July 2024 | Repayment | 17.0 | 16.9 | 0.1 | 0.0 | 0.0 | 0.0 | false | false | + | 01 July 2024 | Accrual | 2.05 | 0.0 | 2.05 | 0.0 | 0.0 | 0.0 | false | false | + | 15 July 2024 | Chargeback | 17.01 | 16.81 | 0.2 | 0.0 | 0.0 | 16.81 | false | false | + | 30 July 2024 | Chargeback | 17.0 | 16.9 | 0.1 | 0.0 | 0.0 | 33.71 | false | false | + Scenario: Full chargeback with no interest recalculation, interest allocation first, before maturity date When Admin sets the business date to "1 January 2024" And Admin creates a client with random data @@ -4015,3 +4495,143 @@ Feature: LoanChargeback | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | | 01 March 2024 | Chargeback | 15.0 | 15.0 | 0.0 | 0.0 | 0.0 | 82.05 | false | false | | 01 March 2024 | Chargeback | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 98.57 | false | false | + + @TestRailId:C3443 + Scenario: Verify that Accrual transactions are not created for the charged back interest - interest recalculation false + chargeback allocation rule is set + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And 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_NO_INTEREST_RECALCULATION_CHARGEBACK_ALLOCATION_INTEREST_FIRST | 01 January 2024 | 2000 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "2000" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "2000" EUR transaction amount + And Admin sets the business date to "15 January 2024" + And Customer makes "AUTOPAY" repayment on "15 January 2024" with 340.17 EUR transaction amount + And Admin runs inline COB job for Loan + And Admin sets the business date to "15 February 2024" + And Admin adds "LOAN_NSF_FEE" due date charge with "15 February 2024" due date and 5 EUR transaction amount + And Admin runs inline COB job for Loan + And Admin sets the business date to "01 March 2024" + And Admin runs inline COB job for Loan + And Customer makes "AUTOPAY" repayment on "01 March 2024" with 345.17 EUR transaction amount + And Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 345.17 EUR transaction amount for Payment nr. 2 + And Admin sets the business date to "01 April 2024" + And Admin runs inline COB job for Loan + And Customer makes "AUTOPAY" repayment on "01 April 2024" with 685.34 EUR transaction amount + And Admin sets the business date to "01 May 2024" + And Admin runs inline COB job for Loan + 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 | 2000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 2000.0 | false | false | + | 14 January 2024 | Accrual | 4.89 | 0.0 | 4.89 | 0.0 | 0.0 | 0.0 | false | false | + | 15 January 2024 | Repayment | 340.17 | 328.5 | 11.67 | 0.0 | 0.0 | 1671.5 | false | false | + | 15 January 2024 | Accrual | 0.38 | 0.0 | 0.38 | 0.0 | 0.0 | 0.0 | false | false | + | 16 January 2024 | Accrual | 0.38 | 0.0 | 0.38 | 0.0 | 0.0 | 0.0 | false | false | + | 17 January 2024 | Accrual | 0.37 | 0.0 | 0.37 | 0.0 | 0.0 | 0.0 | false | false | + | 18 January 2024 | Accrual | 0.38 | 0.0 | 0.38 | 0.0 | 0.0 | 0.0 | false | false | + | 19 January 2024 | Accrual | 0.37 | 0.0 | 0.37 | 0.0 | 0.0 | 0.0 | false | false | + | 20 January 2024 | Accrual | 0.38 | 0.0 | 0.38 | 0.0 | 0.0 | 0.0 | false | false | + | 21 January 2024 | Accrual | 0.38 | 0.0 | 0.38 | 0.0 | 0.0 | 0.0 | false | false | + | 22 January 2024 | Accrual | 0.37 | 0.0 | 0.37 | 0.0 | 0.0 | 0.0 | false | false | + | 23 January 2024 | Accrual | 0.38 | 0.0 | 0.38 | 0.0 | 0.0 | 0.0 | false | false | + | 24 January 2024 | Accrual | 0.38 | 0.0 | 0.38 | 0.0 | 0.0 | 0.0 | false | false | + | 25 January 2024 | Accrual | 0.37 | 0.0 | 0.37 | 0.0 | 0.0 | 0.0 | false | false | + | 26 January 2024 | Accrual | 0.38 | 0.0 | 0.38 | 0.0 | 0.0 | 0.0 | false | false | + | 27 January 2024 | Accrual | 0.37 | 0.0 | 0.37 | 0.0 | 0.0 | 0.0 | false | false | + | 28 January 2024 | Accrual | 0.38 | 0.0 | 0.38 | 0.0 | 0.0 | 0.0 | false | false | + | 29 January 2024 | Accrual | 0.38 | 0.0 | 0.38 | 0.0 | 0.0 | 0.0 | false | false | + | 30 January 2024 | Accrual | 0.37 | 0.0 | 0.37 | 0.0 | 0.0 | 0.0 | false | false | + | 31 January 2024 | Accrual | 0.38 | 0.0 | 0.38 | 0.0 | 0.0 | 0.0 | false | false | + | 01 February 2024 | Accrual | 0.38 | 0.0 | 0.38 | 0.0 | 0.0 | 0.0 | false | false | + | 02 February 2024 | Accrual | 0.34 | 0.0 | 0.34 | 0.0 | 0.0 | 0.0 | false | false | + | 03 February 2024 | Accrual | 0.33 | 0.0 | 0.33 | 0.0 | 0.0 | 0.0 | false | false | + | 04 February 2024 | Accrual | 0.34 | 0.0 | 0.34 | 0.0 | 0.0 | 0.0 | false | false | + | 05 February 2024 | Accrual | 0.33 | 0.0 | 0.33 | 0.0 | 0.0 | 0.0 | false | false | + | 06 February 2024 | Accrual | 0.34 | 0.0 | 0.34 | 0.0 | 0.0 | 0.0 | false | false | + | 07 February 2024 | Accrual | 0.34 | 0.0 | 0.34 | 0.0 | 0.0 | 0.0 | false | false | + | 08 February 2024 | Accrual | 0.33 | 0.0 | 0.33 | 0.0 | 0.0 | 0.0 | false | false | + | 09 February 2024 | Accrual | 0.34 | 0.0 | 0.34 | 0.0 | 0.0 | 0.0 | false | false | + | 10 February 2024 | Accrual | 0.34 | 0.0 | 0.34 | 0.0 | 0.0 | 0.0 | false | false | + | 11 February 2024 | Accrual | 0.33 | 0.0 | 0.33 | 0.0 | 0.0 | 0.0 | false | false | + | 12 February 2024 | Accrual | 0.34 | 0.0 | 0.34 | 0.0 | 0.0 | 0.0 | false | false | + | 13 February 2024 | Accrual | 0.33 | 0.0 | 0.33 | 0.0 | 0.0 | 0.0 | false | false | + | 14 February 2024 | Accrual | 0.34 | 0.0 | 0.34 | 0.0 | 0.0 | 0.0 | false | false | + | 15 February 2024 | Accrual | 5.34 | 0.0 | 0.34 | 0.0 | 5.0 | 0.0 | false | false | + | 16 February 2024 | Accrual | 0.33 | 0.0 | 0.33 | 0.0 | 0.0 | 0.0 | false | false | + | 17 February 2024 | Accrual | 0.34 | 0.0 | 0.34 | 0.0 | 0.0 | 0.0 | false | false | + | 18 February 2024 | Accrual | 0.34 | 0.0 | 0.34 | 0.0 | 0.0 | 0.0 | false | false | + | 19 February 2024 | Accrual | 0.33 | 0.0 | 0.33 | 0.0 | 0.0 | 0.0 | false | false | + | 20 February 2024 | Accrual | 0.34 | 0.0 | 0.34 | 0.0 | 0.0 | 0.0 | false | false | + | 21 February 2024 | Accrual | 0.33 | 0.0 | 0.33 | 0.0 | 0.0 | 0.0 | false | false | + | 22 February 2024 | Accrual | 0.34 | 0.0 | 0.34 | 0.0 | 0.0 | 0.0 | false | false | + | 23 February 2024 | Accrual | 0.34 | 0.0 | 0.34 | 0.0 | 0.0 | 0.0 | false | false | + | 24 February 2024 | Accrual | 0.33 | 0.0 | 0.33 | 0.0 | 0.0 | 0.0 | false | false | + | 25 February 2024 | Accrual | 0.34 | 0.0 | 0.34 | 0.0 | 0.0 | 0.0 | false | false | + | 26 February 2024 | Accrual | 0.34 | 0.0 | 0.34 | 0.0 | 0.0 | 0.0 | false | false | + | 27 February 2024 | Accrual | 0.33 | 0.0 | 0.33 | 0.0 | 0.0 | 0.0 | false | false | + | 28 February 2024 | Accrual | 0.34 | 0.0 | 0.34 | 0.0 | 0.0 | 0.0 | false | false | + | 29 February 2024 | Accrual | 0.33 | 0.0 | 0.33 | 0.0 | 0.0 | 0.0 | false | false | + | 01 March 2024 | Repayment | 345.17 | 330.42 | 9.75 | 0.0 | 5.0 | 1341.08 | false | false | + | 01 March 2024 | Chargeback | 345.17 | 330.42 | 9.75 | 0.0 | 5.0 | 1671.5 | false | false | + | 01 March 2024 | Accrual | 0.34 | 0.0 | 0.34 | 0.0 | 0.0 | 0.0 | false | false | + | 02 March 2024 | Accrual | 0.25 | 0.0 | 0.25 | 0.0 | 0.0 | 0.0 | false | false | + | 03 March 2024 | Accrual | 0.25 | 0.0 | 0.25 | 0.0 | 0.0 | 0.0 | false | false | + | 04 March 2024 | Accrual | 0.26 | 0.0 | 0.26 | 0.0 | 0.0 | 0.0 | false | false | + | 05 March 2024 | Accrual | 0.25 | 0.0 | 0.25 | 0.0 | 0.0 | 0.0 | false | false | + | 06 March 2024 | Accrual | 0.25 | 0.0 | 0.25 | 0.0 | 0.0 | 0.0 | false | false | + | 07 March 2024 | Accrual | 0.25 | 0.0 | 0.25 | 0.0 | 0.0 | 0.0 | false | false | + | 08 March 2024 | Accrual | 0.26 | 0.0 | 0.26 | 0.0 | 0.0 | 0.0 | false | false | + | 09 March 2024 | Accrual | 0.25 | 0.0 | 0.25 | 0.0 | 0.0 | 0.0 | false | false | + | 10 March 2024 | Accrual | 0.25 | 0.0 | 0.25 | 0.0 | 0.0 | 0.0 | false | false | + | 11 March 2024 | Accrual | 0.25 | 0.0 | 0.25 | 0.0 | 0.0 | 0.0 | false | false | + | 12 March 2024 | Accrual | 0.26 | 0.0 | 0.26 | 0.0 | 0.0 | 0.0 | false | false | + | 13 March 2024 | Accrual | 0.25 | 0.0 | 0.25 | 0.0 | 0.0 | 0.0 | false | false | + | 14 March 2024 | Accrual | 0.25 | 0.0 | 0.25 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Accrual | 0.25 | 0.0 | 0.25 | 0.0 | 0.0 | 0.0 | false | false | + | 16 March 2024 | Accrual | 0.26 | 0.0 | 0.26 | 0.0 | 0.0 | 0.0 | false | false | + | 17 March 2024 | Accrual | 0.25 | 0.0 | 0.25 | 0.0 | 0.0 | 0.0 | false | false | + | 18 March 2024 | Accrual | 0.25 | 0.0 | 0.25 | 0.0 | 0.0 | 0.0 | false | false | + | 19 March 2024 | Accrual | 0.25 | 0.0 | 0.25 | 0.0 | 0.0 | 0.0 | false | false | + | 20 March 2024 | Accrual | 0.25 | 0.0 | 0.25 | 0.0 | 0.0 | 0.0 | false | false | + | 21 March 2024 | Accrual | 0.26 | 0.0 | 0.26 | 0.0 | 0.0 | 0.0 | false | false | + | 22 March 2024 | Accrual | 0.25 | 0.0 | 0.25 | 0.0 | 0.0 | 0.0 | false | false | + | 23 March 2024 | Accrual | 0.25 | 0.0 | 0.25 | 0.0 | 0.0 | 0.0 | false | false | + | 24 March 2024 | Accrual | 0.25 | 0.0 | 0.25 | 0.0 | 0.0 | 0.0 | false | false | + | 25 March 2024 | Accrual | 0.26 | 0.0 | 0.26 | 0.0 | 0.0 | 0.0 | false | false | + | 26 March 2024 | Accrual | 0.25 | 0.0 | 0.25 | 0.0 | 0.0 | 0.0 | false | false | + | 27 March 2024 | Accrual | 0.25 | 0.0 | 0.25 | 0.0 | 0.0 | 0.0 | false | false | + | 28 March 2024 | Accrual | 0.25 | 0.0 | 0.25 | 0.0 | 0.0 | 0.0 | false | false | + | 29 March 2024 | Accrual | 0.26 | 0.0 | 0.26 | 0.0 | 0.0 | 0.0 | false | false | + | 30 March 2024 | Accrual | 0.25 | 0.0 | 0.25 | 0.0 | 0.0 | 0.0 | false | false | + | 31 March 2024 | Accrual | 0.25 | 0.0 | 0.25 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Repayment | 685.34 | 662.77 | 17.57 | 0.0 | 5.0 | 1008.73 | false | false | + | 01 April 2024 | Accrual | 0.25 | 0.0 | 0.25 | 0.0 | 0.0 | 0.0 | false | false | + | 02 April 2024 | Accrual | 0.2 | 0.0 | 0.2 | 0.0 | 0.0 | 0.0 | false | false | + | 03 April 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | false | false | + | 04 April 2024 | Accrual | 0.2 | 0.0 | 0.2 | 0.0 | 0.0 | 0.0 | false | false | + | 05 April 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | false | false | + | 06 April 2024 | Accrual | 0.2 | 0.0 | 0.2 | 0.0 | 0.0 | 0.0 | false | false | + | 07 April 2024 | Accrual | 0.2 | 0.0 | 0.2 | 0.0 | 0.0 | 0.0 | false | false | + | 08 April 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | false | false | + | 09 April 2024 | Accrual | 0.2 | 0.0 | 0.2 | 0.0 | 0.0 | 0.0 | false | false | + | 10 April 2024 | Accrual | 0.2 | 0.0 | 0.2 | 0.0 | 0.0 | 0.0 | false | false | + | 11 April 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | false | false | + | 12 April 2024 | Accrual | 0.2 | 0.0 | 0.2 | 0.0 | 0.0 | 0.0 | false | false | + | 13 April 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | false | false | + | 14 April 2024 | Accrual | 0.2 | 0.0 | 0.2 | 0.0 | 0.0 | 0.0 | false | false | + | 15 April 2024 | Accrual | 0.2 | 0.0 | 0.2 | 0.0 | 0.0 | 0.0 | false | false | + | 16 April 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | false | false | + | 17 April 2024 | Accrual | 0.2 | 0.0 | 0.2 | 0.0 | 0.0 | 0.0 | false | false | + | 18 April 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | false | false | + | 19 April 2024 | Accrual | 0.2 | 0.0 | 0.2 | 0.0 | 0.0 | 0.0 | false | false | + | 20 April 2024 | Accrual | 0.2 | 0.0 | 0.2 | 0.0 | 0.0 | 0.0 | false | false | + | 21 April 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | false | false | + | 22 April 2024 | Accrual | 0.2 | 0.0 | 0.2 | 0.0 | 0.0 | 0.0 | false | false | + | 23 April 2024 | Accrual | 0.2 | 0.0 | 0.2 | 0.0 | 0.0 | 0.0 | false | false | + | 24 April 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | false | false | + | 25 April 2024 | Accrual | 0.2 | 0.0 | 0.2 | 0.0 | 0.0 | 0.0 | false | false | + | 26 April 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | false | false | + | 27 April 2024 | Accrual | 0.2 | 0.0 | 0.2 | 0.0 | 0.0 | 0.0 | false | false | + | 28 April 2024 | Accrual | 0.2 | 0.0 | 0.2 | 0.0 | 0.0 | 0.0 | false | false | + | 29 April 2024 | Accrual | 0.19 | 0.0 | 0.19 | 0.0 | 0.0 | 0.0 | false | false | + | 30 April 2024 | Accrual | 0.2 | 0.0 | 0.2 | 0.0 | 0.0 | 0.0 | false | false | 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 273ed680d6c..3ae330ec71d 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/LoanProduct.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/LoanProduct.feature @@ -204,4 +204,4 @@ Feature: LoanProduct | credit_card | | 1 | true | false | | Fraud | | 2 | true | false | | Delinquent | | 3 | true | false | - | Other | | 4 | true | false | + | Other | | 4 | true | false | \ No newline at end of file diff --git a/fineract-e2e-tests-runner/src/test/resources/features/LoanRepayment.feature b/fineract-e2e-tests-runner/src/test/resources/features/LoanRepayment.feature index aebca854c83..7b6d73017be 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/LoanRepayment.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/LoanRepayment.feature @@ -873,11 +873,11 @@ Feature: LoanRepayment And Admin does charge-off the loan on "10 January 2023" When Customer makes "GOODWILL_CREDIT" transaction with "AUTOPAY" payment type on "10 January 2023" with 300 EUR transaction amount and system-generated Idempotency key 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 2023 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2023 | | 667.0 | 333.0 | 10.0 | 103.0 | 10.0 | 456.0 | 400.0 | 400.0 | 0.0 | 56.0 | - | 2 | 28 | 01 March 2023 | | 334.0 | 333.0 | 10.0 | 0.0 | 0.0 | 343.0 | 0.0 | 0.0 | 0.0 | 343.0 | - | 3 | 31 | 01 April 2023 | | 0.0 | 334.0 | 10.0 | 0.0 | 0.0 | 344.0 | 0.0 | 0.0 | 0.0 | 344.0 | + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2023 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2023 | | 667.0 | 333.0 | 10.0 | 103.0 | 10.0 | 456.0 | 400.0 | 400.0 | 0.0 | 56.0 | + | 2 | 28 | 01 March 2023 | | 334.0 | 333.0 | 10.0 | 0.0 | 0.0 | 343.0 | 0.0 | 0.0 | 0.0 | 343.0 | + | 3 | 31 | 01 April 2023 | | 0.0 | 334.0 | 10.0 | 0.0 | 0.0 | 344.0 | 0.0 | 0.0 | 0.0 | 344.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 1000 | 30 | 103 | 10 | 1143 | 400 | 400 | 0 | 743 | @@ -2751,7 +2751,7 @@ Feature: LoanRepayment | 01 January 2023 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | | 10 January 2023 | Repayment | 20.0 | 0.0 | 0.0 | 0.0 | 20.0 | 1000.0 | | 15 January 2023 | Repayment | 500.0 | 470.0 | 10.0 | 0.0 | 20.0 | 530.0 | - | 25 January 2023 | Accrual | 50.0 | 0.0 | 10.0 | 20.0 | 20.0 | 0.0 | + | 25 January 2023 | Accrual | 50.0 | 0.0 | 10.0 | 20.0 | 20.0 | 0.0 | | 25 January 2023 | Repayment | 530.0 | 500.0 | 10.0 | 0.0 | 20.0 | 500.0 | | 01 February 2023 | Repayment | 20.0 | 0.0 | 0.0 | 0.0 | 20.0 | 1000.0 | Then Loan Charges tab has the following data: @@ -3994,17 +3994,17 @@ Feature: LoanRepayment And Admin successfully disburse the loan on "23 June 2024" with "400" EUR transaction amount When Customer makes "AUTOPAY" repayment on "23 June 2024" with 100 EUR transaction amount Then Loan Repayment schedule has 2 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 | - | | | 23 June 2024 | | 400.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 0 | 23 June 2024 | 23 June 2024 | 300.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | - | 2 | 30 | 23 July 2024 | | 0.0 | 300.0 | 6.25 | 0.0 | 0.0 | 306.25 | 0.0 | 0.0 | 0.0 | 306.25 | + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 23 June 2024 | | 400.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 23 June 2024 | 23 June 2024 | 300.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | + | 2 | 30 | 23 July 2024 | | 0.0 | 300.0 | 6.25 | 0.0 | 0.0 | 306.25 | 0.0 | 0.0 | 0.0 | 306.25 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 400.0 | 6.25 | 0.0 | 0.0 | 406.25 | 100.0 | 0.0 | 0.0 | 306.25 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 400.0 | 6.25 | 0.0 | 0.0 | 406.25 | 100.0 | 0.0 | 0.0 | 306.25 | Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | - | 23 June 2024 | Disbursement | 400.0 | 0.0 | 0.0 | 0.0 | 0.0 | 400.0 | - | 23 June 2024 | Repayment | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 300.0 | + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 23 June 2024 | Disbursement | 400.0 | 0.0 | 0.0 | 0.0 | 0.0 | 400.0 | + | 23 June 2024 | Repayment | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 300.0 | @TestRailId:C3294 Scenario: Verify that payment transactions made during downpayment period should not call payInterest or payPrincipal methods on the EmiCalculator for interest bearing progressive product with interest recalculation @@ -4020,20 +4020,20 @@ Feature: LoanRepayment And Customer makes "INTEREST_PAYMENT_WAIVER" transaction with "AUTOPAY" payment type on "23 June 2024" with 25 EUR transaction amount and self-generated Idempotency key And Customer makes "PAYOUT_REFUND" transaction with "AUTOPAY" payment type on "23 June 2024" with 25 EUR transaction amount and self-generated Idempotency key Then Loan Repayment schedule has 2 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 | - | | | 23 June 2024 | | 400.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 0 | 23 June 2024 | 23 June 2024 | 300.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | - | 2 | 30 | 23 July 2024 | | 0.0 | 300.0 | 6.25 | 0.0 | 0.0 | 306.25 | 0.0 | 0.0 | 0.0 | 306.25 | + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 23 June 2024 | | 400.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 23 June 2024 | 23 June 2024 | 300.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | + | 2 | 30 | 23 July 2024 | | 0.0 | 300.0 | 6.25 | 0.0 | 0.0 | 306.25 | 0.0 | 0.0 | 0.0 | 306.25 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 400.0 | 6.25 | 0.0 | 0.0 | 406.25 | 100.0 | 0.0 | 0.0 | 306.25 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 400.0 | 6.25 | 0.0 | 0.0 | 406.25 | 100.0 | 0.0 | 0.0 | 306.25 | Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | - | 23 June 2024 | Disbursement | 400.0 | 0.0 | 0.0 | 0.0 | 0.0 | 400.0 | - | 23 June 2024 | Merchant Issued Refund | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 375.0 | - | 23 June 2024 | Goodwill Credit | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 350.0 | - | 23 June 2024 | Interest Payment Waiver | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 325.0 | - | 23 June 2024 | Payout Refund | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 300.0 | + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 23 June 2024 | Disbursement | 400.0 | 0.0 | 0.0 | 0.0 | 0.0 | 400.0 | + | 23 June 2024 | Merchant Issued Refund | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 375.0 | + | 23 June 2024 | Goodwill Credit | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 350.0 | + | 23 June 2024 | Interest Payment Waiver | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 325.0 | + | 23 June 2024 | Payout Refund | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 300.0 | @TestRailId:C3295 Scenario: Verify that backdated repayment made after loan maturity date should not call payInterest or payPrincipal methods on the EmiCalculator for interest bearing progressive product with interest recalculation @@ -4047,14 +4047,348 @@ Feature: LoanRepayment When Admin sets the business date to "24 July 2024" When Customer makes "AUTOPAY" repayment on "23 June 2024" with 100 EUR transaction amount Then Loan Repayment schedule has 2 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 | - | | | 23 June 2024 | | 400.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 0 | 23 June 2024 | 23 June 2024 | 300.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | - | 2 | 30 | 23 July 2024 | | 0.0 | 300.0 | 6.25 | 0.0 | 0.0 | 306.25 | 0.0 | 0.0 | 0.0 | 306.25 | + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 23 June 2024 | | 400.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 23 June 2024 | 23 June 2024 | 300.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | + | 2 | 30 | 23 July 2024 | | 0.0 | 300.0 | 6.25 | 0.0 | 0.0 | 306.25 | 0.0 | 0.0 | 0.0 | 306.25 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 400.0 | 6.25 | 0.0 | 0.0 | 406.25 | 100.0 | 0.0 | 0.0 | 306.25 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 400.0 | 6.25 | 0.0 | 0.0 | 406.25 | 100.0 | 0.0 | 0.0 | 306.25 | Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | - | 23 June 2024 | Disbursement | 400.0 | 0.0 | 0.0 | 0.0 | 0.0 | 400.0 | - | 23 June 2024 | Repayment | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 300.0 | + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 23 June 2024 | Disbursement | 400.0 | 0.0 | 0.0 | 0.0 | 0.0 | 400.0 | + | 23 June 2024 | Repayment | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 300.0 | + + @TestRailId:C3382 + Scenario: Verify repayment reversal on interest bearing loan with NSF fee without down payment when accrual activity is present + When Admin sets the business date to "22 December 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_ACTUAL_ACTUAL_ACCRUAL_ACTIVITY | 22 December 2024 | 10000 | 9.99 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "22 December 2024" with "10000" amount and expected disbursement date on "22 December 2024" + And Admin successfully disburse the loan on "22 December 2024" with "10000" EUR transaction amount + And Admin adds an NSF fee because of payment bounce with "22 December 2024" transaction date + 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 | + | | | 22 December 2024 | | 10000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 22 January 2025 | | 6695.66 | 3304.34 | 84.78 | 0.0 | 10.0 | 3399.12 | 0.0 | 0.0 | 0.0 | 3399.12 | + | 2 | 31 | 22 February 2025 | | 3363.35 | 3332.31 | 56.81 | 0.0 | 0.0 | 3389.12 | 0.0 | 0.0 | 0.0 | 3389.12 | + | 3 | 28 | 22 March 2025 | | 0.0 | 3363.35 | 25.78 | 0.0 | 0.0 | 3389.13 | 0.0 | 0.0 | 0.0 | 3389.13 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 10000.0 | 167.37 | 0.0 | 10.0 | 10177.37 | 0.0 | 0.0 | 0.0 | 10177.37 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 22 December 2024 | Disbursement | 10000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 10000.0 | false | + And Customer makes "AUTOPAY" repayment on "22 December 2024" with 10177.37 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 | + | | | 22 December 2024 | | 10000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 22 January 2025 | 22 December 2024 | 6695.66 | 3304.34 | 84.78 | 0.0 | 10.0 | 3399.12 | 3399.12 | 3399.12 | 0.0 | 0.0 | + | 2 | 31 | 22 February 2025 | 22 December 2024 | 3363.35 | 3332.31 | 56.81 | 0.0 | 0.0 | 3389.12 | 3389.12 | 3389.12 | 0.0 | 0.0 | + | 3 | 28 | 22 March 2025 | 22 December 2024 | 0.0 | 3363.35 | 25.78 | 0.0 | 0.0 | 3389.13 | 3389.13 | 3389.13 | 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 | + | 10000.0 | 167.37 | 0.0 | 10.0 | 10177.37 | 10177.37 | 10177.37 | 0.0 | 0.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 22 December 2024 | Disbursement | 10000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 10000.0 | false | + | 22 December 2024 | Repayment | 10177.37 | 10000.0 | 167.37 | 0.0 | 10.0 | 0.0 | false | + | 22 December 2024 | Accrual | 177.37 | 0.0 | 167.37 | 0.0 | 10.0 | 0.0 | false | + | 22 December 2024 | Accrual Activity | 177.37 | 0.0 | 167.37 | 0.0 | 10.0 | 0.0 | false | + And Customer makes a repayment undo on "22 December 2024" + Then Loan Repayment schedule has 3 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 22 December 2024 | | 10000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 22 January 2025 | | 6695.66 | 3304.34 | 84.78 | 0.0 | 10.0 | 3399.12 | 0.0 | 0.0 | 0.0 | 3399.12 | + | 2 | 31 | 22 February 2025 | | 3363.35 | 3332.31 | 56.81 | 0.0 | 0.0 | 3389.12 | 0.0 | 0.0 | 0.0 | 3389.12 | + | 3 | 28 | 22 March 2025 | | 0.0 | 3363.35 | 25.78 | 0.0 | 0.0 | 3389.13 | 0.0 | 0.0 | 0.0 | 3389.13 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 10000.0 | 167.37 | 0.0 | 10.0 | 10177.37 | 0.0 | 0.0 | 0.0 | 10177.37 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 22 December 2024 | Disbursement | 10000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 10000.0 | false | + | 22 December 2024 | Repayment | 10177.37 | 10000.0 | 167.37 | 0.0 | 10.0 | 0.0 | true | + | 22 December 2024 | Accrual | 177.37 | 0.0 | 167.37 | 0.0 | 10.0 | 0.0 | false | + + @TestRailId:C3383 + Scenario: Verify repayment reversal on interest bearing loan with NSF fee with down payment when accrual activity is present + When Admin sets the business date to "22 December 2024" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_AUTO_DOWNPAYMENT_EMI_ACTUAL_ACTUAL_ACCRUAL_ACTIVITY | 22 December 2024 | 10000 | 9.99 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "22 December 2024" with "6080.58" amount and expected disbursement date on "22 December 2024" + And Admin successfully disburse the loan on "22 December 2024" with "6080.58" EUR transaction amount + And Admin adds "LOAN_NSF_FEE" due date charge with "22 December 2024" due date and 20 EUR transaction amount + Then Loan Repayment schedule has 4 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 22 December 2024 | | 6080.58 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 22 December 2024 | 22 December 2024 | 4560.44 | 1520.14 | 0.0 | 0.0 | 0.0 | 1520.14 | 1520.14 | 0.0 | 0.0 | 0.0 | + | 2 | 31 | 22 January 2025 | | 3053.51 | 1506.93 | 38.66 | 0.0 | 20.0 | 1565.59 | 0.0 | 0.0 | 0.0 | 1565.59 | + | 3 | 31 | 22 February 2025 | | 1533.83 | 1519.68 | 25.91 | 0.0 | 0.0 | 1545.59 | 0.0 | 0.0 | 0.0 | 1545.59 | + | 4 | 28 | 22 March 2025 | | 0.0 | 1533.83 | 11.75 | 0.0 | 0.0 | 1545.58 | 0.0 | 0.0 | 0.0 | 1545.58 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 6080.58 | 76.32 | 0.0 | 20.0 | 6176.9 | 1520.14 | 0.0 | 0.0 | 4656.76 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 22 December 2024 | Disbursement | 6080.58 | 0.0 | 0.0 | 0.0 | 0.0 | 6080.58 | false | + | 22 December 2024 | Down Payment | 1520.14 | 1520.14 | 0.0 | 0.0 | 0.0 | 4560.44 | false | + And Customer makes "AUTOPAY" repayment on "22 December 2024" with 6060.58 EUR transaction amount + And Loan status will be "OVERPAID" + 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 | + | | | 22 December 2024 | | 6080.58 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 22 December 2024 | 22 December 2024 | 4560.44 | 1520.14 | 0.0 | 0.0 | 0.0 | 1520.14 | 1520.14 | 0.0 | 0.0 | 0.0 | + | 2 | 31 | 22 January 2025 | 22 December 2024 | 3053.51 | 1506.93 | 38.66 | 0.0 | 20.0 | 1565.59 | 1565.59 | 1565.59 | 0.0 | 0.0 | + | 3 | 31 | 22 February 2025 | 22 December 2024 | 1533.83 | 1519.68 | 25.91 | 0.0 | 0.0 | 1545.59 | 1545.59 | 1545.59 | 0.0 | 0.0 | + | 4 | 28 | 22 March 2025 | 22 December 2024 | 0.0 | 1533.83 | 11.75 | 0.0 | 0.0 | 1545.58 | 1545.58 | 1545.58 | 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 | + | 6080.58 | 76.32 | 0.0 | 20.0 | 6176.9 | 6176.9 | 4656.76 | 0.0 | 0.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 22 December 2024 | Disbursement | 6080.58 | 0.0 | 0.0 | 0.0 | 0.0 | 6080.58 | false | + | 22 December 2024 | Down Payment | 1520.14 | 1520.14 | 0.0 | 0.0 | 0.0 | 4560.44 | false | + | 22 December 2024 | Repayment | 6060.58 | 4560.44 | 76.32 | 0.0 | 20.0 | 0.0 | false | + | 22 December 2024 | Accrual | 96.32 | 0.0 | 76.32 | 0.0 | 20.0 | 0.0 | false | + | 22 December 2024 | Accrual Activity | 96.32 | 0.0 | 76.32 | 0.0 | 20.0 | 0.0 | false | + And Customer makes a repayment undo on "22 December 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 | + | | | 22 December 2024 | | 6080.58 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 22 December 2024 | 22 December 2024 | 4560.44 | 1520.14 | 0.0 | 0.0 | 0.0 | 1520.14 | 1520.14 | 0.0 | 0.0 | 0.0 | + | 2 | 31 | 22 January 2025 | | 3053.51 | 1506.93 | 38.66 | 0.0 | 20.0 | 1565.59 | 0.0 | 0.0 | 0.0 | 1565.59 | + | 3 | 31 | 22 February 2025 | | 1533.83 | 1519.68 | 25.91 | 0.0 | 0.0 | 1545.59 | 0.0 | 0.0 | 0.0 | 1545.59 | + | 4 | 28 | 22 March 2025 | | 0.0 | 1533.83 | 11.75 | 0.0 | 0.0 | 1545.58 | 0.0 | 0.0 | 0.0 | 1545.58 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 6080.58 | 76.32 | 0.0 | 20.0 | 6176.9 | 1520.14 | 0.0 | 0.0 | 4656.76 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 22 December 2024 | Disbursement | 6080.58 | 0.0 | 0.0 | 0.0 | 0.0 | 6080.58 | false | + | 22 December 2024 | Down Payment | 1520.14 | 1520.14 | 0.0 | 0.0 | 0.0 | 4560.44 | false | + | 22 December 2024 | Repayment | 6060.58 | 4560.44 | 76.32 | 0.0 | 20.0 | 0.0 | true | + | 22 December 2024 | Accrual | 96.32 | 0.0 | 76.32 | 0.0 | 20.0 | 0.0 | false | + + @TestRailId:C3391 + Scenario: Validate interest calculation for on progressive interest bearing loan with multi-disbursement - MIR on disbursement date + 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_MULTIDISBURSE | 01 January 2024 | 1000 | 7.0 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "500" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "300" 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 January 2024 | | 300.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 250.72 | 49.28 | 1.75 | 0.0 | 0.0 | 51.03 | 0.0 | 0.0 | 0.0 | 51.03 | + | 2 | 29 | 01 March 2024 | | 201.15 | 49.57 | 1.46 | 0.0 | 0.0 | 51.03 | 0.0 | 0.0 | 0.0 | 51.03 | + | 3 | 31 | 01 April 2024 | | 151.29 | 49.86 | 1.17 | 0.0 | 0.0 | 51.03 | 0.0 | 0.0 | 0.0 | 51.03 | + | 4 | 30 | 01 May 2024 | | 101.14 | 50.15 | 0.88 | 0.0 | 0.0 | 51.03 | 0.0 | 0.0 | 0.0 | 51.03 | + | 5 | 31 | 01 June 2024 | | 50.7 | 50.44 | 0.59 | 0.0 | 0.0 | 51.03 | 0.0 | 0.0 | 0.0 | 51.03 | + | 6 | 30 | 01 July 2024 | | 0.0 | 50.7 | 0.3 | 0.0 | 0.0 | 51.0 | 0.0 | 0.0 | 0.0 | 51.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 300.0 | 6.15 | 0.0 | 0.0 | 306.15 | 0.0 | 0.0 | 0.0 | 306.15 | + 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 | 300.0 | 0.0 | 0.0 | 0.0 | 0.0 | 300.0 | false | false | + When Customer makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "01 January 2024" with 300 EUR transaction amount and system-generated Idempotency key + 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 January 2024 | | 300.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 250.72 | 49.28 | 1.75 | 0.0 | 0.0 | 51.03 | 49.5 | 49.5 | 0.0 | 1.53 | + | 2 | 29 | 01 March 2024 | | 201.15 | 49.57 | 1.46 | 0.0 | 0.0 | 51.03 | 49.79 | 49.79 | 0.0 | 1.24 | + | 3 | 31 | 01 April 2024 | | 151.29 | 49.86 | 1.17 | 0.0 | 0.0 | 51.03 | 50.08 | 50.08 | 0.0 | 0.95 | + | 4 | 30 | 01 May 2024 | | 101.14 | 50.15 | 0.88 | 0.0 | 0.0 | 51.03 | 50.22 | 50.22 | 0.0 | 0.81 | + | 5 | 31 | 01 June 2024 | | 50.7 | 50.44 | 0.59 | 0.0 | 0.0 | 51.03 | 50.22 | 50.22 | 0.0 | 0.81 | + | 6 | 30 | 01 July 2024 | | 0.0 | 50.7 | 0.3 | 0.0 | 0.0 | 51.0 | 50.19 | 50.19 | 0.0 | 0.81 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 300.0 | 6.15 | 0.0 | 0.0 | 306.15 | 300.0 | 300.0 | 0.0 | 6.15 | + 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 | 300.0 | 0.0 | 0.0 | 0.0 | 0.0 | 300.0 | false | false | + | 01 January 2024 | Merchant Issued Refund | 300.0 | 298.71 | 1.29 | 0.0 | 0.0 | 1.29 | false | false | + When Admin successfully disburse the loan on "01 January 2024" with "200" 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 January 2024 | | 300.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | | | 01 January 2024 | | 200.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 417.87 | 82.13 | 2.92 | 0.0 | 0.0 | 85.05 | 49.5 | 49.5 | 0.0 | 35.55 | + | 2 | 29 | 01 March 2024 | | 335.26 | 82.61 | 2.44 | 0.0 | 0.0 | 85.05 | 49.79 | 49.79 | 0.0 | 35.26 | + | 3 | 31 | 01 April 2024 | | 252.17 | 83.09 | 1.96 | 0.0 | 0.0 | 85.05 | 50.08 | 50.08 | 0.0 | 34.97 | + | 4 | 30 | 01 May 2024 | | 168.59 | 83.58 | 1.47 | 0.0 | 0.0 | 85.05 | 50.22 | 50.22 | 0.0 | 34.83 | + | 5 | 31 | 01 June 2024 | | 84.52 | 84.07 | 0.98 | 0.0 | 0.0 | 85.05 | 50.22 | 50.22 | 0.0 | 34.83 | + | 6 | 30 | 01 July 2024 | | 0.0 | 84.52 | 0.49 | 0.0 | 0.0 | 85.01 | 50.19 | 50.19 | 0.0 | 34.82 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 500.0 | 10.26 | 0.0 | 0.0 | 510.26 | 300.0 | 300.0 | 0.0 | 210.26 | + 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 | 300.0 | 0.0 | 0.0 | 0.0 | 0.0 | 300.0 | false | false | + | 01 January 2024 | Merchant Issued Refund | 300.0 | 298.71 | 1.29 | 0.0 | 0.0 | 1.29 | false | false | + | 01 January 2024 | Disbursement | 200.0 | 0.0 | 0.0 | 0.0 | 0.0 | 201.29 | false | false | + + @TestRailId:C3392 + Scenario: Validate interest calculation for on progressive interest bearing loan with multi-disbursement - MIR on disbursement date, 2nd disbursement on middle of 2nd period + 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_MULTIDISBURSE | 01 January 2024 | 1000 | 7.0 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "500" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "300" 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 January 2024 | | 300.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 250.72 | 49.28 | 1.75 | 0.0 | 0.0 | 51.03 | 0.0 | 0.0 | 0.0 | 51.03 | + | 2 | 29 | 01 March 2024 | | 201.15 | 49.57 | 1.46 | 0.0 | 0.0 | 51.03 | 0.0 | 0.0 | 0.0 | 51.03 | + | 3 | 31 | 01 April 2024 | | 151.29 | 49.86 | 1.17 | 0.0 | 0.0 | 51.03 | 0.0 | 0.0 | 0.0 | 51.03 | + | 4 | 30 | 01 May 2024 | | 101.14 | 50.15 | 0.88 | 0.0 | 0.0 | 51.03 | 0.0 | 0.0 | 0.0 | 51.03 | + | 5 | 31 | 01 June 2024 | | 50.7 | 50.44 | 0.59 | 0.0 | 0.0 | 51.03 | 0.0 | 0.0 | 0.0 | 51.03 | + | 6 | 30 | 01 July 2024 | | 0.0 | 50.7 | 0.3 | 0.0 | 0.0 | 51.0 | 0.0 | 0.0 | 0.0 | 51.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 300.0 | 6.15 | 0.0 | 0.0 | 306.15 | 0.0 | 0.0 | 0.0 | 306.15 | + 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 | 300.0 | 0.0 | 0.0 | 0.0 | 0.0 | 300.0 | false | false | + When Customer makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "01 January 2024" with 300 EUR transaction amount and system-generated Idempotency key + 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 January 2024 | | 300.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 250.72 | 49.28 | 1.75 | 0.0 | 0.0 | 51.03 | 49.5 | 49.5 | 0.0 | 1.53 | + | 2 | 29 | 01 March 2024 | | 201.15 | 49.57 | 1.46 | 0.0 | 0.0 | 51.03 | 49.79 | 49.79 | 0.0 | 1.24 | + | 3 | 31 | 01 April 2024 | | 151.29 | 49.86 | 1.17 | 0.0 | 0.0 | 51.03 | 50.08 | 50.08 | 0.0 | 0.95 | + | 4 | 30 | 01 May 2024 | | 101.14 | 50.15 | 0.88 | 0.0 | 0.0 | 51.03 | 50.22 | 50.22 | 0.0 | 0.81 | + | 5 | 31 | 01 June 2024 | | 50.7 | 50.44 | 0.59 | 0.0 | 0.0 | 51.03 | 50.22 | 50.22 | 0.0 | 0.81 | + | 6 | 30 | 01 July 2024 | | 0.0 | 50.7 | 0.3 | 0.0 | 0.0 | 51.0 | 50.19 | 50.19 | 0.0 | 0.81 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 300.0 | 6.15 | 0.0 | 0.0 | 306.15 | 300.0 | 300.0 | 0.0 | 6.15 | + 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 | 300.0 | 0.0 | 0.0 | 0.0 | 0.0 | 300.0 | false | false | + | 01 January 2024 | Merchant Issued Refund | 300.0 | 298.71 | 1.29 | 0.0 | 0.0 | 1.29 | false | false | + When Admin sets the business date to "10 February 2024" + When Admin successfully disburse the loan on "10 February 2024" with "200" 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 January 2024 | | 300.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 250.72 | 49.28 | 1.75 | 0.0 | 0.0 | 51.03 | 49.5 | 49.5 | 0.0 | 1.53 | + | | | 10 February 2024 | | 200.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 2 | 29 | 01 March 2024 | | 361.32 | 89.4 | 2.26 | 0.0 | 0.0 | 91.66 | 49.79 | 49.79 | 0.0 | 41.87 | + | 3 | 31 | 01 April 2024 | | 271.77 | 89.55 | 2.11 | 0.0 | 0.0 | 91.66 | 50.08 | 50.08 | 0.0 | 41.58 | + | 4 | 30 | 01 May 2024 | | 181.7 | 90.07 | 1.59 | 0.0 | 0.0 | 91.66 | 50.22 | 50.22 | 0.0 | 41.44 | + | 5 | 31 | 01 June 2024 | | 91.1 | 90.6 | 1.06 | 0.0 | 0.0 | 91.66 | 50.22 | 50.22 | 0.0 | 41.44 | + | 6 | 30 | 01 July 2024 | | 0.0 | 91.1 | 0.53 | 0.0 | 0.0 | 91.63 | 50.19 | 50.19 | 0.0 | 41.44 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 500.0 | 9.3 | 0.0 | 0.0 | 509.3 | 300.0 | 300.0 | 0.0 | 209.3 | + 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 | 300.0 | 0.0 | 0.0 | 0.0 | 0.0 | 300.0 | false | false | + | 01 January 2024 | Merchant Issued Refund | 300.0 | 298.71 | 1.29 | 0.0 | 0.0 | 1.29 | false | false | + | 10 February 2024 | Disbursement | 200.0 | 0.0 | 0.0 | 0.0 | 0.0 | 201.29 | false | false | + + @TestRailId:C3442 + Scenario: Verify that after repayment reversal Goodwill credit is reversed and replayed with non null external-id + When Admin sets the business date to "22 January 2025" + 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_ACCRUAL_ACTIVITY_POSTING | 21 January 2025 | 800 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "21 January 2025" with "800" amount and expected disbursement date on "21 January 2025" + When Admin successfully disburse the loan on "21 January 2025" with "800" 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 | + | | | 21 January 2025 | | 800.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 21 February 2025 | | 668.6 | 131.4 | 4.67 | 0.0 | 0.0 | 136.07 | 0.0 | 0.0 | 0.0 | 136.07 | + | 2 | 28 | 21 March 2025 | | 536.43 | 132.17 | 3.9 | 0.0 | 0.0 | 136.07 | 0.0 | 0.0 | 0.0 | 136.07 | + | 3 | 31 | 21 April 2025 | | 403.49 | 132.94 | 3.13 | 0.0 | 0.0 | 136.07 | 0.0 | 0.0 | 0.0 | 136.07 | + | 4 | 30 | 21 May 2025 | | 269.77 | 133.72 | 2.35 | 0.0 | 0.0 | 136.07 | 0.0 | 0.0 | 0.0 | 136.07 | + | 5 | 31 | 21 June 2025 | | 135.27 | 134.5 | 1.57 | 0.0 | 0.0 | 136.07 | 0.0 | 0.0 | 0.0 | 136.07 | + | 6 | 30 | 21 July 2025 | | 0.0 | 135.27 | 0.79 | 0.0 | 0.0 | 136.06 | 0.0 | 0.0 | 0.0 | 136.06 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 800.0 | 16.41 | 0.0 | 0.0 | 816.41 | 0.0 | 0.0 | 0.0 | 816.41 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | + | 21 January 2025 | Disbursement | 800.0 | 0.0 | 0.0 | 0.0 | 0.0 | 800.0 | + When Admin runs inline COB job for Loan + And Admin sets the business date to "25 January 2025" + And Customer makes "AUTOPAY" repayment on "25 January 2025" with 720 EUR transaction amount + When Admin runs inline COB job for Loan + 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 | + | | | 21 January 2025 | | 800.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 21 February 2025 | 25 January 2025 | 664.53 | 135.47 | 0.6 | 0.0 | 0.0 | 136.07 | 136.07 | 136.07 | 0.0 | 0.0 | + | 2 | 28 | 21 March 2025 | 25 January 2025 | 528.46 | 136.07 | 0.0 | 0.0 | 0.0 | 136.07 | 136.07 | 136.07 | 0.0 | 0.0 | + | 3 | 31 | 21 April 2025 | 25 January 2025 | 392.39 | 136.07 | 0.0 | 0.0 | 0.0 | 136.07 | 136.07 | 136.07 | 0.0 | 0.0 | + | 4 | 30 | 21 May 2025 | 25 January 2025 | 256.32 | 136.07 | 0.0 | 0.0 | 0.0 | 136.07 | 136.07 | 136.07 | 0.0 | 0.0 | + | 5 | 31 | 21 June 2025 | 25 January 2025 | 120.25 | 136.07 | 0.0 | 0.0 | 0.0 | 136.07 | 136.07 | 136.07 | 0.0 | 0.0 | + | 6 | 30 | 21 July 2025 | | 0.0 | 120.25 | 2.76 | 0.0 | 0.0 | 123.01 | 39.65 | 39.65 | 0.0 | 83.36 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 800.0 | 3.36 | 0.0 | 0.0 | 803.36 | 720.0 | 720.0 | 0.0 | 83.36 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 21 January 2025 | Disbursement | 800.0 | 0.0 | 0.0 | 0.0 | 0.0 | 800.0 | false | false | + | 22 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 23 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 24 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 25 January 2025 | Repayment | 720.0 | 719.4 | 0.6 | 0.0 | 0.0 | 80.6 | false | false | + When Admin makes "GOODWILL_CREDIT" transaction with "AUTOPAY" payment type on "25 January 2025" with 200 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 | + | | | 21 January 2025 | | 800.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 21 February 2025 | 25 January 2025 | 664.53 | 135.47 | 0.6 | 0.0 | 0.0 | 136.07 | 136.07 | 136.07 | 0.0 | 0.0 | + | 2 | 28 | 21 March 2025 | 25 January 2025 | 528.46 | 136.07 | 0.0 | 0.0 | 0.0 | 136.07 | 136.07 | 136.07 | 0.0 | 0.0 | + | 3 | 31 | 21 April 2025 | 25 January 2025 | 392.39 | 136.07 | 0.0 | 0.0 | 0.0 | 136.07 | 136.07 | 136.07 | 0.0 | 0.0 | + | 4 | 30 | 21 May 2025 | 25 January 2025 | 256.32 | 136.07 | 0.0 | 0.0 | 0.0 | 136.07 | 136.07 | 136.07 | 0.0 | 0.0 | + | 5 | 31 | 21 June 2025 | 25 January 2025 | 120.25 | 136.07 | 0.0 | 0.0 | 0.0 | 136.07 | 136.07 | 136.07 | 0.0 | 0.0 | + | 6 | 30 | 21 July 2025 | 25 January 2025 | 0.0 | 120.25 | 0.0 | 0.0 | 0.0 | 120.25 | 120.25 | 120.25 | 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 | + | 800.0 | 0.6 | 0.0 | 0.0 | 800.6 | 800.6 | 800.6 | 0.0 | 0.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 21 January 2025 | Disbursement | 800.0 | 0.0 | 0.0 | 0.0 | 0.0 | 800.0 | false | false | + | 22 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 23 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 24 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 25 January 2025 | Repayment | 720.0 | 719.4 | 0.6 | 0.0 | 0.0 | 80.6 | false | false | + | 25 January 2025 | Goodwill Credit | 200.0 | 80.6 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | + | 25 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 25 January 2025 | Accrual Activity | 0.6 | 0.0 | 0.6 | 0.0 | 0.0 | 0.0 | false | false | + When Customer undo "1"th "Repayment" transaction made on "25 January 2025" + Then In Loan Transactions all transactions have non-null external-id + 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 | + | | | 21 January 2025 | | 800.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 21 February 2025 | | 667.58 | 132.42 | 3.65 | 0.0 | 0.0 | 136.07 | 0.0 | 0.0 | 0.0 | 136.07 | + | 2 | 28 | 21 March 2025 | | 534.24 | 133.34 | 2.73 | 0.0 | 0.0 | 136.07 | 0.0 | 0.0 | 0.0 | 136.07 | + | 3 | 31 | 21 April 2025 | | 400.12 | 134.12 | 1.95 | 0.0 | 0.0 | 136.07 | 0.0 | 0.0 | 0.0 | 136.07 | + | 4 | 30 | 21 May 2025 | | 265.22 | 134.9 | 1.17 | 0.0 | 0.0 | 136.07 | 0.0 | 0.0 | 0.0 | 136.07 | + | 5 | 31 | 21 June 2025 | | 136.07 | 129.15 | 0.38 | 0.0 | 0.0 | 129.53 | 63.93 | 63.93 | 0.0 | 65.6 | + | 6 | 30 | 21 July 2025 | 25 January 2025 | 0.0 | 136.07 | 0.0 | 0.0 | 0.0 | 136.07 | 136.07 | 136.07 | 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 | + | 800.0 | 9.88 | 0.0 | 0.0 | 809.88 | 200.0 | 200.0 | 0.0 | 609.88 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 21 January 2025 | Disbursement | 800.0 | 0.0 | 0.0 | 0.0 | 0.0 | 800.0 | false | false | + | 22 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 23 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 24 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 25 January 2025 | Repayment | 720.0 | 719.4 | 0.6 | 0.0 | 0.0 | 80.6 | true | false | + | 25 January 2025 | Accrual | 0.15 | 0.0 | 0.15 | 0.0 | 0.0 | 0.0 | false | false | + | 25 January 2025 | Goodwill Credit | 200.0 | 200.0 | 0.0 | 0.0 | 0.0 | 600.0 | false | true | + + diff --git a/fineract-e2e-tests-runner/src/test/resources/features/LoanReschedule.feature b/fineract-e2e-tests-runner/src/test/resources/features/LoanReschedule.feature index c8f3d57fc65..c3637a9afbf 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/LoanReschedule.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/LoanReschedule.feature @@ -129,7 +129,7 @@ Feature: LoanReschedule 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 | - | LP1 | 01 July 2023 | 3000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | PENALTIES_FEES_INTEREST_PRINCIPAL_ORDER | + | LP1 | 01 July 2023 | 3000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | PENALTIES_FEES_INTEREST_PRINCIPAL_ORDER | And Admin successfully approves the loan on "01 July 2023" with "3000" amount and expected disbursement date on "01 July 2023" And Admin successfully disburse the loan on "01 July 2023" with "3000" EUR transaction amount Then Loan Repayment schedule has 3 periods, with the following data for periods: @@ -161,7 +161,7 @@ Feature: LoanReschedule 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 | - | LP1 | 01 July 2023 | 3000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | PENALTIES_FEES_INTEREST_PRINCIPAL_ORDER | + | LP1 | 01 July 2023 | 3000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | PENALTIES_FEES_INTEREST_PRINCIPAL_ORDER | And Admin successfully approves the loan on "01 July 2023" with "3000" amount and expected disbursement date on "01 July 2023" And Admin successfully disburse the loan on "01 July 2023" with "3000" EUR transaction amount Then Loan Repayment schedule has 3 periods, with the following data for periods: @@ -195,7 +195,7 @@ Feature: LoanReschedule 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 | - | LP1 | 01 July 2023 | 3000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | PENALTIES_FEES_INTEREST_PRINCIPAL_ORDER | + | LP1 | 01 July 2023 | 3000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | PENALTIES_FEES_INTEREST_PRINCIPAL_ORDER | And Admin successfully approves the loan on "01 July 2023" with "3000" amount and expected disbursement date on "01 July 2023" And Admin successfully disburse the loan on "01 July 2023" with "3000" EUR transaction amount Then Loan Repayment schedule has 3 periods, with the following data for periods: @@ -228,7 +228,7 @@ Feature: LoanReschedule When Admin sets the business date to "01 July 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 | | LP1_INTEREST_FLAT | 01 July 2023 | 3000 | 12 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 10 | MONTHS | 1 | MONTHS | 10 | 0 | 0 | 0 | PENALTIES_FEES_INTEREST_PRINCIPAL_ORDER | And Admin successfully approves the loan on "01 July 2023" with "3000" amount and expected disbursement date on "01 July 2023" And Admin successfully disburse the loan on "01 July 2023" with "3000" EUR transaction amount @@ -260,7 +260,7 @@ Feature: LoanReschedule When Admin sets the business date to "01 July 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 | | LP1_INTEREST_FLAT | 01 July 2023 | 3000 | 12 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | PENALTIES_FEES_INTEREST_PRINCIPAL_ORDER | And Admin successfully approves the loan on "01 July 2023" with "3000" amount and expected disbursement date on "01 July 2023" And Admin successfully disburse the loan on "01 July 2023" with "3000" EUR transaction amount @@ -293,7 +293,7 @@ Feature: LoanReschedule 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 | 01 October 2023 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 45 | DAYS | 15 | DAYS | 3 | 0 | 0 | 0 | DUE_PENALTY_INTEREST_PRINCIPAL_FEE_IN_ADVANCE_PENALTY_INTEREST_PRINCIPAL_FEE | 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 @@ -318,7 +318,7 @@ Feature: LoanReschedule 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 | 01 October 2023 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 45 | DAYS | 15 | DAYS | 3 | 0 | 0 | 0 | DUE_PENALTY_INTEREST_PRINCIPAL_FEE_IN_ADVANCE_PENALTY_INTEREST_PRINCIPAL_FEE | 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 @@ -350,7 +350,7 @@ Feature: LoanReschedule 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 | 01 October 2023 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 45 | DAYS | 15 | DAYS | 3 | 0 | 0 | 0 | DUE_PENALTY_INTEREST_PRINCIPAL_FEE_IN_ADVANCE_PENALTY_INTEREST_PRINCIPAL_FEE | 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 @@ -380,7 +380,7 @@ Feature: LoanReschedule 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 | 01 October 2023 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 45 | DAYS | 15 | DAYS | 3 | 0 | 0 | 0 | DUE_PENALTY_INTEREST_PRINCIPAL_FEE_IN_ADVANCE_PENALTY_INTEREST_PRINCIPAL_FEE | 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 @@ -404,7 +404,7 @@ Feature: LoanReschedule 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 | 01 October 2023 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 45 | DAYS | 15 | DAYS | 3 | 0 | 0 | 0 | DUE_PENALTY_INTEREST_PRINCIPAL_FEE_IN_ADVANCE_PENALTY_INTEREST_PRINCIPAL_FEE | 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 @@ -428,7 +428,7 @@ Feature: LoanReschedule 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 | 01 October 2023 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 45 | DAYS | 15 | DAYS | 3 | 0 | 0 | 0 | DUE_PENALTY_INTEREST_PRINCIPAL_FEE_IN_ADVANCE_PENALTY_INTEREST_PRINCIPAL_FEE | 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 @@ -452,7 +452,7 @@ Feature: LoanReschedule 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 | 01 October 2023 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 45 | DAYS | 15 | DAYS | 3 | 0 | 0 | 0 | DUE_PENALTY_INTEREST_PRINCIPAL_FEE_IN_ADVANCE_PENALTY_INTEREST_PRINCIPAL_FEE | 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 @@ -487,7 +487,7 @@ Feature: LoanReschedule 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 | 01 October 2023 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 45 | DAYS | 15 | DAYS | 3 | 0 | 0 | 0 | DUE_PENALTY_INTEREST_PRINCIPAL_FEE_IN_ADVANCE_PENALTY_INTEREST_PRINCIPAL_FEE | 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 @@ -510,7 +510,7 @@ Feature: LoanReschedule 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 | 01 October 2023 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 45 | DAYS | 15 | DAYS | 3 | 0 | 0 | 0 | DUE_PENALTY_INTEREST_PRINCIPAL_FEE_IN_ADVANCE_PENALTY_INTEREST_PRINCIPAL_FEE | 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 @@ -538,7 +538,7 @@ Feature: LoanReschedule 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 | 01 October 2023 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 45 | DAYS | 15 | DAYS | 3 | 0 | 0 | 0 | DUE_PENALTY_INTEREST_PRINCIPAL_FEE_IN_ADVANCE_PENALTY_INTEREST_PRINCIPAL_FEE | 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 @@ -564,7 +564,7 @@ Feature: LoanReschedule 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 | 01 October 2023 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 45 | DAYS | 15 | DAYS | 3 | 0 | 0 | 0 | DUE_PENALTY_INTEREST_PRINCIPAL_FEE_IN_ADVANCE_PENALTY_INTEREST_PRINCIPAL_FEE | 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 @@ -589,7 +589,7 @@ Feature: LoanReschedule 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 | 01 October 2023 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 45 | DAYS | 15 | DAYS | 3 | 0 | 0 | 0 | DUE_PENALTY_INTEREST_PRINCIPAL_FEE_IN_ADVANCE_PENALTY_INTEREST_PRINCIPAL_FEE | 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 @@ -605,7 +605,7 @@ Feature: LoanReschedule 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 | 01 October 2023 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 45 | DAYS | 15 | DAYS | 3 | 0 | 0 | 0 | DUE_PENALTY_INTEREST_PRINCIPAL_FEE_IN_ADVANCE_PENALTY_INTEREST_PRINCIPAL_FEE | 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 @@ -643,7 +643,7 @@ Feature: LoanReschedule 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 | + | 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 January 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 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 @@ -659,27 +659,25 @@ Feature: LoanReschedule Then Admin checks that last closed business date of loan is "09 January 2024" @TestRailId:C3048 @AdvancedPaymentAllocation - Scenario: Verify that in case of Loan is hard locked for COB execution without error message, BatchAPI request of Loan reschedule creation and approval will result a 409 error and a LOAN_LOCKED_BY_COB error message + Scenario: Verify that in case of Loan is hard locked for COB execution WITH error message, BatchAPI request of Loan reschedule creation and approval can be done When Admin sets the business date to "01 January 2024" When Admin creates a client with random data When Admin set "LP2_DOWNPAYMENT_AUTO_ADVANCED_PAYMENT_ALLOCATION" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule 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 January 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 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 sets the business date to "02 January 2024" When Admin runs inline COB job for Loan When Admin sets the business date to "10 January 2024" - When Admin places a lock on loan account WITHOUT an error message + When Admin places a lock on loan account with an error message When Admin creates new user with "NO_BYPASS_AUTOTEST" username, "NO_BYPASS_AUTOTEST_ROLE" role name and given permissions: | APPROVE_RESCHEDULELOAN | | CREATE_RESCHEDULELOAN | | READ_RESCHEDULELOAN | | REJECT_RESCHEDULELOAN | - When Batch API call with created user and the following data results a 409 error and a "LOAN_LOCKED_BY_COB" error message: - | rescheduleFromDate | submittedOnDate | adjustedDueDate | approvedOnDate | enclosingTransaction | - | 16 January 2024 | 10 January 2024 | 31 January 2024 | 10 January 2024 | true | + When Batch API call with created user and with steps: rescheduleLoan from "16 January 2024" to "31 January 2024" submitted on date: "10 January 2024", approveReschedule on date: "10 January 2024" runs with enclosingTransaction: "true" @TestRailId:C3049 @AdvancedPaymentAllocation Scenario: Verify that in case of Loan is hard locked for COB execution with error message, BatchAPI request of Loan reschedule creation and approval will result a 200 statuscode without error message @@ -687,7 +685,7 @@ Feature: LoanReschedule 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 | + | 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 January 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 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 @@ -703,3 +701,220 @@ Feature: LoanReschedule When Batch API call with created user and the following data results a 200 statuscode WITHOUT error message: | rescheduleFromDate | submittedOnDate | adjustedDueDate | approvedOnDate | enclosingTransaction | | 16 January 2024 | 10 January 2024 | 31 January 2024 | 10 January 2024 | true | + + @TestRailId:C3318 @AdvancedPaymentAllocation + Scenario: Verify that in case of Loan is hard locked for COB execution WITHOUT error message, BatchAPI request of Loan reschedule creation and approval will result a 409 error and a LOAN_LOCKED_BY_COB error message + When Admin sets the business date to "01 January 2024" + When Admin creates a client with random data + When Admin set "LP2_DOWNPAYMENT_AUTO_ADVANCED_PAYMENT_ALLOCATION" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + 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 January 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 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 sets the business date to "02 January 2024" + When Admin runs inline COB job for Loan + When Admin sets the business date to "10 January 2024" + When Admin places a lock on loan account WITHOUT an error message + When Admin creates new user with "NO_BYPASS_AUTOTEST" username, "NO_BYPASS_AUTOTEST_ROLE" role name and given permissions: + | APPROVE_RESCHEDULELOAN | + | CREATE_RESCHEDULELOAN | + | READ_RESCHEDULELOAN | + | REJECT_RESCHEDULELOAN | + When Batch API call with created user and the following data results a 409 error and a "LOAN_LOCKED_BY_COB" error message: + | rescheduleFromDate | submittedOnDate | adjustedDueDate | approvedOnDate | enclosingTransaction | + | 16 January 2024 | 10 January 2024 | 31 January 2024 | 10 January 2024 | true | + + @TestRailId:C3388 + Scenario: Verify that interest recalculation working in case one due date reschedule + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | FLAT | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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" + And Admin successfully disburse the loan on "01 January 2024" with "100" 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + And 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 | + When Admin creates and approves Loan reschedule with the following data: + | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | + | 01 February 2024 | 01 January 2024 | 01 March 2024 | | | | | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 60 | 01 March 2024 | | 84.16 | 15.84 | 1.17 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 31 | 01 April 2024 | | 67.64 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 30 | 01 May 2024 | | 51.02 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 31 | 01 June 2024 | | 34.31 | 16.71 | 0.3 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 30 | 01 July 2024 | | 17.5 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 31 | 01 August 2024 | | 0.0 | 17.5 | 0.1 | 0.0 | 0.0 | 17.6 | 0.0 | 0.0 | 0.0 | 17.6 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.65 | 0.0 | 0.0 | 102.65 | 0.0 | 0.0 | 0.0 | 102.65 | + And 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 | + + @TestRailId:C3389 + Scenario: Verify that interest recalculation working in case two due date reschedules + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | FLAT | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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" + And Admin successfully disburse the loan on "01 January 2024" with "100" 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + And 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 | + When Admin creates and approves Loan reschedule with the following data: + | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | + | 01 February 2024 | 01 January 2024 | 01 March 2024 | | | | | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 60 | 01 March 2024 | | 84.16 | 15.84 | 1.17 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 31 | 01 April 2024 | | 67.64 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 30 | 01 May 2024 | | 51.02 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 31 | 01 June 2024 | | 34.31 | 16.71 | 0.3 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 30 | 01 July 2024 | | 17.5 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 31 | 01 August 2024 | | 0.0 | 17.5 | 0.1 | 0.0 | 0.0 | 17.6 | 0.0 | 0.0 | 0.0 | 17.6 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.65 | 0.0 | 0.0 | 102.65 | 0.0 | 0.0 | 0.0 | 102.65 | + And 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 | + When Admin creates and approves Loan reschedule with the following data: + | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | + | 01 May 2024 | 15 April 2024 | 01 June 2024 | | | | | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 60 | 01 March 2024 | | 84.16 | 15.84 | 1.17 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 31 | 01 April 2024 | | 67.64 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 61 | 01 June 2024 | | 51.42 | 16.22 | 0.79 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 July 2024 | | 34.71 | 16.71 | 0.3 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 August 2024 | | 17.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 31 | 01 September 2024 | | 0.0 | 17.9 | 0.1 | 0.0 | 0.0 | 18.0 | 0.0 | 0.0 | 0.0 | 18.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 3.05 | 0.0 | 0.0 | 103.05 | 0.0 | 0.0 | 0.0 | 103.05 | + And 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 | + + @TestRailId:C3390 + Scenario: Verify that interest recalculation working in case off due date reschedule + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | FLAT | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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" + And Admin successfully disburse the loan on "01 January 2024" with "100" 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + And 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 | + When Admin creates and approves Loan reschedule with the following data: + | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | + | 01 March 2024 | 15 February 2024 | 15 April 2024 | | | | | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 74 | 15 April 2024 | | 67.76 | 15.81 | 1.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 30 | 15 May 2024 | | 51.15 | 16.61 | 0.4 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 31 | 15 June 2024 | | 34.44 | 16.71 | 0.3 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 30 | 15 July 2024 | | 17.63 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 31 | 15 August 2024 | | 0.0 | 17.63 | 0.1 | 0.0 | 0.0 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.78 | 0.0 | 0.0 | 102.78 | 0.0 | 0.0 | 0.0 | 102.78 | + And 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 | + + @TestRailId:C3426 + Scenario: Verify that interest recalculation working in case off due date reschedule, with dates for February + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | FLAT | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 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" + And Admin successfully disburse the loan on "01 January 2024" with "100" 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + And 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 | + When Admin creates and approves Loan reschedule with the following data: + | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | + | 01 February 2024 | 01 January 2024 | 01 March 2024 | | | | | + 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 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 60 | 01 March 2024 | | 84.16 | 15.84 | 1.17 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 31 | 01 April 2024 | | 67.64 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 30 | 01 May 2024 | | 51.02 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 31 | 01 June 2024 | | 34.31 | 16.71 | 0.3 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 30 | 01 July 2024 | | 17.5 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 31 | 01 August 2024 | | 0.0 | 17.5 | 0.1 | 0.0 | 0.0 | 17.6 | 0.0 | 0.0 | 0.0 | 17.6 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.65 | 0.0 | 0.0 | 102.65 | 0.0 | 0.0 | 0.0 | 102.65 | + And 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 | diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanSchedulePeriodData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanSchedulePeriodData.java index e5fdb22ba68..65aac943cbb 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanSchedulePeriodData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanSchedulePeriodData.java @@ -19,11 +19,13 @@ package org.apache.fineract.portfolio.loanaccount.loanschedule.data; import java.math.BigDecimal; +import java.math.MathContext; import java.time.LocalDate; import lombok.Builder; import lombok.Getter; import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.infrastructure.core.service.MathUtil; +import org.apache.fineract.organisation.monetary.domain.MoneyHelper; /** * Immutable data object that represents a period of a loan schedule. @@ -156,11 +158,13 @@ public static LoanSchedulePeriodData periodWithPayments(final Integer periodNumb final BigDecimal totalPaidLateForPeriod, final BigDecimal totalWaived, final BigDecimal totalWrittenOff, final BigDecimal totalCredits, final boolean isDownPayment, final BigDecimal totalAccruedInterest) { - BigDecimal totalDue = MathUtil.add(principalOriginalDue, interestDue, feeChargesDue, penaltyChargesDue); - BigDecimal totalOutstanding = MathUtil.add(principalOutstanding, interestOutstanding, feeChargesOutstanding, + final MathContext mc = MoneyHelper.getMathContext(); + + BigDecimal totalDue = MathUtil.add(mc, principalOriginalDue, interestDue, feeChargesDue, penaltyChargesDue); + BigDecimal totalOutstanding = MathUtil.add(mc, principalOutstanding, interestOutstanding, feeChargesOutstanding, penaltyChargesOutstanding); - BigDecimal totalActualCostOfLoanForPeriod = MathUtil.add(interestDue, feeChargesDue, penaltyChargesDue); - BigDecimal totalInstallmentAmount = MathUtil.add(principalOriginalDue, interestDue); + BigDecimal totalActualCostOfLoanForPeriod = MathUtil.add(mc, interestDue, feeChargesDue, penaltyChargesDue); + BigDecimal totalInstallmentAmount = MathUtil.add(mc, principalOriginalDue, interestDue); return builder().period(periodNumber) // .fromDate(fromDate) // diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/AdvancedPaymentScheduleTransactionProcessor.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/AdvancedPaymentScheduleTransactionProcessor.java index 3c845ac76de..701d059053c 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/AdvancedPaymentScheduleTransactionProcessor.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/AdvancedPaymentScheduleTransactionProcessor.java @@ -88,6 +88,7 @@ import org.apache.fineract.portfolio.loanaccount.domain.transactionprocessor.TransactionCtx; import org.apache.fineract.portfolio.loanaccount.loanschedule.data.PeriodDueDetails; import org.apache.fineract.portfolio.loanaccount.loanschedule.data.ProgressiveLoanInterestScheduleModel; +import org.apache.fineract.portfolio.loanaccount.loanschedule.data.RepaymentPeriod; import org.apache.fineract.portfolio.loanaccount.loanschedule.domain.LoanScheduleProcessingType; import org.apache.fineract.portfolio.loanaccount.service.InterestRefundService; import org.apache.fineract.portfolio.loanproduct.calc.EMICalculator; @@ -1264,6 +1265,12 @@ private void handleAccelerateMaturityChargeOff(final LoanTransaction loanTransac .filter(installment -> transactionDate.isAfter(installment.getFromDate())) .collect(Collectors.toCollection(ArrayList::new)); + final List transactionsToBeReprocessed = installments.stream() + .filter(installment -> transactionDate.isBefore(installment.getFromDate()) + && !installment.getLoanTransactionToRepaymentScheduleMappings().isEmpty()) + .flatMap(installment -> installment.getLoanTransactionToRepaymentScheduleMappings().stream()) + .map(LoanTransactionToRepaymentScheduleMapping::getLoanTransaction).toList(); + if (futureFee.compareTo(BigDecimal.ZERO) > 0 || futurePenalty.compareTo(BigDecimal.ZERO) > 0) { final Optional latestDueDate = loan.getCharges().stream() .filter(loanCharge -> loanCharge.isActive() && loanCharge.isNotFullyPaid()).map(LoanCharge::getDueDate) @@ -1282,6 +1289,19 @@ private void handleAccelerateMaturityChargeOff(final LoanTransaction loanTransac loan.updateLoanSchedule(installmentsUpToTransactionDate); loan.updateLoanScheduleDependentDerivedFields(); + + if (transactionCtx instanceof ProgressiveTransactionCtx progressiveTransactionCtx && loan.isInterestRecalculationEnabled()) { + updateRepaymentPeriodsAfterChargeOff(progressiveTransactionCtx, transactionDate, transactionsToBeReprocessed); + } else { + for (LoanTransaction processTransaction : transactionsToBeReprocessed) { + final LoanTransaction newTransaction = LoanTransaction.copyTransactionProperties(processTransaction); + processLatestTransaction(newTransaction, transactionCtx); + createNewTransaction(processTransaction, newTransaction, transactionCtx); + newTransaction.updateLoan(loan); + loan.getLoanTransactions().add(newTransaction); + } + loan.updateLoanSummaryDerivedFields(); + } } } @@ -2049,4 +2069,46 @@ public static LoanPaymentAllocationRule getAllocationRule(LoanTransaction loanTr public static LoanPaymentAllocationRule getDefaultAllocationRule(Loan loan) { return loan.getPaymentAllocationRules().stream().filter(e -> e.getTransactionType().isDefault()).findFirst().orElseThrow(); } + + private void updateRepaymentPeriodsAfterChargeOff(final ProgressiveTransactionCtx transactionCtx, final LocalDate chargeOffDate, + final List transactionsToBeReprocessed) { + final List repaymentPeriods = transactionCtx.getModel().repaymentPeriods(); + + if (repaymentPeriods.isEmpty()) { + return; + } + + final List periodsBeforeChargeOff = repaymentPeriods.stream() + .filter(rp -> rp.getFromDate().isBefore(chargeOffDate)).toList(); + + if (periodsBeforeChargeOff.isEmpty()) { + return; + } + + final RepaymentPeriod lastPeriod = periodsBeforeChargeOff.get(periodsBeforeChargeOff.size() - 1); + + final List periodsToRemove = repaymentPeriods.stream().filter(rp -> rp.getFromDate().isAfter(chargeOffDate)) + .toList(); + + lastPeriod.setDueDate(chargeOffDate); + lastPeriod.getInterestPeriods().removeIf(interestPeriod -> !interestPeriod.getFromDate().isBefore(chargeOffDate)); + + transactionCtx.getModel().repaymentPeriods().removeAll(periodsToRemove); + + final BigDecimal totalPrincipal = periodsToRemove.stream().map(rp -> rp.getDuePrincipal().getAmount()).reduce(BigDecimal.ZERO, + BigDecimal::add); + + final BigDecimal newInterest = emiCalculator + .getPeriodInterestTillDate(transactionCtx.getModel(), lastPeriod.getDueDate(), chargeOffDate).getAmount(); + + lastPeriod.setEmi(lastPeriod.getDuePrincipal().add(totalPrincipal).add(newInterest)); + + emiCalculator.calculateRateFactorForRepaymentPeriod(lastPeriod, transactionCtx.getModel()); + + for (LoanTransaction processTransaction : transactionsToBeReprocessed) { + emiCalculator.addBalanceCorrection(transactionCtx.getModel(), processTransaction.getTransactionDate(), + processTransaction.getPrincipalPortion(transactionCtx.getCurrency())); + processSingleTransaction(processTransaction, transactionCtx); + } + } } diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/ProgressiveLoanInterestScheduleModel.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/ProgressiveLoanInterestScheduleModel.java index 528d8572556..74f38fd9941 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/ProgressiveLoanInterestScheduleModel.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/ProgressiveLoanInterestScheduleModel.java @@ -60,7 +60,7 @@ public class ProgressiveLoanInterestScheduleModel { public ProgressiveLoanInterestScheduleModel(final List repaymentPeriods, final LoanProductMinimumRepaymentScheduleRelatedDetail loanProductRelatedDetail, final List loanTermVariations, final Integer installmentAmountInMultiplesOf, final MathContext mc) { - this.repaymentPeriods = repaymentPeriods; + this.repaymentPeriods = new ArrayList<>(repaymentPeriods); this.interestRates = new TreeSet<>(Collections.reverseOrder()); this.loanProductRelatedDetail = loanProductRelatedDetail; this.loanTermVariations = buildLoanTermVariationMap(loanTermVariations); diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/RepaymentPeriod.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/RepaymentPeriod.java index 139ef71abc2..9274a6c7d30 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/RepaymentPeriod.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/RepaymentPeriod.java @@ -42,8 +42,9 @@ public class RepaymentPeriod { private final RepaymentPeriod previous; @Getter private final LocalDate fromDate; + @Setter @Getter - private final LocalDate dueDate; + private LocalDate dueDate; @Getter @Setter private List interestPeriods; diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/EMICalculator.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/EMICalculator.java index 900950ca60b..d5fc0e49a79 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/EMICalculator.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/EMICalculator.java @@ -76,6 +76,8 @@ Money getOutstandingLoanBalanceOfPeriod(ProgressiveLoanInterestScheduleModel int OutstandingDetails getOutstandingAmountsTillDate(ProgressiveLoanInterestScheduleModel model, LocalDate targetDate); + void calculateRateFactorForRepaymentPeriod(RepaymentPeriod repaymentPeriod, ProgressiveLoanInterestScheduleModel scheduleModel); + Money getSumOfDueInterestsOnDate(ProgressiveLoanInterestScheduleModel scheduleModel, LocalDate subjectDate); void applyInterestPause(ProgressiveLoanInterestScheduleModel scheduleModel, LocalDate fromDate, LocalDate endDate); diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/ProgressiveEMICalculator.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/ProgressiveEMICalculator.java index fa5988e4c21..9a713230518 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/ProgressiveEMICalculator.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/ProgressiveEMICalculator.java @@ -261,6 +261,17 @@ public OutstandingDetails getOutstandingAmountsTillDate(ProgressiveLoanInterestS return new OutstandingDetails(totalOutstandingPrincipal, totalOutstandingInterest); } + @Override + public void calculateRateFactorForRepaymentPeriod(final RepaymentPeriod repaymentPeriod, + final ProgressiveLoanInterestScheduleModel scheduleModel) { + repaymentPeriod.getInterestPeriods().forEach(interestPeriod -> { + interestPeriod.setRateFactor(calculateRateFactorPerPeriod(scheduleModel, repaymentPeriod, interestPeriod.getFromDate(), + interestPeriod.getDueDate())); + interestPeriod.setRateFactorTillPeriodDueDate(calculateRateFactorPerPeriodForInterest(scheduleModel, repaymentPeriod, + interestPeriod.getFromDate(), repaymentPeriod.getDueDate())); + }); + } + @NotNull private ProgressiveLoanInterestScheduleModel recalculateScheduleModelTillDate( @NotNull ProgressiveLoanInterestScheduleModel scheduleModel, @NotNull LocalDate periodDueDate, @NotNull LocalDate targetDate) { @@ -419,16 +430,6 @@ private void calculateRateFactorForPeriods(final List repayment repaymentPeriods.forEach(repaymentPeriod -> calculateRateFactorForRepaymentPeriod(repaymentPeriod, scheduleModel)); } - private void calculateRateFactorForRepaymentPeriod(final RepaymentPeriod repaymentPeriod, - final ProgressiveLoanInterestScheduleModel scheduleModel) { - repaymentPeriod.getInterestPeriods().forEach(interestPeriod -> { - interestPeriod.setRateFactor(calculateRateFactorPerPeriod(scheduleModel, repaymentPeriod, interestPeriod.getFromDate(), - interestPeriod.getDueDate())); - interestPeriod.setRateFactorTillPeriodDueDate(calculateRateFactorPerPeriodForInterest(scheduleModel, repaymentPeriod, - interestPeriod.getFromDate(), repaymentPeriod.getDueDate())); - }); - } - BigDecimal calculateRateFactorPerPeriodForInterest(final ProgressiveLoanInterestScheduleModel scheduleModel, final RepaymentPeriod repaymentPeriod, final LocalDate interestPeriodFromDate, final LocalDate interestPeriodDueDate) { final MathContext mc = scheduleModel.mc(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualsProcessingServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualsProcessingServiceImpl.java index a2e90154d68..ba140eff1ef 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualsProcessingServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualsProcessingServiceImpl.java @@ -434,7 +434,7 @@ private void addInterestAccrual(@NotNull Loan loan, @NotNull LocalDate tillDate, boolean isPastPeriod = isAfterPeriod(tillDate, installment); boolean isInPeriod = isInPeriod(tillDate, installment, false); if (isPastPeriod || loan.isClosed() || loan.isOverPaid()) { - interest = installment.getInterestCharged(currency); + interest = installment.getInterestCharged(currency).minus(installment.getCreditedInterest()); } else { if (isInPeriod) { // first period first day is not accrued interest = scheduleGenerator.getPeriodInterestTillDate(installment, tillDate); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java index c9b7a22afbd..264b4f1e88d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java @@ -1226,7 +1226,6 @@ public LoanScheduleData extractData(@NotNull final ResultSet rs) throws SQLExcep Set disbursementPeriodIds = new HashSet<>(); while (rs.next()) { - final Long loanId = rs.getLong("loanId"); final Integer period = JdbcSupport.getInteger(rs, "period"); LocalDate fromDate = JdbcSupport.getLocalDate(rs, "fromDate"); final LocalDate dueDate = JdbcSupport.getLocalDate(rs, "dueDate"); @@ -1307,8 +1306,6 @@ public LoanScheduleData extractData(@NotNull final ResultSet rs) throws SQLExcep final BigDecimal totalOutstandingForPeriod = principalOutstanding.add(interestOutstanding).add(feeChargesOutstanding) .add(penaltyChargesOutstanding); - final BigDecimal totalActualCostOfLoanForPeriod = interestActualDue.add(feeChargesActualDue).add(penaltyChargesActualDue); - totalRepaymentExpected = totalRepaymentExpected.plus(totalDueForPeriod); totalRepayment = totalRepayment.plus(totalPaidForPeriod); totalPaidInAdvance = totalPaidInAdvance.plus(totalPaidInAdvanceForPeriod); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanCOBCreateAccrualsTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanCOBCreateAccrualsTest.java index bb8288fbe7c..7ede4180a8d 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanCOBCreateAccrualsTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanCOBCreateAccrualsTest.java @@ -20,14 +20,20 @@ import java.math.BigDecimal; import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import java.util.Objects; import java.util.concurrent.atomic.AtomicReference; import lombok.extern.slf4j.Slf4j; +import org.apache.fineract.client.models.CreditAllocationData; +import org.apache.fineract.client.models.CreditAllocationOrder; import org.apache.fineract.client.models.GetLoansLoanIdResponse; import org.apache.fineract.client.models.PostClientsResponse; import org.apache.fineract.client.models.PostLoanProductsResponse; import org.apache.fineract.client.models.PostLoansLoanIdTransactionsRequest; import org.apache.fineract.integrationtests.common.ClientHelper; +import org.junit.Ignore; import org.junit.Test; import org.junit.jupiter.api.Assertions; @@ -467,18 +473,14 @@ public void testEarlyRepaymentAccruals() { || "loanTransactionType.accrualAdjustment".equals(t.getType().getCode()))); // Accruals around installment due dates are as expected - Assertions.assertTrue(loanDetails.getTransactions().stream().anyMatch( - t -> t.getDate().equals(LocalDate.of(2025, 1, 20)) && t.getType().getAccrual() && t.getAmount().equals(0.16D))); - Assertions.assertTrue(loanDetails.getTransactions().stream().anyMatch( - t -> t.getDate().equals(LocalDate.of(2025, 1, 21)) && t.getType().getAccrual() && t.getAmount().equals(0.16D))); - Assertions.assertTrue(loanDetails.getTransactions().stream().anyMatch( - t -> t.getDate().equals(LocalDate.of(2025, 2, 20)) && t.getType().getAccrual() && t.getAmount().equals(0.16D))); - Assertions.assertTrue(loanDetails.getTransactions().stream().anyMatch( - t -> t.getDate().equals(LocalDate.of(2025, 2, 21)) && t.getType().getAccrual() && t.getAmount().equals(0.18D))); - Assertions.assertTrue(loanDetails.getTransactions().stream().anyMatch( - t -> t.getDate().equals(LocalDate.of(2025, 3, 20)) && t.getType().getAccrual() && t.getAmount().equals(0.18D))); - Assertions.assertTrue(loanDetails.getTransactions().stream().anyMatch( - t -> t.getDate().equals(LocalDate.of(2025, 3, 21)) && t.getType().getAccrual() && t.getAmount().equals(0.16D))); + validateTransactionsExist(loanDetails, // + transaction(0.16, "Accrual", "20 January 2025", 0.0, 0.0, 0.16, 0.0, 0.0, 0.0, 0.0), // + transaction(0.16, "Accrual", "21 January 2025", 0.0, 0.0, 0.16, 0.0, 0.0, 0.0, 0.0), // + transaction(0.16, "Accrual", "20 February 2025", 0.0, 0.0, 0.16, 0.0, 0.0, 0.0, 0.0), // + transaction(0.18, "Accrual", "21 February 2025", 0.0, 0.0, 0.18, 0.0, 0.0, 0.0, 0.0), // + transaction(0.18, "Accrual", "20 March 2025", 0.0, 0.0, 0.18, 0.0, 0.0, 0.0, 0.0), // + transaction(0.16, "Accrual", "21 March 2025", 0.0, 0.0, 0.16, 0.0, 0.0, 0.0, 0.0) // + ); }); } @@ -563,4 +565,146 @@ public void testInterestRecognitionOnDisbursementDateFalse() { transaction(430.0d, "Disbursement", "20 December 2024", 430.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, false)); }); } + + @Test + public void testProgressiveChargeBackNoInterestRecalculation() { + AtomicReference loanIdRef = new AtomicReference<>(); + AtomicReference repaymentIdRef = new AtomicReference<>(); + + setup(); + final PostLoanProductsResponse loanProductsResponse = loanProductHelper + .createLoanProduct(create4IProgressive().isInterestRecalculationEnabled(false) + .creditAllocation(chargebackCreditAllocationOrders(List.of("PRINCIPAL", "PENALTY", "FEE", "INTEREST"))) + .currencyCode("USD")); + + runAt("20 December 2024", () -> { + Long loanId = applyAndApproveProgressiveLoan(client.getClientId(), loanProductsResponse.getResourceId(), "20 December 2024", + 430.0, 26.0, 6, null); + + loanIdRef.set(loanId); + + disburseLoan(loanId, BigDecimal.valueOf(430), "20 December 2024"); + executeInlineCOB(loanId); + }); + runAt("20 January 2025", () -> { + Long loanId = loanIdRef.get(); + executeInlineCOB(loanId); + + addCharge(loanId, true, 5.0d, "20 January 2025"); + Long repaymentId = loanTransactionHelper.makeLoanRepayment(loanId, "Repayment", "20 January 2025", 82.20).getResourceId(); + repaymentIdRef.set(repaymentId); + }); + runAt("2 February 2025", () -> { + Long loanId = loanIdRef.get(); + executeInlineCOB(loanId); + + addChargebackForLoan(loanId, repaymentIdRef.get(), 82.20); + }); + runAt("20 February 2025", () -> { + Long loanId = loanIdRef.get(); + executeInlineCOB(loanId); + + GetLoansLoanIdResponse loanDetails = loanTransactionHelper.getLoanDetails(loanId); + validateTransactionsExist(loanDetails, // + transaction(0.26, "Accrual", "01 February 2025", 0.0, 0.0, 0.26, 0.0, 0.0, 0.0, 0.0), // + transaction(0.25, "Accrual", "02 February 2025", 0.0, 0.0, 0.25, 0.0, 0.0, 0.0, 0.0), // + transaction(0.25, "Accrual", "03 February 2025", 0.0, 0.0, 0.25, 0.0, 0.0, 0.0, 0.0)); // + }); + runAt("23 February 2025", () -> { + Long loanId = loanIdRef.get(); + executeInlineCOB(loanId); + + GetLoansLoanIdResponse loanDetails = loanTransactionHelper.getLoanDetails(loanId); + validateTransactionsExist(loanDetails, // + transaction(0.25, "Accrual", "19 February 2025", 0.0, 0.0, 0.25, 0.0, 0.0, 0.0, 0.0), // + transaction(0.26, "Accrual", "20 February 2025", 0.0, 0.0, 0.26, 0.0, 0.0, 0.0, 0.0), // + transaction(0.23, "Accrual", "21 February 2025", 0.0, 0.0, 0.23, 0.0, 0.0, 0.0, 0.0), // + transaction(0.22, "Accrual", "22 February 2025", 0.0, 0.0, 0.22, 0.0, 0.0, 0.0, 0.0)); // + }); + } + + @Ignore // TODO: enable when implementation is complete + @Test + public void testProgressiveChargeBackInterestRecalculation() { + AtomicReference loanIdRef = new AtomicReference<>(); + AtomicReference repaymentIdRef = new AtomicReference<>(); + + setup(); + final PostLoanProductsResponse loanProductsResponse = loanProductHelper + .createLoanProduct(create4IProgressive().isInterestRecalculationEnabled(true) + .creditAllocation(chargebackCreditAllocationOrders(List.of("PRINCIPAL", "PENALTY", "FEE", "INTEREST"))) + .currencyCode("USD")); + + runAt("20 December 2024", () -> { + Long loanId = applyAndApproveProgressiveLoan(client.getClientId(), loanProductsResponse.getResourceId(), "20 December 2024", + 430.0, 26.0, 6, null); + + loanIdRef.set(loanId); + + disburseLoan(loanId, BigDecimal.valueOf(430), "20 December 2024"); + executeInlineCOB(loanId); + }); + runAt("20 January 2025", () -> { + Long loanId = loanIdRef.get(); + executeInlineCOB(loanId); + + addCharge(loanId, true, 5.0d, "20 January 2025"); + Long repaymentId = loanTransactionHelper.makeLoanRepayment(loanId, "Repayment", "20 January 2025", 82.20).getResourceId(); + repaymentIdRef.set(repaymentId); + }); + runAt("2 February 2025", () -> { + Long loanId = loanIdRef.get(); + executeInlineCOB(loanId); + + addChargebackForLoan(loanId, repaymentIdRef.get(), 82.20); + }); + runAt("20 February 2025", () -> { + Long loanId = loanIdRef.get(); + executeInlineCOB(loanId); + + GetLoansLoanIdResponse loanDetails = loanTransactionHelper.getLoanDetails(loanId); + validateTransactionsExist(loanDetails, // + transaction(0.26, "Accrual", "01 February 2025", 0.0, 0.0, 0.26, 0.0, 0.0, 0.0, 0.0), // + transaction(0.25, "Accrual", "02 February 2025", 0.0, 0.0, 0.25, 0.0, 0.0, 0.0, 0.0), // + transaction(0.30, "Accrual", "03 February 2025", 0.0, 0.0, 0.30, 0.0, 0.0, 0.0, 0.0), // + transaction(0.30, "Accrual", "04 February 2025", 0.0, 0.0, 0.30, 0.0, 0.0, 0.0, 0.0)); // + }); + runAt("23 February 2025", () -> { + Long loanId = loanIdRef.get(); + executeInlineCOB(loanId); + + GetLoansLoanIdResponse loanDetails = loanTransactionHelper.getLoanDetails(loanId); + validateTransactionsExist(loanDetails, // + transaction(0.30, "Accrual", "19 February 2025", 0.0, 0.0, 0.30, 0.0, 0.0, 0.0, 0.0), // + transaction(0.30, "Accrual", "20 February 2025", 0.0, 0.0, 0.30, 0.0, 0.0, 0.0, 0.0), // + transaction(0.23, "Accrual", "21 February 2025", 0.0, 0.0, 0.23, 0.0, 0.0, 0.0, 0.0), // + transaction(0.22, "Accrual", "22 February 2025", 0.0, 0.0, 0.22, 0.0, 0.0, 0.0, 0.0)); // + }); + } + + private List chargebackCreditAllocationOrders(List allocationIds) { + List creditAllocationOrders = new ArrayList<>(allocationIds.size()); + for (int i = 0; i < allocationIds.size(); i++) { + String allocationId = allocationIds.get(i); + creditAllocationOrders.add(new CreditAllocationOrder().order(i + 1).creditAllocationRule(allocationId)); + } + return List.of(new CreditAllocationData().transactionType("CHARGEBACK").creditAllocationOrder(creditAllocationOrders)); + } + + private void validateTransactionsExist(GetLoansLoanIdResponse loanDetails, TransactionExt... transactions) { + Arrays.stream(transactions).forEach(tr -> { + boolean found = loanDetails.getTransactions().stream().anyMatch(item -> Objects.equals(item.getAmount(), tr.amount) // + && Objects.equals(item.getType().getValue(), tr.type) // + && Objects.equals(item.getDate(), LocalDate.parse(tr.date, dateTimeFormatter)) // + && Objects.equals(item.getOutstandingLoanBalance(), tr.outstandingPrincipal) // + && Objects.equals(item.getPrincipalPortion(), tr.principalPortion) // + && Objects.equals(item.getInterestPortion(), tr.interestPortion) // + && Objects.equals(item.getFeeChargesPortion(), tr.feePortion) // + && Objects.equals(item.getPenaltyChargesPortion(), tr.penaltyPortion) // + && Objects.equals(item.getOverpaymentPortion(), tr.overpaymentPortion) // + && Objects.equals(item.getUnrecognizedIncomePortion(), tr.unrecognizedPortion) // + ); + Assertions.assertTrue(found, "Required transaction not found: " + tr + " on loan " + loanDetails.getId()); + }); + } } diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanRepaymentScheduleForChargesAfterMaturityTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanRepaymentScheduleForChargesAfterMaturityTest.java index 43abd6637e7..0df407dfd39 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanRepaymentScheduleForChargesAfterMaturityTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanRepaymentScheduleForChargesAfterMaturityTest.java @@ -296,6 +296,41 @@ public void loanNPlusOneInstallmentIsAdjustedAfterRescheduleIfDateFallBeforeMatu }); } + @Test + public void incorrectValueAfterCharge() { + runAt("20 December 2024", () -> { + // Create Client + Long clientId = clientHelper.createClient(ClientHelper.defaultClientCreationRequest()).getClientId(); + // Create Loan Product + PostLoanProductsRequest product = createOnePeriod30DaysLongNoInterestPeriodicAccrualProductWithAdvancedPaymentAllocation() + .minPrincipal(100.0); + PostLoanProductsResponse loanProductResponse = loanProductHelper.createLoanProduct(product); + Long loanProductId = loanProductResponse.getResourceId(); + + // Apply and Approve Loan + Long loanId = applyAndApproveLoan(clientId, loanProductId, "20 December 2024", 800.0, 4, req -> { + req.setRepaymentEvery(30); + req.setLoanTermFrequency(120); + req.setTransactionProcessingStrategyCode("advanced-payment-allocation-strategy"); + }); + + // Disburse Loan + disburseLoan(loanId, BigDecimal.valueOf(800.00), "20 December 2024"); + + // add charge with a huge amount + addCharge(loanId, false, 123456789012.12, "23 December 2024"); + + // verify repayment schedule + verifyRepaymentSchedule(loanId, // + installment(800.0, null, "20 December 2024"), // + installment(200.0, 0.0, 123456789212.12, false, "19 January 2025"), // + installment(200.0, 0.0, 200.0, false, "18 February 2025"), // + installment(200.0, 0.0, 200.0, false, "20 March 2025"), // + installment(200.0, 0.0, 200.0, false, "19 April 2025")// + ); + }); + } + private Long createLoanProductWithMultiDisbursalAndRepayments() { boolean multiDisburseEnabled = true; PostLoanProductsRequest product = createOnePeriod30DaysLongNoInterestPeriodicAccrualProduct(); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/MultiActivityAccrualsTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/MultiActivityAccrualsTest.java index 954a1e054fb..3b4dfc8fe12 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/MultiActivityAccrualsTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/MultiActivityAccrualsTest.java @@ -96,12 +96,12 @@ public void testMultiAccrualActivityCreated() { verifyTransactions(loanId, // transaction(600.0, "Disbursement", "09 August 2024", 600.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), - transaction(20.00, "Accrual", "09 December 2024", 0, 0, 20.00, 0, 0, 0.0, 0.0), - transaction(5.0, "Accrual Activity", "09 September 2024", 0, 0, 5.0, 0, 0, 0.0, 0.0), + transaction(19.98, "Accrual", "09 December 2024", 0, 0, 19.98, 0, 0, 0.0, 0.0), + transaction(4.99, "Accrual Activity", "09 September 2024", 0, 0, 4.99, 0, 0, 0.0, 0.0), transaction(5.0, "Accrual Activity", "09 October 2024", 0, 0, 5.0, 0, 0, 0.0, 0.0), - transaction(5.0, "Accrual Activity", "09 November 2024", 0, 0, 5.0, 0, 0, 0.0, 0.0), + transaction(4.99, "Accrual Activity", "09 November 2024", 0, 0, 4.99, 0, 0, 0.0, 0.0), transaction(5.0, "Accrual Activity", "09 December 2024", 0, 0, 5.0, 0, 0, 0.0, 0.0), - transaction(700.00, "Repayment", "09 December 2024", 0, 600.00, 20.0, 0, 0, 0.0, 80.0)); + transaction(700.00, "Repayment", "09 December 2024", 0, 600.00, 19.98, 0, 0, 0.0, 80.02)); }); } }