This is an automated email from the ASF dual-hosted git repository. adamsaghy pushed a commit to branch release/1.13.1 in repository https://gitbox.apache.org/repos/asf/fineract.git
commit 9c6dd7142def92336c3e317fd5796ea39227c869 Author: MarianaDmytrivBinariks <[email protected]> AuthorDate: Mon Oct 20 18:31:32 2025 +0300 FINERACT-2390: e2e test scenarios for infinite loop with MIR trn issue --- .../test/data/loanproduct/DefaultLoanProduct.java | 1 + .../global/LoanProductGlobalInitializerStep.java | 82 ++++++ .../fineract/test/support/TestContextKey.java | 1 + .../resources/features/LoanAccrualActivity.feature | 297 ++++++++++++++++++++- 4 files changed, 380 insertions(+), 1 deletion(-) 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 3efd89cfaf..1fe4813d90 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 @@ -169,6 +169,7 @@ public enum DefaultLoanProduct implements LoanProduct { LP1_INTEREST_FLAT_SAR_RECALCULATION_DAILY_360_30_APPROVED_OVER_APPLIED_MULTIDISB, // LP1_INTEREST_FLAT_DAILY_RECALCULATION_DAILY_360_30_MULTIDISB, // LP1_INTEREST_FLAT_SAR_RECALCULATION_SAME_AS_REPAYMENT_MULTIDISB_AUTO_DOWNPAYMENT, // + LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY, // ; @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 b5b7e1d5ee..f2803e8f30 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 @@ -19,6 +19,7 @@ package org.apache.fineract.test.initializer.global; import static org.apache.fineract.client.models.LoanProductRelatedDetail.DaysInYearCustomStrategyEnum.FEB_29_PERIOD_ONLY; +import static org.apache.fineract.test.data.ChargeOffBehaviour.ZERO_INTEREST; import static org.apache.fineract.test.data.TransactionProcessingStrategyCode.ADVANCED_PAYMENT_ALLOCATION; import static org.apache.fineract.test.factory.LoanProductsRequestFactory.INTEREST_CALCULATION_PERIOD_TYPE_SAME_AS_REPAYMENT; import static org.apache.fineract.test.factory.LoanProductsRequestFactory.INTEREST_RATE_FREQUENCY_TYPE_MONTH; @@ -3974,6 +3975,87 @@ public class LoanProductGlobalInitializerStep implements FineractGlobalInitializ TestContext.INSTANCE.set( TestContextKey.DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP1_INTEREST_FLAT_SAR_RECALCULATION_SAME_AS_REPAYMENT_MULTIDISB_AUTO_DOWNPAYMENT, responseLoanProductsRequestInterestFlatSaRRecalculationSameAsRepaymentMultiDisbursementAUtoDownPayment); + + // LP2 advanced custom payment allocation + progressive loan schedule + horizontal + interest recalculation + // Frequency for recalculate Outstanding Principal: Daily, Frequency Interval for recalculation: 1 + String name147 = DefaultLoanProduct.LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY + .getName(); + PostLoanProductsRequest loanProductsResponseAdvCustomPaymentAllocationProgressiveLoanInterestDailyEmi36030InterestRecalculationDaily = loanProductsRequestFactory + .defaultLoanProductsRequestLP2Emi()// + .supportedInterestRefundTypes(supportedInterestRefundTypes) + // .installmentAmountInMultiplesOf(null) // + .name(name147)// + .daysInYearType(DaysInYearType.DAYS360.value)// + .daysInMonthType(DaysInMonthType.DAYS30.value)// + .isInterestRecalculationEnabled(true)// + .preClosureInterestCalculationStrategy(1)// + .rescheduleStrategyMethod(4)// + .interestRecalculationCompoundingMethod(0)// + .recalculationRestFrequencyType(2)// + .recalculationRestFrequencyInterval(1)// + .enableAccrualActivityPosting(true) // + .chargeOffBehaviour(ZERO_INTEREST.value)// + .paymentAllocation(List.of(// + createPaymentAllocation("MERCHANT_ISSUED_REFUND", "LAST_INSTALLMENT", + LoanProductPaymentAllocationRule.AllocationTypesEnum.PAST_DUE_INTEREST, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.PAST_DUE_PRINCIPAL, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.PAST_DUE_PENALTY, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.PAST_DUE_FEE, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.DUE_INTEREST, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.DUE_PRINCIPAL, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.DUE_PENALTY, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.DUE_FEE, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_INTEREST, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_PRINCIPAL, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_PENALTY, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_FEE), // + createPaymentAllocation("GOODWILL_CREDIT", "REAMORTIZATION", + LoanProductPaymentAllocationRule.AllocationTypesEnum.PAST_DUE_PRINCIPAL, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.PAST_DUE_INTEREST, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.PAST_DUE_PENALTY, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.PAST_DUE_FEE, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.DUE_PRINCIPAL, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.DUE_INTEREST, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.DUE_PENALTY, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.DUE_FEE, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_PRINCIPAL, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_INTEREST, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_PENALTY, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_FEE), // + createPaymentAllocation("DEFAULT", "NEXT_INSTALLMENT", + LoanProductPaymentAllocationRule.AllocationTypesEnum.PAST_DUE_INTEREST, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.PAST_DUE_PRINCIPAL, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.PAST_DUE_PENALTY, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.PAST_DUE_FEE, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.DUE_INTEREST, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.DUE_PRINCIPAL, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.DUE_PENALTY, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.DUE_FEE, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_INTEREST, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_PRINCIPAL, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_PENALTY, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_FEE), // + createPaymentAllocation("PAYOUT_REFUND", "NEXT_INSTALLMENT", + LoanProductPaymentAllocationRule.AllocationTypesEnum.PAST_DUE_INTEREST, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.PAST_DUE_PRINCIPAL, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.PAST_DUE_PENALTY, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.PAST_DUE_FEE, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.DUE_INTEREST, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.DUE_PRINCIPAL, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.DUE_PENALTY, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.DUE_FEE, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_INTEREST, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_PRINCIPAL, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_PENALTY, // + LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_FEE) // + ));// + Response<PostLoanProductsResponse> responseLoanProductsResponseAdvCustomPaymentAllocationProgressiveLoanInterestDailyEmi36030InterestRecalculationDaily = loanProductsApi + .createLoanProduct( + loanProductsResponseAdvCustomPaymentAllocationProgressiveLoanInterestDailyEmi36030InterestRecalculationDaily) + .execute(); + TestContext.INSTANCE.set( + TestContextKey.DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY, + responseLoanProductsResponseAdvCustomPaymentAllocationProgressiveLoanInterestDailyEmi36030InterestRecalculationDaily); } public static AdvancedPaymentData createPaymentAllocation(String transactionType, String futureInstallmentAllocationRule, 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 7a7c906d47..37c72d2d34 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 @@ -188,6 +188,7 @@ public abstract class TestContextKey { public static final String DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP1_INTEREST_FLAT_SAR_RECALCULATION_DAILY_360_30_APPROVED_OVER_APPLIED_MULTIDISB = "loanProductCreateResponseLP1InterestFlatSameAsRepaymentRecalculationDaily36030MultiDisbursement"; public static final String DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP1_INTEREST_FLAT_DAILY_RECALCULATION_DAILY_360_30_MULTIDISB = "loanProductCreateResponseLP1InterestFlatDailyRecalculationDaily36030MultiDisbursement"; public static final String DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP1_INTEREST_FLAT_SAR_RECALCULATION_SAME_AS_REPAYMENT_MULTIDISB_AUTO_DOWNPAYMENT = "loanProductCreateResponseLP1InterestFlatDailyRecalculationSameAsRepaymentMultiDisbursementAutoDownPayment"; + public static final String DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY = "loanProductCreateResponseLP2AdvancedPaymentAllocCustomInterestDailyEmi36030InterestRecalculationDaily"; 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/LoanAccrualActivity.feature b/fineract-e2e-tests-runner/src/test/resources/features/LoanAccrualActivity.feature index 812004fbe8..4d74b356e5 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/LoanAccrualActivity.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/LoanAccrualActivity.feature @@ -9090,6 +9090,301 @@ Feature: LoanAccrualActivity And In Loan Transactions all transactions have non-null external-id When Admin makes Credit Balance Refund transaction on "06 September 2025" with 3.91 EUR transaction amount - Then Loan's all installments have obligations met + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C3960 + Scenario: Verify MIR trn is processed after repayment for progressive loan with custom payment allocation rules - UC1 + When Admin sets the business date to "16 August 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY | 16 August 2025 | 516.06 | 19.99 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 24 | MONTHS | 1 | MONTHS | 24 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "16 August 2025" with "516.06" amount and expected disbursement date on "16 August 2025" + And Admin successfully disburse the loan on "16 August 2025" with "516.06" EUR transaction amount + Then Loan Repayment schedule has 24 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 16 August 2025 | | 516.06 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 16 September 2025 | | 498.4 | 17.66 | 8.6 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 2 | 30 | 16 October 2025 | | 480.44 | 17.96 | 8.3 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 3 | 31 | 16 November 2025 | | 462.18 | 18.26 | 8.0 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 4 | 30 | 16 December 2025 | | 443.62 | 18.56 | 7.7 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 5 | 31 | 16 January 2026 | | 424.75 | 18.87 | 7.39 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 6 | 31 | 16 February 2026 | | 405.57 | 19.18 | 7.08 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 7 | 28 | 16 March 2026 | | 386.07 | 19.5 | 6.76 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 8 | 31 | 16 April 2026 | | 366.24 | 19.83 | 6.43 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 9 | 30 | 16 May 2026 | | 346.08 | 20.16 | 6.1 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 10 | 31 | 16 June 2026 | | 325.59 | 20.49 | 5.77 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 11 | 30 | 16 July 2026 | | 304.75 | 20.84 | 5.42 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 12 | 31 | 16 August 2026 | | 283.57 | 21.18 | 5.08 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 13 | 31 | 16 September 2026 | | 262.03 | 21.54 | 4.72 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 14 | 30 | 16 October 2026 | | 240.13 | 21.9 | 4.36 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 15 | 31 | 16 November 2026 | | 217.87 | 22.26 | 4.0 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 16 | 30 | 16 December 2026 | | 195.24 | 22.63 | 3.63 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 17 | 31 | 16 January 2027 | | 172.23 | 23.01 | 3.25 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 18 | 31 | 16 February 2027 | | 148.84 | 23.39 | 2.87 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 19 | 28 | 16 March 2027 | | 125.06 | 23.78 | 2.48 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 20 | 31 | 16 April 2027 | | 100.88 | 24.18 | 2.08 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 21 | 30 | 16 May 2027 | | 76.3 | 24.58 | 1.68 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 22 | 31 | 16 June 2027 | | 51.31 | 24.99 | 1.27 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 23 | 30 | 16 July 2027 | | 25.9 | 25.41 | 0.85 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 24 | 31 | 16 August 2027 | | 0.0 | 25.9 | 0.43 | 0.0 | 0.0 | 26.33 | 0.0 | 0.0 | 0.0 | 26.33 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 516.06 | 114.25 | 0.0 | 0.0 | 630.31 | 0.0 | 0.0 | 0.0 | 630.31 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 16 August 2025 | Disbursement | 516.06 | 0.0 | 0.0 | 0.0 | 0.0 | 516.06 | false | false | + + When Admin sets the business date to "08 September 2025" + And Admin makes "REPAYMENT" transaction with "AUTOPAY" payment type on "08 September 2025" with 50 EUR transaction amount + Then Loan Repayment schedule has 24 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 16 August 2025 | | 516.06 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 16 September 2025 | 08 September 2025 | 496.18 | 19.88 | 6.38 | 0.0 | 0.0 | 26.26 | 26.26 | 26.26 | 0.0 | 0.0 | + | 2 | 30 | 16 October 2025 | | 469.92 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | 23.74 | 23.74 | 0.0 | 2.52 | + | 3 | 31 | 16 November 2025 | | 461.39 | 8.53 | 17.73 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 4 | 30 | 16 December 2025 | | 442.82 | 18.57 | 7.69 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 5 | 31 | 16 January 2026 | | 423.94 | 18.88 | 7.38 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 6 | 31 | 16 February 2026 | | 404.74 | 19.2 | 7.06 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 7 | 28 | 16 March 2026 | | 385.22 | 19.52 | 6.74 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 8 | 31 | 16 April 2026 | | 365.38 | 19.84 | 6.42 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 9 | 30 | 16 May 2026 | | 345.21 | 20.17 | 6.09 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 10 | 31 | 16 June 2026 | | 324.7 | 20.51 | 5.75 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 11 | 30 | 16 July 2026 | | 303.85 | 20.85 | 5.41 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 12 | 31 | 16 August 2026 | | 282.65 | 21.2 | 5.06 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 13 | 31 | 16 September 2026 | | 261.1 | 21.55 | 4.71 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 14 | 30 | 16 October 2026 | | 239.19 | 21.91 | 4.35 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 15 | 31 | 16 November 2026 | | 216.91 | 22.28 | 3.98 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 16 | 30 | 16 December 2026 | | 194.26 | 22.65 | 3.61 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 17 | 31 | 16 January 2027 | | 171.24 | 23.02 | 3.24 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 18 | 31 | 16 February 2027 | | 147.83 | 23.41 | 2.85 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 19 | 28 | 16 March 2027 | | 124.03 | 23.8 | 2.46 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 20 | 31 | 16 April 2027 | | 99.84 | 24.19 | 2.07 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 21 | 30 | 16 May 2027 | | 75.24 | 24.6 | 1.66 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 22 | 31 | 16 June 2027 | | 50.23 | 25.01 | 1.25 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 23 | 30 | 16 July 2027 | | 24.81 | 25.42 | 0.84 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 24 | 31 | 16 August 2027 | | 0.0 | 24.81 | 0.41 | 0.0 | 0.0 | 25.22 | 0.0 | 0.0 | 0.0 | 25.22 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 516.06 | 113.14 | 0.0 | 0.0 | 629.2 | 50.0 | 50.0 | 0.0 | 579.2 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 16 August 2025 | Disbursement | 516.06 | 0.0 | 0.0 | 0.0 | 0.0 | 516.06 | false | false | + | 08 September 2025 | Repayment | 50.0 | 43.62 | 6.38 | 0.0 | 0.0 | 472.44 | false | false | + + When Admin sets the business date to "06 October 2025" + When Admin makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "06 October 2025" with 516.06 EUR transaction amount + + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 16 August 2025 | Disbursement | 516.06 | 0.0 | 0.0 | 0.0 | 0.0 | 516.06 | false | false | + | 08 September 2025 | Repayment | 50.0 | 43.62 | 6.38 | 0.0 | 0.0 | 472.44 | false | false | + | 16 September 2025 | Accrual Activity | 6.38 | 0.0 | 6.38 | 0.0 | 0.0 | 0.0 | false | false | + | 06 October 2025 | Merchant Issued Refund | 516.06 | 472.44 | 7.28 | 0.0 | 0.0 | 0.0 | false | false | + | 06 October 2025 | Interest Refund | 13.66 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | + | 06 October 2025 | Accrual | 13.66 | 0.0 | 13.66 | 0.0 | 0.0 | 0.0 | false | false | + | 06 October 2025 | Accrual Activity | 7.28 | 0.0 | 7.28 | 0.0 | 0.0 | 0.0 | false | false | + + And Loan status will be "OVERPAID" + And Loan has 50 overpaid amount + + When Admin makes Credit Balance Refund transaction on "06 October 2025" with 50 EUR transaction amount + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4128 + Scenario: Verify Payout Refund trn is processed after repayment for progressive loan with custom payment allocation rules - UC2 + When Admin sets the business date to "16 August 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY | 16 August 2025 | 516.06 | 19.99 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 24 | MONTHS | 1 | MONTHS | 24 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "16 August 2025" with "516.06" amount and expected disbursement date on "16 August 2025" + And Admin successfully disburse the loan on "16 August 2025" with "516.06" EUR transaction amount + Then Loan Repayment schedule has 24 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 16 August 2025 | | 516.06 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 16 September 2025 | | 498.4 | 17.66 | 8.6 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 2 | 30 | 16 October 2025 | | 480.44 | 17.96 | 8.3 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 3 | 31 | 16 November 2025 | | 462.18 | 18.26 | 8.0 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 4 | 30 | 16 December 2025 | | 443.62 | 18.56 | 7.7 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 5 | 31 | 16 January 2026 | | 424.75 | 18.87 | 7.39 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 6 | 31 | 16 February 2026 | | 405.57 | 19.18 | 7.08 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 7 | 28 | 16 March 2026 | | 386.07 | 19.5 | 6.76 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 8 | 31 | 16 April 2026 | | 366.24 | 19.83 | 6.43 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 9 | 30 | 16 May 2026 | | 346.08 | 20.16 | 6.1 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 10 | 31 | 16 June 2026 | | 325.59 | 20.49 | 5.77 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 11 | 30 | 16 July 2026 | | 304.75 | 20.84 | 5.42 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 12 | 31 | 16 August 2026 | | 283.57 | 21.18 | 5.08 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 13 | 31 | 16 September 2026 | | 262.03 | 21.54 | 4.72 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 14 | 30 | 16 October 2026 | | 240.13 | 21.9 | 4.36 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 15 | 31 | 16 November 2026 | | 217.87 | 22.26 | 4.0 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 16 | 30 | 16 December 2026 | | 195.24 | 22.63 | 3.63 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 17 | 31 | 16 January 2027 | | 172.23 | 23.01 | 3.25 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 18 | 31 | 16 February 2027 | | 148.84 | 23.39 | 2.87 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 19 | 28 | 16 March 2027 | | 125.06 | 23.78 | 2.48 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 20 | 31 | 16 April 2027 | | 100.88 | 24.18 | 2.08 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 21 | 30 | 16 May 2027 | | 76.3 | 24.58 | 1.68 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 22 | 31 | 16 June 2027 | | 51.31 | 24.99 | 1.27 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 23 | 30 | 16 July 2027 | | 25.9 | 25.41 | 0.85 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 24 | 31 | 16 August 2027 | | 0.0 | 25.9 | 0.43 | 0.0 | 0.0 | 26.33 | 0.0 | 0.0 | 0.0 | 26.33 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 516.06 | 114.25 | 0.0 | 0.0 | 630.31 | 0.0 | 0.0 | 0.0 | 630.31 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 16 August 2025 | Disbursement | 516.06 | 0.0 | 0.0 | 0.0 | 0.0 | 516.06 | false | false | + + When Admin sets the business date to "08 September 2025" + And Admin makes "REPAYMENT" transaction with "AUTOPAY" payment type on "08 September 2025" with 50 EUR transaction amount + Then Loan Repayment schedule has 24 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 16 August 2025 | | 516.06 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 16 September 2025 | 08 September 2025 | 496.18 | 19.88 | 6.38 | 0.0 | 0.0 | 26.26 | 26.26 | 26.26 | 0.0 | 0.0 | + | 2 | 30 | 16 October 2025 | | 469.92 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | 23.74 | 23.74 | 0.0 | 2.52 | + | 3 | 31 | 16 November 2025 | | 461.39 | 8.53 | 17.73 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 4 | 30 | 16 December 2025 | | 442.82 | 18.57 | 7.69 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 5 | 31 | 16 January 2026 | | 423.94 | 18.88 | 7.38 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 6 | 31 | 16 February 2026 | | 404.74 | 19.2 | 7.06 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 7 | 28 | 16 March 2026 | | 385.22 | 19.52 | 6.74 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 8 | 31 | 16 April 2026 | | 365.38 | 19.84 | 6.42 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 9 | 30 | 16 May 2026 | | 345.21 | 20.17 | 6.09 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 10 | 31 | 16 June 2026 | | 324.7 | 20.51 | 5.75 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 11 | 30 | 16 July 2026 | | 303.85 | 20.85 | 5.41 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 12 | 31 | 16 August 2026 | | 282.65 | 21.2 | 5.06 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 13 | 31 | 16 September 2026 | | 261.1 | 21.55 | 4.71 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 14 | 30 | 16 October 2026 | | 239.19 | 21.91 | 4.35 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 15 | 31 | 16 November 2026 | | 216.91 | 22.28 | 3.98 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 16 | 30 | 16 December 2026 | | 194.26 | 22.65 | 3.61 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 17 | 31 | 16 January 2027 | | 171.24 | 23.02 | 3.24 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 18 | 31 | 16 February 2027 | | 147.83 | 23.41 | 2.85 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 19 | 28 | 16 March 2027 | | 124.03 | 23.8 | 2.46 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 20 | 31 | 16 April 2027 | | 99.84 | 24.19 | 2.07 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 21 | 30 | 16 May 2027 | | 75.24 | 24.6 | 1.66 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 22 | 31 | 16 June 2027 | | 50.23 | 25.01 | 1.25 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 23 | 30 | 16 July 2027 | | 24.81 | 25.42 | 0.84 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 24 | 31 | 16 August 2027 | | 0.0 | 24.81 | 0.41 | 0.0 | 0.0 | 25.22 | 0.0 | 0.0 | 0.0 | 25.22 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 516.06 | 113.14 | 0.0 | 0.0 | 629.2 | 50.0 | 50.0 | 0.0 | 579.2 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 16 August 2025 | Disbursement | 516.06 | 0.0 | 0.0 | 0.0 | 0.0 | 516.06 | false | false | + | 08 September 2025 | Repayment | 50.0 | 43.62 | 6.38 | 0.0 | 0.0 | 472.44 | false | false | + + When Admin sets the business date to "06 October 2025" + When Admin makes "PAYOUT_REFUND" transaction with "AUTOPAY" payment type on "06 October 2025" with 516.06 EUR transaction amount + + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 16 August 2025 | Disbursement | 516.06 | 0.0 | 0.0 | 0.0 | 0.0 | 516.06 | false | false | + | 08 September 2025 | Repayment | 50.0 | 43.62 | 6.38 | 0.0 | 0.0 | 472.44 | false | false | + | 16 September 2025 | Accrual Activity | 6.38 | 0.0 | 6.38 | 0.0 | 0.0 | 0.0 | false | false | + | 06 October 2025 | Payout Refund | 516.06 | 472.44 | 7.28 | 0.0 | 0.0 | 0.0 | false | false | + | 06 October 2025 | Interest Refund | 13.66 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | + | 06 October 2025 | Accrual | 13.66 | 0.0 | 13.66 | 0.0 | 0.0 | 0.0 | false | false | + | 06 October 2025 | Accrual Activity | 7.28 | 0.0 | 7.28 | 0.0 | 0.0 | 0.0 | false | false | + + And Loan status will be "OVERPAID" + And Loan has 50 overpaid amount + + When Admin makes Credit Balance Refund transaction on "06 October 2025" with 50 EUR transaction amount + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4129 + Scenario: Verify Goodwill Credit trn is processed after repayment for progressive loan with custom payment allocation rules - UC3 + When Admin sets the business date to "16 August 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY | 16 August 2025 | 516.06 | 19.99 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 24 | MONTHS | 1 | MONTHS | 24 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "16 August 2025" with "516.06" amount and expected disbursement date on "16 August 2025" + And Admin successfully disburse the loan on "16 August 2025" with "516.06" EUR transaction amount + Then Loan Repayment schedule has 24 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 16 August 2025 | | 516.06 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 16 September 2025 | | 498.4 | 17.66 | 8.6 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 2 | 30 | 16 October 2025 | | 480.44 | 17.96 | 8.3 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 3 | 31 | 16 November 2025 | | 462.18 | 18.26 | 8.0 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 4 | 30 | 16 December 2025 | | 443.62 | 18.56 | 7.7 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 5 | 31 | 16 January 2026 | | 424.75 | 18.87 | 7.39 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 6 | 31 | 16 February 2026 | | 405.57 | 19.18 | 7.08 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 7 | 28 | 16 March 2026 | | 386.07 | 19.5 | 6.76 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 8 | 31 | 16 April 2026 | | 366.24 | 19.83 | 6.43 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 9 | 30 | 16 May 2026 | | 346.08 | 20.16 | 6.1 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 10 | 31 | 16 June 2026 | | 325.59 | 20.49 | 5.77 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 11 | 30 | 16 July 2026 | | 304.75 | 20.84 | 5.42 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 12 | 31 | 16 August 2026 | | 283.57 | 21.18 | 5.08 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 13 | 31 | 16 September 2026 | | 262.03 | 21.54 | 4.72 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 14 | 30 | 16 October 2026 | | 240.13 | 21.9 | 4.36 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 15 | 31 | 16 November 2026 | | 217.87 | 22.26 | 4.0 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 16 | 30 | 16 December 2026 | | 195.24 | 22.63 | 3.63 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 17 | 31 | 16 January 2027 | | 172.23 | 23.01 | 3.25 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 18 | 31 | 16 February 2027 | | 148.84 | 23.39 | 2.87 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 19 | 28 | 16 March 2027 | | 125.06 | 23.78 | 2.48 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 20 | 31 | 16 April 2027 | | 100.88 | 24.18 | 2.08 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 21 | 30 | 16 May 2027 | | 76.3 | 24.58 | 1.68 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 22 | 31 | 16 June 2027 | | 51.31 | 24.99 | 1.27 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 23 | 30 | 16 July 2027 | | 25.9 | 25.41 | 0.85 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 24 | 31 | 16 August 2027 | | 0.0 | 25.9 | 0.43 | 0.0 | 0.0 | 26.33 | 0.0 | 0.0 | 0.0 | 26.33 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 516.06 | 114.25 | 0.0 | 0.0 | 630.31 | 0.0 | 0.0 | 0.0 | 630.31 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 16 August 2025 | Disbursement | 516.06 | 0.0 | 0.0 | 0.0 | 0.0 | 516.06 | false | false | + + When Admin sets the business date to "08 September 2025" + And Admin makes "REPAYMENT" transaction with "AUTOPAY" payment type on "08 September 2025" with 50 EUR transaction amount + Then Loan Repayment schedule has 24 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 16 August 2025 | | 516.06 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 16 September 2025 | 08 September 2025 | 496.18 | 19.88 | 6.38 | 0.0 | 0.0 | 26.26 | 26.26 | 26.26 | 0.0 | 0.0 | + | 2 | 30 | 16 October 2025 | | 469.92 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | 23.74 | 23.74 | 0.0 | 2.52 | + | 3 | 31 | 16 November 2025 | | 461.39 | 8.53 | 17.73 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 4 | 30 | 16 December 2025 | | 442.82 | 18.57 | 7.69 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 5 | 31 | 16 January 2026 | | 423.94 | 18.88 | 7.38 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 6 | 31 | 16 February 2026 | | 404.74 | 19.2 | 7.06 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 7 | 28 | 16 March 2026 | | 385.22 | 19.52 | 6.74 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 8 | 31 | 16 April 2026 | | 365.38 | 19.84 | 6.42 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 9 | 30 | 16 May 2026 | | 345.21 | 20.17 | 6.09 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 10 | 31 | 16 June 2026 | | 324.7 | 20.51 | 5.75 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 11 | 30 | 16 July 2026 | | 303.85 | 20.85 | 5.41 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 12 | 31 | 16 August 2026 | | 282.65 | 21.2 | 5.06 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 13 | 31 | 16 September 2026 | | 261.1 | 21.55 | 4.71 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 14 | 30 | 16 October 2026 | | 239.19 | 21.91 | 4.35 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 15 | 31 | 16 November 2026 | | 216.91 | 22.28 | 3.98 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 16 | 30 | 16 December 2026 | | 194.26 | 22.65 | 3.61 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 17 | 31 | 16 January 2027 | | 171.24 | 23.02 | 3.24 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 18 | 31 | 16 February 2027 | | 147.83 | 23.41 | 2.85 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 19 | 28 | 16 March 2027 | | 124.03 | 23.8 | 2.46 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 20 | 31 | 16 April 2027 | | 99.84 | 24.19 | 2.07 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 21 | 30 | 16 May 2027 | | 75.24 | 24.6 | 1.66 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 22 | 31 | 16 June 2027 | | 50.23 | 25.01 | 1.25 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 23 | 30 | 16 July 2027 | | 24.81 | 25.42 | 0.84 | 0.0 | 0.0 | 26.26 | 0.0 | 0.0 | 0.0 | 26.26 | + | 24 | 31 | 16 August 2027 | | 0.0 | 24.81 | 0.41 | 0.0 | 0.0 | 25.22 | 0.0 | 0.0 | 0.0 | 25.22 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 516.06 | 113.14 | 0.0 | 0.0 | 629.2 | 50.0 | 50.0 | 0.0 | 579.2 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 16 August 2025 | Disbursement | 516.06 | 0.0 | 0.0 | 0.0 | 0.0 | 516.06 | false | false | + | 08 September 2025 | Repayment | 50.0 | 43.62 | 6.38 | 0.0 | 0.0 | 472.44 | false | false | + + When Admin sets the business date to "06 October 2025" + When Admin makes "GOODWILL_CREDIT" transaction with "AUTOPAY" payment type on "06 October 2025" with 516.06 EUR transaction amount + + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 16 August 2025 | Disbursement | 516.06 | 0.0 | 0.0 | 0.0 | 0.0 | 516.06 | false | false | + | 08 September 2025 | Repayment | 50.0 | 43.62 | 6.38 | 0.0 | 0.0 | 472.44 | false | false | + | 16 September 2025 | Accrual Activity | 6.38 | 0.0 | 6.38 | 0.0 | 0.0 | 0.0 | false | false | + | 06 October 2025 | Goodwill Credit | 516.06 | 472.44 | 7.28 | 0.0 | 0.0 | 0.0 | false | false | + | 06 October 2025 | Accrual | 13.66 | 0.0 | 13.66 | 0.0 | 0.0 | 0.0 | false | false | + | 06 October 2025 | Accrual Activity | 7.28 | 0.0 | 7.28 | 0.0 | 0.0 | 0.0 | false | false | + + And Loan status will be "OVERPAID" + And Loan has 36.34 overpaid amount + When Admin makes Credit Balance Refund transaction on "06 October 2025" with 36.34 EUR transaction amount + Then Loan is closed with zero outstanding balance and it's all installments have obligations met
