You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by ad...@apache.org on 2025/08/05 11:49:46 UTC

(fineract) branch develop updated (8d829b1063 -> 9f53440543)

This is an automated email from the ASF dual-hosted git repository.

adamsaghy pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git


    from 8d829b1063 FINERACT-2338: added e2e test for backdated interest rate change
     new dfab66132b FINERACT-1968: Progressive Loan schedule handling - interest handling (DECLINING BALANCE interest, Same as repayment period, Equal installments)
     new 9f53440543 FINERACT-1968: Progressive Loan schedule handling - interest handling (DECLINING BALANCE interest, Same as repayment period, Equal installments) - E2E tests

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .gitignore                                         |    4 +-
 .../test/data/loanproduct/DefaultLoanProduct.java  |    3 +
 .../global/LoanProductGlobalInitializerStep.java   |  111 +-
 .../fineract/test/support/TestContextKey.java      |    3 +
 .../features/LoanRepaymentSchedule.feature         | 1557 ++++++++++++++++++++
 .../calc/ProgressiveEMICalculatorTest.java         |  186 +++
 6 files changed, 1861 insertions(+), 3 deletions(-)
 create mode 100644 fineract-e2e-tests-runner/src/test/resources/features/LoanRepaymentSchedule.feature


(fineract) 02/02: FINERACT-1968: Progressive Loan schedule handling - interest handling (DECLINING BALANCE interest, Same as repayment period, Equal installments) - E2E tests

Posted by ad...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

adamsaghy pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git

commit 9f5344054318d3f3f7ed0c35084e43d07de82a7b
Author: Peter Kovacs <pe...@dpc.hu>
AuthorDate: Mon Aug 4 14:22:07 2025 +0200

    FINERACT-1968: Progressive Loan schedule handling - interest handling (DECLINING BALANCE interest, Same as repayment period, Equal installments) - E2E tests
---
 .gitignore                                         |    4 +-
 .../test/data/loanproduct/DefaultLoanProduct.java  |    3 +
 .../global/LoanProductGlobalInitializerStep.java   |  111 +-
 .../fineract/test/support/TestContextKey.java      |    3 +
 .../features/LoanRepaymentSchedule.feature         | 1557 ++++++++++++++++++++
 5 files changed, 1675 insertions(+), 3 deletions(-)

diff --git a/.gitignore b/.gitignore
index 97b125798f..c63dfd09fa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -32,4 +32,6 @@ fineract-provider/src/main/generated/
 gradleExp/
 
 .run/
-.java-version
\ No newline at end of file
+.java-version
+
+.windsurf/
\ No newline at end of file
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 157415377b..9f5c3ee529 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
@@ -154,6 +154,9 @@ public enum DefaultLoanProduct implements LoanProduct {
     LP2_ADV_PYMNT_INTEREST_DAILY_INSTALLMENT_FEE_ALL_CHARGES, //
     LP2_ADV_PYMNT_INTEREST_DAILY_INSTALLMENT_FEE_FLAT_INTEREST_CHARGES_TRANCHE, //
     LP1_MULTIDISBURSAL_EXPECTS_TRANCHES, //
+    LP2_ADV_PYMNT_INTEREST_DECL_BAL_SARP_EMI_360_30_INT_RECALC_DAILY_MULTIDISB_PARTIAL_PERIOD, //
+    LP2_ADV_PYMNT_INTEREST_DECL_BAL_SARP_EMI_360_30_NO_INT_RECALC_MULTIDISB_PARTIAL_PERIOD, //
+    LP2_ADV_PYMNT_INTEREST_DECL_BAL_SARP_EMI_360_30_NO_INT_RECALC_MULTIDISB_NO_PARTIAL_PERIOD, //
     ;
 
     @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 d7637bcd92..3eab591de1 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
@@ -47,7 +47,10 @@ import org.apache.fineract.test.data.ChargeProductType;
 import org.apache.fineract.test.data.DaysInMonthType;
 import org.apache.fineract.test.data.DaysInYearType;
 import org.apache.fineract.test.data.InterestCalculationPeriodTime;
+import org.apache.fineract.test.data.InterestRecalculationCompoundingMethod;
+import org.apache.fineract.test.data.InterestType;
 import org.apache.fineract.test.data.OverAppliedCalculationType;
+import org.apache.fineract.test.data.PreClosureInterestCalculationRule;
 import org.apache.fineract.test.data.RecalculationRestFrequencyType;
 import org.apache.fineract.test.data.TransactionProcessingStrategyCode;
 import org.apache.fineract.test.data.loanproduct.DefaultLoanProduct;
@@ -3426,17 +3429,121 @@ public class LoanProductGlobalInitializerStep implements FineractGlobalInitializ
         TestContext.INSTANCE.set(TestContextKey.DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP1_MULTIDISBURSAL_EXPECTS_TRANCHES,
                 responseLoanProductMultidisbursalExpectTranches);
 
+        // LP2 with progressive loan schedule + horizontal +
+        // interest Declining balance, Same as repayment period
+        // interest recalculation enabled - daily
+        // EMI + 360/30
+        // multidisbursement - calculate partial period enabled
+        // (LP2_ADV_PYMNT_INTEREST_DECL_BAL_SARP_EMI_360_30_INT_RECALC_DAILY_MULTIDISB_PARTIAL_PERIOD)
+        final String name131 = DefaultLoanProduct.LP2_ADV_PYMNT_INTEREST_DECL_BAL_SARP_EMI_360_30_INT_RECALC_DAILY_MULTIDISB_PARTIAL_PERIOD
+                .getName();
+        final PostLoanProductsRequest loanProductsRequestLP2AdvPmtIntDeclSarpEmi3630IntRecalcDailyMutiDisbPartial = loanProductsRequestFactory
+                .defaultLoanProductsRequestLP2Emi()//
+                .name(name131)//
+                .daysInYearType(DaysInYearType.DAYS360.value)//
+                .daysInMonthType(DaysInMonthType.DAYS30.value)//
+                .interestType(InterestType.DECLINING_BALANCE.getValue())//
+                .isEqualAmortization(false)//
+                .interestCalculationPeriodType(InterestCalculationPeriodTime.SAME_AS_REPAYMENT_PERIOD.getValue())//
+                .isInterestRecalculationEnabled(true)//
+                .recalculationRestFrequencyType(RecalculationRestFrequencyType.DAILY.value)//
+                .preClosureInterestCalculationStrategy(PreClosureInterestCalculationRule.TILL_PRE_CLOSE_DATE.value)//
+                .rescheduleStrategyMethod(AdvancePaymentsAdjustmentType.ADJUST_LAST_UNPAID_PERIOD.value)//
+                .interestRecalculationCompoundingMethod(InterestRecalculationCompoundingMethod.NONE.value)//
+                .recalculationRestFrequencyInterval(1)//
+                .paymentAllocation(List.of(//
+                        createPaymentAllocation("DEFAULT", "NEXT_INSTALLMENT"), //
+                        createPaymentAllocation("GOODWILL_CREDIT", "LAST_INSTALLMENT"), //
+                        createPaymentAllocation("MERCHANT_ISSUED_REFUND", "REAMORTIZATION"), //
+                        createPaymentAllocation("PAYOUT_REFUND", "NEXT_INSTALLMENT")))//
+                .multiDisburseLoan(true)//
+                .allowPartialPeriodInterestCalcualtion(true)//
+                .disallowExpectedDisbursements(true)//
+                .maxTrancheCount(10)//
+                .outstandingLoanBalance(10000.0);//
+        final Response<PostLoanProductsResponse> responseLoanProductsRequestLP2AdvPmtIntDeclSarpEmi3630IntRecalcDailyMutiDisbPartial = loanProductsApi
+                .createLoanProduct(loanProductsRequestLP2AdvPmtIntDeclSarpEmi3630IntRecalcDailyMutiDisbPartial).execute();
+        TestContext.INSTANCE.set(
+                TestContextKey.DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_INTEREST_DECL_BAL_SARP_EMI_360_30_INT_RECALC_DAILY_MULTIDISB_PARTIAL_PERIOD,
+                responseLoanProductsRequestLP2AdvPmtIntDeclSarpEmi3630IntRecalcDailyMutiDisbPartial);
+
+        // LP2 with progressive loan schedule + horizontal +
+        // interest Declining balance, Same as repayment period
+        // interest recalculation disabled
+        // EMI + 360/30
+        // multidisbursement - calculate partial period enabled
+        // (LP2_ADV_PYMNT_INTEREST_DECL_BAL_SARP_EMI_360_30_NO_INT_RECALC_MULTIDISB_PARTIAL_PERIOD)
+        final String name132 = DefaultLoanProduct.LP2_ADV_PYMNT_INTEREST_DECL_BAL_SARP_EMI_360_30_NO_INT_RECALC_MULTIDISB_PARTIAL_PERIOD
+                .getName();
+        final PostLoanProductsRequest loanProductsRequestLP2AdvPmtIntDeclSarpEmi3630NoIntRecalcMutiDisbPartial = loanProductsRequestFactory
+                .defaultLoanProductsRequestLP2Emi()//
+                .name(name132)//
+                .daysInYearType(DaysInYearType.DAYS360.value)//
+                .daysInMonthType(DaysInMonthType.DAYS30.value)//
+                .interestType(InterestType.DECLINING_BALANCE.getValue())//
+                .isEqualAmortization(false)//
+                .interestCalculationPeriodType(InterestCalculationPeriodTime.SAME_AS_REPAYMENT_PERIOD.getValue())//
+                .isInterestRecalculationEnabled(false)//
+                .paymentAllocation(List.of(//
+                        createPaymentAllocation("DEFAULT", "NEXT_INSTALLMENT"), //
+                        createPaymentAllocation("GOODWILL_CREDIT", "LAST_INSTALLMENT"), //
+                        createPaymentAllocation("MERCHANT_ISSUED_REFUND", "REAMORTIZATION"), //
+                        createPaymentAllocation("PAYOUT_REFUND", "NEXT_INSTALLMENT")))//
+                .multiDisburseLoan(true)//
+                .allowPartialPeriodInterestCalcualtion(true)//
+                .disallowExpectedDisbursements(true)//
+                .maxTrancheCount(10)//
+                .outstandingLoanBalance(10000.0);//
+        final Response<PostLoanProductsResponse> responseLoanProductsRequestLP2AdvPmtIntDeclSarpEmi3630NoIntRecalcMutiDisbPartial = loanProductsApi
+                .createLoanProduct(loanProductsRequestLP2AdvPmtIntDeclSarpEmi3630NoIntRecalcMutiDisbPartial).execute();
+        TestContext.INSTANCE.set(
+                TestContextKey.DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_INTEREST_DECL_BAL_SARP_EMI_360_30_NO_INT_RECALC_MULTIDISB_PARTIAL_PERIOD,
+                responseLoanProductsRequestLP2AdvPmtIntDeclSarpEmi3630NoIntRecalcMutiDisbPartial);
+
+        // LP2 with progressive loan schedule + horizontal +
+        // interest Declining balance, Same as repayment period
+        // interest recalculation disabled
+        // EMI + 360/30
+        // multidisbursement - calculate partial period disabled
+        // (LP2_ADV_PYMNT_INTEREST_DECL_BAL_SARP_EMI_360_30_NO_INT_RECALC_MULTIDISB_NO_PARTIAL_PERIOD)
+        final String name133 = DefaultLoanProduct.LP2_ADV_PYMNT_INTEREST_DECL_BAL_SARP_EMI_360_30_NO_INT_RECALC_MULTIDISB_NO_PARTIAL_PERIOD
+                .getName();
+        final PostLoanProductsRequest loanProductsRequestLP2AdvPmtIntDeclSarpEmi3630NoIntRecalcMutiDisbNoPartial = loanProductsRequestFactory
+                .defaultLoanProductsRequestLP2Emi()//
+                .name(name133)//
+                .daysInYearType(DaysInYearType.DAYS360.value)//
+                .daysInMonthType(DaysInMonthType.DAYS30.value)//
+                .interestType(InterestType.DECLINING_BALANCE.getValue())//
+                .isEqualAmortization(false)//
+                .interestCalculationPeriodType(InterestCalculationPeriodTime.SAME_AS_REPAYMENT_PERIOD.getValue())//
+                .isInterestRecalculationEnabled(false)//
+                .paymentAllocation(List.of(//
+                        createPaymentAllocation("DEFAULT", "NEXT_INSTALLMENT"), //
+                        createPaymentAllocation("GOODWILL_CREDIT", "LAST_INSTALLMENT"), //
+                        createPaymentAllocation("MERCHANT_ISSUED_REFUND", "REAMORTIZATION"), //
+                        createPaymentAllocation("PAYOUT_REFUND", "NEXT_INSTALLMENT")))//
+                .multiDisburseLoan(true)//
+                .allowPartialPeriodInterestCalcualtion(false)//
+                .disallowExpectedDisbursements(true)//
+                .maxTrancheCount(10)//
+                .outstandingLoanBalance(10000.0);//
+        final Response<PostLoanProductsResponse> responseLoanProductsRequestLP2AdvPmtIntDeclSarpEmi3630NoIntRecalcMutiDisbNoPartial = loanProductsApi
+                .createLoanProduct(loanProductsRequestLP2AdvPmtIntDeclSarpEmi3630NoIntRecalcMutiDisbNoPartial).execute();
+        TestContext.INSTANCE.set(
+                TestContextKey.DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_INTEREST_DECL_BAL_SARP_EMI_360_30_NO_INT_RECALC_MULTIDISB_NO_PARTIAL_PERIOD,
+                responseLoanProductsRequestLP2AdvPmtIntDeclSarpEmi3630NoIntRecalcMutiDisbNoPartial);
+
         // LP2 with progressive loan schedule + horizontal + interest EMI + 360/30
         // + interest recalculation, preClosureInterestCalculationStrategy= till preclose
         // Frequency for recalculate Outstanding Principal: Daily, Frequency Interval for recalculation: 1
         // allow approved/disbursed amount over applied amount is enabled with percentage
         // multidisbursal loan that expects tranches
         // type
-        final String name131 = DefaultLoanProduct.LP2_PROGRESSIVE_ADV_PYMNT_INTEREST_RECALC_360_30_MULTIDISB_OVER_APPLIED_EXPECTED_TRANCHES
+        final String name134 = DefaultLoanProduct.LP2_PROGRESSIVE_ADV_PYMNT_INTEREST_RECALC_360_30_MULTIDISB_OVER_APPLIED_EXPECTED_TRANCHES
                 .getName();
         final PostLoanProductsRequest loanProductsRequestLP2ProgressiveAdvPymnt36030InterestRecalcMultidisbApprovedOverAppliedExpectTranches = loanProductsRequestFactory
                 .defaultLoanProductsRequestLP2EmiCapitalizedIncome()//
-                .name(name131)//
+                .name(name134)//
                 .daysInYearType(DaysInYearType.DAYS360.value)//
                 .daysInMonthType(DaysInMonthType.DAYS30.value)//
                 .isInterestRecalculationEnabled(true)//
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 e404e50432..683b503fde 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
@@ -255,5 +255,8 @@ public abstract class TestContextKey {
     public static final String DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_INTEREST_DAILY_INSTALLMENT_FEE_PERCENT_AMOUNT_INTEREST_CHARGES = "loanProductCreateResponseLP2AdvancedPaymentInterestDailyInstallmentFeeAmountPlusPercentageInterestCharges";
     public static final String DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_INTEREST_DAILY_INSTALLMENT_FEE_ALL_CHARGES = "loanProductCreateResponseLP2AdvancedPaymentInterestDailyInstallmentFeeAllCharges";
     public static final String DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_INTEREST_DAILY_INSTALLMENT_FEE_FLAT_INTEREST_CHARGES_TRANCHE = "loanProductCreateResponseLP2AdvancedPaymentInterestDailyInstallmentFeeFlatPlusPercentageInterestChargesMultidisbursal";
+    public static final String DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_INTEREST_DECL_BAL_SARP_EMI_360_30_INT_RECALC_DAILY_MULTIDISB_PARTIAL_PERIOD = "loanProductCreateResponseLP2AdvPmtIntDeclSarpEmi3630IntRecalcDailyMutiDisbPartial";
+    public static final String DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_INTEREST_DECL_BAL_SARP_EMI_360_30_NO_INT_RECALC_MULTIDISB_PARTIAL_PERIOD = "loanProductCreateResponseLP2AdvPmtIntDeclSarpEmi3630NoIntRecalcMutiDisbPartial";
+    public static final String DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_INTEREST_DECL_BAL_SARP_EMI_360_30_NO_INT_RECALC_MULTIDISB_NO_PARTIAL_PERIOD = "loanProductCreateResponseLP2AdvPmtIntDeclSarpEmi3630NoIntRecalcMutiDisbNoPartial";
     public static final String DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_PROGRESSIVE_ADV_PYMNT_INTEREST_RECALC_360_30_MULTIDISB_OVER_APPLIED_EXPECTED_TRANCHES = "loanProductCreateResponseLP2ProgressiveAdvancedPaymentInterestRecalculationMultidisbursalApprovedOverAppliedAmountExpectedTransches";
 }
diff --git a/fineract-e2e-tests-runner/src/test/resources/features/LoanRepaymentSchedule.feature b/fineract-e2e-tests-runner/src/test/resources/features/LoanRepaymentSchedule.feature
new file mode 100644
index 0000000000..2683f51ede
--- /dev/null
+++ b/fineract-e2e-tests-runner/src/test/resources/features/LoanRepaymentSchedule.feature
@@ -0,0 +1,1557 @@
+@LoanRepaymentSchedule
+Feature: Loan repayment schedule handling
+
+  @TestRailId:C3901
+  Scenario: Verify Loan repayment schedule for progressive loan, interest type: Declining balance, interest calculation petiod: same as repayment  - UC1: 2nd disbursement on due date, interest recalculation enabled, partial period interest calculation enabled
+    When Admin sets the business date to "01 January 2025"
+    And Admin creates a client with random data
+    And Admin creates a fully customized loan with the following data:
+      | LoanProduct                                                                               | submitted on date | 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_DECL_BAL_SARP_EMI_360_30_INT_RECALC_DAILY_MULTIDISB_PARTIAL_PERIOD | 01 January 2025   | 2000           | 12                     | DECLINING_BALANCE | 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 2025" with "2000" 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 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 2025  |           | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0  |            |      |             |
+      | 1  | 31   | 01 February 2025 |           | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02 | 0.0  | 0.0        | 0.0  | 340.02      |
+      | 2  | 28   | 01 March 2025    |           | 336.66          | 333.32        | 6.7      | 0.0  | 0.0       | 340.02 | 0.0  | 0.0        | 0.0  | 340.02      |
+      | 3  | 31   | 01 April 2025    |           | 0.0             | 336.66        | 3.37     | 0.0  | 0.0       | 340.03 | 0.0  | 0.0        | 0.0  | 340.03      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid | In advance | Late | Outstanding |
+      | 1000.0        | 20.07    | 0.0  | 0.0       | 1020.07 | 0.0  | 0.0        | 0.0  | 1020.07     |
+    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    |
+    #    --- 2nd Disbursement ---
+    When Admin sets the business date to "01 February 2025"
+    And Admin successfully disburse the loan on "01 February 2025" with "200" EUR transaction amount
+    And 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 2025  |           | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0  |            |      |             |
+      |    |      | 01 February 2025 |           | 200.0           |               |          | 0.0  |           | 0.0    | 0.0  |            |      |             |
+      | 1  | 31   | 01 February 2025 |           | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02 | 0.0  | 0.0        | 0.0  | 340.02      |
+      | 2  | 28   | 01 March 2025    |           | 437.15          | 432.83        | 8.7      | 0.0  | 0.0       | 441.53 | 0.0  | 0.0        | 0.0  | 441.53      |
+      | 3  | 31   | 01 April 2025    |           | 0.0             | 437.15        | 4.37     | 0.0  | 0.0       | 441.52 | 0.0  | 0.0        | 0.0  | 441.52      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid | In advance | Late | Outstanding |
+      | 1200.0        | 23.07    | 0.0  | 0.0       | 1223.07 | 0.0  | 0.0        | 0.0  | 1223.07     |
+    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    |
+      | 02 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 03 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 04 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 05 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 06 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 07 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 08 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 09 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 10 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 11 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 12 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 13 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 14 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 15 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 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    |
+      | 17 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 18 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 19 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 20 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 21 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 22 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 23 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 24 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 25 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 26 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 27 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 28 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 29 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 30 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 31 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 01 February 2025 | Disbursement     | 200.0  | 0.0       | 0.0      | 0.0  | 0.0       | 1200.0       | false    | false    |
+
+  @TestRailId:C3902
+  Scenario: Verify Loan repayment schedule for progressive loan, interest type: Declining balance, interest calculation period: same as repayment - UC2: 2nd disbursement on due date, interest recalculation disabled, partial period interest calculation enabled
+    When Admin sets the business date to "01 January 2025"
+    And Admin creates a client with random data
+    And Admin creates a fully customized loan with the following data:
+      | LoanProduct                                                                            | submitted on date | 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_DECL_BAL_SARP_EMI_360_30_NO_INT_RECALC_MULTIDISB_PARTIAL_PERIOD | 01 January 2025   | 2000           | 12                     | DECLINING_BALANCE | 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 2025" with "2000" 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 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 2025  |           | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0  |            |      |             |
+      | 1  | 31   | 01 February 2025 |           | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02 | 0.0  | 0.0        | 0.0  | 340.02      |
+      | 2  | 28   | 01 March 2025    |           | 336.66          | 333.32        | 6.7      | 0.0  | 0.0       | 340.02 | 0.0  | 0.0        | 0.0  | 340.02      |
+      | 3  | 31   | 01 April 2025    |           | 0.0             | 336.66        | 3.37     | 0.0  | 0.0       | 340.03 | 0.0  | 0.0        | 0.0  | 340.03      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid | In advance | Late | Outstanding |
+      | 1000.0        | 20.07    | 0.0  | 0.0       | 1020.07 | 0.0  | 0.0        | 0.0  | 1020.07     |
+    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    |
+    #    --- 2nd Disbursement ---
+    When Admin sets the business date to "01 February 2025"
+    And Admin successfully disburse the loan on "01 February 2025" with "200" EUR transaction amount
+    And 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 2025  |           | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0  |            |      |             |
+      |    |      | 01 February 2025 |           | 200.0           |               |          | 0.0  |           | 0.0    | 0.0  |            |      |             |
+      | 1  | 31   | 01 February 2025 |           | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02 | 0.0  | 0.0        | 0.0  | 340.02      |
+      | 2  | 28   | 01 March 2025    |           | 437.15          | 432.83        | 8.7      | 0.0  | 0.0       | 441.53 | 0.0  | 0.0        | 0.0  | 441.53      |
+      | 3  | 31   | 01 April 2025    |           | 0.0             | 437.15        | 4.37     | 0.0  | 0.0       | 441.52 | 0.0  | 0.0        | 0.0  | 441.52      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid | In advance | Late | Outstanding |
+      | 1200.0        | 23.07    | 0.0  | 0.0       | 1223.07 | 0.0  | 0.0        | 0.0  | 1223.07     |
+    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    |
+      | 02 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 03 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 04 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 05 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 06 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 07 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 08 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 09 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 10 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 11 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 12 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 13 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 14 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 15 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 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    |
+      | 17 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 18 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 19 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 20 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 21 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 22 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 23 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 24 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 25 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 26 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 27 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 28 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 29 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 30 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 31 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 01 February 2025 | Disbursement     | 200.0  | 0.0       | 0.0      | 0.0  | 0.0       | 1200.0       | false    | false    |
+
+  @TestRailId:C3903
+  Scenario: Verify Loan repayment schedule for progressive loan, interest type: Declining balance, interest calculation period: same as repayment - UC3: 2nd disbursement on due date, interest recalculation disabled, partial period interest calculation disabled
+    When Admin sets the business date to "01 January 2025"
+    And Admin creates a client with random data
+    And Admin creates a fully customized loan with the following data:
+      | LoanProduct                                                                               | submitted on date | 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_DECL_BAL_SARP_EMI_360_30_NO_INT_RECALC_MULTIDISB_NO_PARTIAL_PERIOD | 01 January 2025   | 2000           | 12                     | DECLINING_BALANCE | 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 2025" with "2000" 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 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 2025  |           | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0  |            |      |             |
+      | 1  | 31   | 01 February 2025 |           | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02 | 0.0  | 0.0        | 0.0  | 340.02      |
+      | 2  | 28   | 01 March 2025    |           | 336.66          | 333.32        | 6.7      | 0.0  | 0.0       | 340.02 | 0.0  | 0.0        | 0.0  | 340.02      |
+      | 3  | 31   | 01 April 2025    |           | 0.0             | 336.66        | 3.37     | 0.0  | 0.0       | 340.03 | 0.0  | 0.0        | 0.0  | 340.03      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid | In advance | Late | Outstanding |
+      | 1000.0        | 20.07    | 0.0  | 0.0       | 1020.07 | 0.0  | 0.0        | 0.0  | 1020.07     |
+    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    |
+    #    --- 2nd Disbursement ---
+    When Admin sets the business date to "01 February 2025"
+    And Admin successfully disburse the loan on "01 February 2025" with "200" EUR transaction amount
+    And 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 2025  |           | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0  |            |      |             |
+      |    |      | 01 February 2025 |           | 200.0           |               |          | 0.0  |           | 0.0    | 0.0  |            |      |             |
+      | 1  | 31   | 01 February 2025 |           | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02 | 0.0  | 0.0        | 0.0  | 340.02      |
+      | 2  | 28   | 01 March 2025    |           | 437.15          | 432.83        | 8.7      | 0.0  | 0.0       | 441.53 | 0.0  | 0.0        | 0.0  | 441.53      |
+      | 3  | 31   | 01 April 2025    |           | 0.0             | 437.15        | 4.37     | 0.0  | 0.0       | 441.52 | 0.0  | 0.0        | 0.0  | 441.52      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid | In advance | Late | Outstanding |
+      | 1200.0        | 23.07    | 0.0  | 0.0       | 1223.07 | 0.0  | 0.0        | 0.0  | 1223.07     |
+    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    |
+      | 02 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 03 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 04 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 05 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 06 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 07 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 08 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 09 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 10 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 11 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 12 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 13 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 14 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 15 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 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    |
+      | 17 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 18 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 19 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 20 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 21 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 22 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 23 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 24 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 25 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 26 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 27 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 28 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 29 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 30 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 31 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 01 February 2025 | Disbursement     | 200.0  | 0.0       | 0.0      | 0.0  | 0.0       | 1200.0       | false    | false    |
+
+  @TestRailId:C3904
+  Scenario: Verify Loan repayment schedule for progressive loan, interest type: Declining balance, interest calculation petiod: same as repayment  - UC4: 2nd disbursement NOT on due date, interest recalculation enabled, partial period interest calculation enabled
+    When Admin sets the business date to "01 January 2025"
+    And Admin creates a client with random data
+    And Admin creates a fully customized loan with the following data:
+      | LoanProduct                                                                               | submitted on date | 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_DECL_BAL_SARP_EMI_360_30_INT_RECALC_DAILY_MULTIDISB_PARTIAL_PERIOD | 01 January 2025   | 2000           | 12                     | DECLINING_BALANCE | 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 2025" with "2000" 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 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 2025  |           | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0  |            |      |             |
+      | 1  | 31   | 01 February 2025 |           | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02 | 0.0  | 0.0        | 0.0  | 340.02      |
+      | 2  | 28   | 01 March 2025    |           | 336.66          | 333.32        | 6.7      | 0.0  | 0.0       | 340.02 | 0.0  | 0.0        | 0.0  | 340.02      |
+      | 3  | 31   | 01 April 2025    |           | 0.0             | 336.66        | 3.37     | 0.0  | 0.0       | 340.03 | 0.0  | 0.0        | 0.0  | 340.03      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid | In advance | Late | Outstanding |
+      | 1000.0        | 20.07    | 0.0  | 0.0       | 1020.07 | 0.0  | 0.0        | 0.0  | 1020.07     |
+    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    |
+    #    --- 2nd Disbursement ---
+    When Admin sets the business date to "15 January 2025"
+    And Admin successfully disburse the loan on "15 January 2025" with "200" EUR transaction amount
+    And 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 2025  |           | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0  |            |      |             |
+      |    |      | 15 January 2025  |           | 200.0           |               |          | 0.0  |           | 0.0    | 0.0  |            |      |             |
+      | 1  | 31   | 01 February 2025 |           | 803.38          | 396.62        | 11.1     | 0.0  | 0.0       | 407.72 | 0.0  | 0.0        | 0.0  | 407.72      |
+      | 2  | 28   | 01 March 2025    |           | 403.69          | 399.69        | 8.03     | 0.0  | 0.0       | 407.72 | 0.0  | 0.0        | 0.0  | 407.72      |
+      | 3  | 31   | 01 April 2025    |           | 0.0             | 403.69        | 4.04     | 0.0  | 0.0       | 407.73 | 0.0  | 0.0        | 0.0  | 407.73      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid | In advance | Late | Outstanding |
+      | 1200.0        | 23.17    | 0.0  | 0.0       | 1223.17 | 0.0  | 0.0        | 0.0  | 1223.17     |
+    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    |
+      | 02 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 03 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 04 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 05 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 06 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 07 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 08 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 09 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 10 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 11 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 12 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 13 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 14 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 15 January 2025  | Disbursement     | 200.0  | 0.0       | 0.0      | 0.0  | 0.0       | 1200.0       | false    | false    |
+
+  @TestRailId:C3905
+  Scenario: Verify Loan repayment schedule for progressive loan, interest type: Declining balance, interest calculation period: same as repayment - UC5: 2nd disbursement NOT on due date, interest recalculation disabled, partial period interest calculation enabled
+    When Admin sets the business date to "01 January 2025"
+    And Admin creates a client with random data
+    And Admin creates a fully customized loan with the following data:
+      | LoanProduct                                                                            | submitted on date | 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_DECL_BAL_SARP_EMI_360_30_NO_INT_RECALC_MULTIDISB_PARTIAL_PERIOD | 01 January 2025   | 2000           | 12                     | DECLINING_BALANCE | 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 2025" with "2000" 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 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 2025  |           | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0  |            |      |             |
+      | 1  | 31   | 01 February 2025 |           | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02 | 0.0  | 0.0        | 0.0  | 340.02      |
+      | 2  | 28   | 01 March 2025    |           | 336.66          | 333.32        | 6.7      | 0.0  | 0.0       | 340.02 | 0.0  | 0.0        | 0.0  | 340.02      |
+      | 3  | 31   | 01 April 2025    |           | 0.0             | 336.66        | 3.37     | 0.0  | 0.0       | 340.03 | 0.0  | 0.0        | 0.0  | 340.03      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid | In advance | Late | Outstanding |
+      | 1000.0        | 20.07    | 0.0  | 0.0       | 1020.07 | 0.0  | 0.0        | 0.0  | 1020.07     |
+    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    |
+    #    --- 2nd Disbursement ---
+    When Admin sets the business date to "15 January 2025"
+    And Admin successfully disburse the loan on "15 January 2025" with "200" EUR transaction amount
+    And 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 2025  |           | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0  |            |      |             |
+      |    |      | 15 January 2025  |           | 200.0           |               |          | 0.0  |           | 0.0    | 0.0  |            |      |             |
+      | 1  | 31   | 01 February 2025 |           | 803.38          | 396.62        | 11.1     | 0.0  | 0.0       | 407.72 | 0.0  | 0.0        | 0.0  | 407.72      |
+      | 2  | 28   | 01 March 2025    |           | 403.69          | 399.69        | 8.03     | 0.0  | 0.0       | 407.72 | 0.0  | 0.0        | 0.0  | 407.72      |
+      | 3  | 31   | 01 April 2025    |           | 0.0             | 403.69        | 4.04     | 0.0  | 0.0       | 407.73 | 0.0  | 0.0        | 0.0  | 407.73      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid | In advance | Late | Outstanding |
+      | 1200.0        | 23.17    | 0.0  | 0.0       | 1223.17 | 0.0  | 0.0        | 0.0  | 1223.17     |
+    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    |
+      | 02 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 03 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 04 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 05 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 06 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 07 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 08 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 09 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 10 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 11 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 12 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 13 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 14 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 15 January 2025  | Disbursement     | 200.0  | 0.0       | 0.0      | 0.0  | 0.0       | 1200.0       | false    | false    |
+
+  @TestRailId:C3906
+  Scenario: Verify Loan repayment schedule for progressive loan, interest type: Declining balance, interest calculation period: same as repayment - UC6: 2nd disbursement NOT on due date, interest recalculation disabled, partial period interest calculation disabled
+    When Admin sets the business date to "01 January 2025"
+    And Admin creates a client with random data
+    And Admin creates a fully customized loan with the following data:
+      | LoanProduct                                                                               | submitted on date | 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_DECL_BAL_SARP_EMI_360_30_NO_INT_RECALC_MULTIDISB_NO_PARTIAL_PERIOD | 01 January 2025   | 2000           | 12                     | DECLINING_BALANCE | 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 2025" with "2000" 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 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 2025  |           | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0  |            |      |             |
+      | 1  | 31   | 01 February 2025 |           | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02 | 0.0  | 0.0        | 0.0  | 340.02      |
+      | 2  | 28   | 01 March 2025    |           | 336.66          | 333.32        | 6.7      | 0.0  | 0.0       | 340.02 | 0.0  | 0.0        | 0.0  | 340.02      |
+      | 3  | 31   | 01 April 2025    |           | 0.0             | 336.66        | 3.37     | 0.0  | 0.0       | 340.03 | 0.0  | 0.0        | 0.0  | 340.03      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid | In advance | Late | Outstanding |
+      | 1000.0        | 20.07    | 0.0  | 0.0       | 1020.07 | 0.0  | 0.0        | 0.0  | 1020.07     |
+    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    |
+    #    --- 2nd Disbursement ---
+    When Admin sets the business date to "15 January 2025"
+    And Admin successfully disburse the loan on "15 January 2025" with "200" EUR transaction amount
+    And 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 2025  |           | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0  |            |      |             |
+      |    |      | 15 January 2025  |           | 200.0           |               |          | 0.0  |           | 0.0    | 0.0  |            |      |             |
+      | 1  | 31   | 01 February 2025 |           | 803.97          | 396.03        | 12.0     | 0.0  | 0.0       | 408.03 | 0.0  | 0.0        | 0.0  | 408.03      |
+      | 2  | 28   | 01 March 2025    |           | 403.98          | 399.99        | 8.04     | 0.0  | 0.0       | 408.03 | 0.0  | 0.0        | 0.0  | 408.03      |
+      | 3  | 31   | 01 April 2025    |           | 0.0             | 403.98        | 4.04     | 0.0  | 0.0       | 408.02 | 0.0  | 0.0        | 0.0  | 408.02      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid | In advance | Late | Outstanding |
+      | 1200          | 24.08    | 0.0  | 0.0       | 1224.08 | 0.0  | 0.0        | 0.0  | 1224.08     |
+    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    |
+      | 02 January 2025  | Accrual          | 0.39   | 0.0       | 0.39     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 03 January 2025  | Accrual          | 0.38   | 0.0       | 0.38     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 04 January 2025  | Accrual          | 0.39   | 0.0       | 0.39     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 05 January 2025  | Accrual          | 0.39   | 0.0       | 0.39     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 06 January 2025  | Accrual          | 0.39   | 0.0       | 0.39     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 07 January 2025  | Accrual          | 0.38   | 0.0       | 0.38     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 08 January 2025  | Accrual          | 0.39   | 0.0       | 0.39     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 09 January 2025  | Accrual          | 0.39   | 0.0       | 0.39     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 10 January 2025  | Accrual          | 0.38   | 0.0       | 0.38     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 11 January 2025  | Accrual          | 0.39   | 0.0       | 0.39     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 12 January 2025  | Accrual          | 0.39   | 0.0       | 0.39     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 13 January 2025  | Accrual          | 0.39   | 0.0       | 0.39     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 14 January 2025  | Accrual          | 0.38   | 0.0       | 0.38     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 15 January 2025  | Disbursement     | 200.0  | 0.0       | 0.0      | 0.0  | 0.0       | 1200.0       | false    | false    |
+
+  @TestRailId:C3907
+  Scenario: Verify Loan repayment schedule for progressive loan, interest type: Declining balance, interest calculation period: same as repayment - UC7: 2nd disbursement is in the middle of 2nd period + backdated repayment, interest recalculation enabled, partial period interest calculation enabled
+    When Admin sets the business date to "01 January 2025"
+    And Admin creates a client with random data
+    And Admin creates a fully customized loan with the following data:
+      | LoanProduct                                                                               | submitted on date | 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_DECL_BAL_SARP_EMI_360_30_INT_RECALC_DAILY_MULTIDISB_PARTIAL_PERIOD | 01 January 2025   | 2000           | 12                     | DECLINING_BALANCE | 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 2025" with "2000" 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 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 2025  |           | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0  |            |      |             |
+      | 1  | 31   | 01 February 2025 |           | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02 | 0.0  | 0.0        | 0.0  | 340.02      |
+      | 2  | 28   | 01 March 2025    |           | 336.66          | 333.32        | 6.7      | 0.0  | 0.0       | 340.02 | 0.0  | 0.0        | 0.0  | 340.02      |
+      | 3  | 31   | 01 April 2025    |           | 0.0             | 336.66        | 3.37     | 0.0  | 0.0       | 340.03 | 0.0  | 0.0        | 0.0  | 340.03      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid | In advance | Late | Outstanding |
+      | 1000.0        | 20.07    | 0.0  | 0.0       | 1020.07 | 0.0  | 0.0        | 0.0  | 1020.07     |
+    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 Admin sets the business date to "01 February 2025"
+    And Admin runs inline COB job for Loan
+#    --- 2nd Disbursement ---
+    When Admin sets the business date to "15 February 2025"
+    And Admin successfully disburse the loan on "15 February 2025" with "200" EUR transaction amount
+    And 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 2025  |           | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0  |            |      |             |
+      | 1  | 31   | 01 February 2025 |           | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02 | 0.0  | 0.0        | 0.0  | 340.02      |
+      |    |      | 15 February 2025 |           | 200.0           |               |          | 0.0  |           | 0.0    | 0.0  |            |      |             |
+      | 2  | 28   | 01 March 2025    |           | 438.31          | 431.67        | 9.35     | 0.0  | 0.0       | 441.02 | 0.0  | 0.0        | 0.0  | 441.02      |
+      | 3  | 31   | 01 April 2025    |           | 0.0             | 438.31        | 4.38     | 0.0  | 0.0       | 442.69 | 0.0  | 0.0        | 0.0  | 442.69      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid | In advance | Late | Outstanding |
+      | 1200.0        | 23.73    | 0.0  | 0.0       | 1223.73 | 0.0  | 0.0        | 0.0  | 1223.73     |
+    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    |
+      | 02 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 03 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 04 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 05 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 06 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 07 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 08 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 09 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 10 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 11 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 12 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 13 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 14 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 15 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 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    |
+      | 17 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 18 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 19 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 20 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 21 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 22 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 23 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 24 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 25 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 26 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 27 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 28 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 29 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 30 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 31 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 01 February 2025 | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 02 February 2025 | Accrual          | 0.36   | 0.0       | 0.36     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 03 February 2025 | Accrual          | 0.35   | 0.0       | 0.35     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 04 February 2025 | Accrual          | 0.36   | 0.0       | 0.36     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 05 February 2025 | Accrual          | 0.36   | 0.0       | 0.36     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 06 February 2025 | Accrual          | 0.36   | 0.0       | 0.36     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 07 February 2025 | Accrual          | 0.35   | 0.0       | 0.35     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 08 February 2025 | Accrual          | 0.36   | 0.0       | 0.36     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 09 February 2025 | Accrual          | 0.36   | 0.0       | 0.36     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 10 February 2025 | Accrual          | 0.35   | 0.0       | 0.35     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 11 February 2025 | Accrual          | 0.36   | 0.0       | 0.36     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 12 February 2025 | Accrual          | 0.36   | 0.0       | 0.36     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 13 February 2025 | Accrual          | 0.36   | 0.0       | 0.36     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 14 February 2025 | Accrual          | 0.35   | 0.0       | 0.35     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 15 February 2025 | Disbursement     | 200.0  | 0.0       | 0.0      | 0.0  | 0.0       | 1200.0       | false    | false    |
+#    --- Backdated repayment ---
+    When Customer makes "AUTOPAY" repayment on "01 February 2025" with 340.02 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 2025  |                  | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0    |            |      |             |
+      | 1  | 31   | 01 February 2025 | 01 February 2025 | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02 | 340.02 | 0.0        | 0.0  | 0.0         |
+      |    |      | 15 February 2025 |                  | 200.0           |               |          | 0.0  |           | 0.0    | 0.0    |            |      |             |
+      | 2  | 28   | 01 March 2025    |                  | 436.66          | 433.32        | 7.7      | 0.0  | 0.0       | 441.02 | 0.0    | 0.0        | 0.0  | 441.02      |
+      | 3  | 31   | 01 April 2025    |                  | 0.0             | 436.66        | 4.37     | 0.0  | 0.0       | 441.03 | 0.0    | 0.0        | 0.0  | 441.03      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid   | In advance | Late | Outstanding |
+      | 1200.0        | 22.07    | 0.0  | 0.0       | 1222.07 | 340.02 | 0.0        | 0.0  | 882.05      |
+    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    |
+      | 02 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 03 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 04 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 05 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 06 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 07 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 08 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 09 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 10 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 11 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 12 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 13 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 14 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 15 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 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    |
+      | 17 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 18 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 19 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 20 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 21 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 22 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 23 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 24 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 25 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 26 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 27 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 28 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 29 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 30 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 31 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 01 February 2025 | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 01 February 2025 | Repayment        | 340.02 | 330.02    | 10.0     | 0.0  | 0.0       | 669.98       | false    | false    |
+      | 02 February 2025 | Accrual          | 0.36   | 0.0       | 0.36     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 03 February 2025 | Accrual          | 0.35   | 0.0       | 0.35     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 04 February 2025 | Accrual          | 0.36   | 0.0       | 0.36     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 05 February 2025 | Accrual          | 0.36   | 0.0       | 0.36     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 06 February 2025 | Accrual          | 0.36   | 0.0       | 0.36     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 07 February 2025 | Accrual          | 0.35   | 0.0       | 0.35     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 08 February 2025 | Accrual          | 0.36   | 0.0       | 0.36     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 09 February 2025 | Accrual          | 0.36   | 0.0       | 0.36     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 10 February 2025 | Accrual          | 0.35   | 0.0       | 0.35     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 11 February 2025 | Accrual          | 0.36   | 0.0       | 0.36     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 12 February 2025 | Accrual          | 0.36   | 0.0       | 0.36     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 13 February 2025 | Accrual          | 0.36   | 0.0       | 0.36     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 14 February 2025 | Accrual          | 0.35   | 0.0       | 0.35     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 15 February 2025 | Disbursement     | 200.0  | 0.0       | 0.0      | 0.0  | 0.0       | 869.98       | false    | false    |
+
+  @TestRailId:C3908
+  Scenario: Verify Loan repayment schedule for progressive loan, interest type: Declining balance, interest calculation period: same as repayment - UC8: 2nd disbursement is in the middle of 2nd period + backdated repayment, interest recalculation disabled, partial period interest calculation enabled
+    When Admin sets the business date to "01 January 2025"
+    And Admin creates a client with random data
+    And Admin creates a fully customized loan with the following data:
+      | LoanProduct                                                                            | submitted on date | 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_DECL_BAL_SARP_EMI_360_30_NO_INT_RECALC_MULTIDISB_PARTIAL_PERIOD | 01 January 2025   | 2000           | 12                     | DECLINING_BALANCE | 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 2025" with "2000" 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 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 2025  |           | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0  |            |      |             |
+      | 1  | 31   | 01 February 2025 |           | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02 | 0.0  | 0.0        | 0.0  | 340.02      |
+      | 2  | 28   | 01 March 2025    |           | 336.66          | 333.32        | 6.7      | 0.0  | 0.0       | 340.02 | 0.0  | 0.0        | 0.0  | 340.02      |
+      | 3  | 31   | 01 April 2025    |           | 0.0             | 336.66        | 3.37     | 0.0  | 0.0       | 340.03 | 0.0  | 0.0        | 0.0  | 340.03      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid | In advance | Late | Outstanding |
+      | 1000.0        | 20.07    | 0.0  | 0.0       | 1020.07 | 0.0  | 0.0        | 0.0  | 1020.07     |
+    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 Admin sets the business date to "01 February 2025"
+    And Admin runs inline COB job for Loan
+    #    --- 2nd Disbursement ---
+    When Admin sets the business date to "15 February 2025"
+    And Admin successfully disburse the loan on "15 February 2025" with "200" EUR transaction amount
+    And 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 2025  |           | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0  |            |      |             |
+      | 1  | 31   | 01 February 2025 |           | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02 | 0.0  | 0.0        | 0.0  | 340.02      |
+      |    |      | 15 February 2025 |           | 200.0           |               |          | 0.0  |           | 0.0    | 0.0  |            |      |             |
+      | 2  | 28   | 01 March 2025    |           | 436.66          | 433.32        | 7.7      | 0.0  | 0.0       | 441.02 | 0.0  | 0.0        | 0.0  | 441.02      |
+      | 3  | 31   | 01 April 2025    |           | 0.0             | 436.66        | 4.37     | 0.0  | 0.0       | 441.03 | 0.0  | 0.0        | 0.0  | 441.03      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid | In advance | Late | Outstanding |
+      | 1200.0        | 22.07    | 0.0  | 0.0       | 1222.07 | 0.0  | 0.0        | 0.0  | 1222.07     |
+    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    |
+      | 02 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 03 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 04 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 05 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 06 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 07 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 08 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 09 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 10 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 11 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 12 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 13 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 14 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 15 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 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    |
+      | 17 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 18 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 19 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 20 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 21 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 22 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 23 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 24 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 25 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 26 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 27 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 28 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 29 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 30 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 31 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 01 February 2025 | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 02 February 2025 | Accrual          | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 03 February 2025 | Accrual          | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 04 February 2025 | Accrual          | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 05 February 2025 | Accrual          | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 06 February 2025 | Accrual          | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 07 February 2025 | Accrual          | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 08 February 2025 | Accrual          | 0.23   | 0.0       | 0.23     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 09 February 2025 | Accrual          | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 10 February 2025 | Accrual          | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 11 February 2025 | Accrual          | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 12 February 2025 | Accrual          | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 13 February 2025 | Accrual          | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 14 February 2025 | Accrual          | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 15 February 2025 | Disbursement     | 200.0  | 0.0       | 0.0      | 0.0  | 0.0       | 1200.0       | false    | false    |
+#    --- Backdated repayment ---
+    When Customer makes "AUTOPAY" repayment on "01 February 2025" with 340.02 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 2025  |                  | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0    |            |      |             |
+      | 1  | 31   | 01 February 2025 | 01 February 2025 | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02 | 340.02 | 0.0        | 0.0  | 0.0         |
+      |    |      | 15 February 2025 |                  | 200.0           |               |          | 0.0  |           | 0.0    | 0.0    |            |      |             |
+      | 2  | 28   | 01 March 2025    |                  | 436.66          | 433.32        | 7.7      | 0.0  | 0.0       | 441.02 | 0.0    | 0.0        | 0.0  | 441.02      |
+      | 3  | 31   | 01 April 2025    |                  | 0.0             | 436.66        | 4.37     | 0.0  | 0.0       | 441.03 | 0.0    | 0.0        | 0.0  | 441.03      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid   | In advance | Late | Outstanding |
+      | 1200.0        | 22.07    | 0.0  | 0.0       | 1222.07 | 340.02 | 0.0        | 0.0  | 882.05      |
+    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    |
+      | 02 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 03 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 04 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 05 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 06 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 07 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 08 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 09 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 10 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 11 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 12 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 13 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 14 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 15 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 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    |
+      | 17 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 18 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 19 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 20 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 21 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 22 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 23 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 24 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 25 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 26 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 27 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 28 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 29 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 30 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 31 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 01 February 2025 | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 01 February 2025 | Repayment        | 340.02 | 330.02    | 10.0     | 0.0  | 0.0       | 669.98       | false    | false    |
+      | 02 February 2025 | Accrual          | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 03 February 2025 | Accrual          | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 04 February 2025 | Accrual          | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 05 February 2025 | Accrual          | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 06 February 2025 | Accrual          | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 07 February 2025 | Accrual          | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 08 February 2025 | Accrual          | 0.23   | 0.0       | 0.23     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 09 February 2025 | Accrual          | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 10 February 2025 | Accrual          | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 11 February 2025 | Accrual          | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 12 February 2025 | Accrual          | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 13 February 2025 | Accrual          | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 14 February 2025 | Accrual          | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 15 February 2025 | Disbursement     | 200.0  | 0.0       | 0.0      | 0.0  | 0.0       | 869.98       | false    | false    |
+
+  @TestRailId:C3909
+  Scenario: Verify Loan repayment schedule for progressive loan, interest type: Declining balance, interest calculation period: same as repayment - UC9: 2nd disbursement is in the middle of 2nd period + backdated repayment, interest recalculation disabled, partial period interest calculation disabled
+    When Admin sets the business date to "01 January 2025"
+    And Admin creates a client with random data
+    And Admin creates a fully customized loan with the following data:
+      | LoanProduct                                                                               | submitted on date | 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_DECL_BAL_SARP_EMI_360_30_NO_INT_RECALC_MULTIDISB_NO_PARTIAL_PERIOD | 01 January 2025   | 2000           | 12                     | DECLINING_BALANCE | 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 2025" with "2000" 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 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 2025  |           | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0  |            |      |             |
+      | 1  | 31   | 01 February 2025 |           | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02 | 0.0  | 0.0        | 0.0  | 340.02      |
+      | 2  | 28   | 01 March 2025    |           | 336.66          | 333.32        | 6.7      | 0.0  | 0.0       | 340.02 | 0.0  | 0.0        | 0.0  | 340.02      |
+      | 3  | 31   | 01 April 2025    |           | 0.0             | 336.66        | 3.37     | 0.0  | 0.0       | 340.03 | 0.0  | 0.0        | 0.0  | 340.03      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid | In advance | Late | Outstanding |
+      | 1000.0        | 20.07    | 0.0  | 0.0       | 1020.07 | 0.0  | 0.0        | 0.0  | 1020.07     |
+    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 Admin sets the business date to "01 February 2025"
+    And Admin runs inline COB job for Loan
+#    --- 2nd Disbursement ---
+    When Admin sets the business date to "15 February 2025"
+    And Admin successfully disburse the loan on "15 February 2025" with "200" EUR transaction amount
+    And 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 2025  |           | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0  |            |      |             |
+      | 1  | 31   | 01 February 2025 |           | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02 | 0.0  | 0.0        | 0.0  | 340.02      |
+      |    |      | 15 February 2025 |           | 200.0           |               |          | 0.0  |           | 0.0    | 0.0  |            |      |             |
+      | 2  | 28   | 01 March 2025    |           | 437.15          | 432.83        | 8.7      | 0.0  | 0.0       | 441.53 | 0.0  | 0.0        | 0.0  | 441.53      |
+      | 3  | 31   | 01 April 2025    |           | 0.0             | 437.15        | 4.37     | 0.0  | 0.0       | 441.52 | 0.0  | 0.0        | 0.0  | 441.52      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid | In advance | Late | Outstanding |
+      | 1200.0        | 23.07    | 0.0  | 0.0       | 1223.07 | 0.0  | 0.0        | 0.0  | 1223.07     |
+    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    |
+      | 02 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 03 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 04 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 05 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 06 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 07 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 08 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 09 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 10 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 11 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 12 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 13 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 14 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 15 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 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    |
+      | 17 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 18 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 19 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 20 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 21 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 22 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 23 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 24 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 25 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 26 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 27 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 28 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 29 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 30 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 31 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 01 February 2025 | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 02 February 2025 | Accrual          | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 03 February 2025 | Accrual          | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 04 February 2025 | Accrual          | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 05 February 2025 | Accrual          | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 06 February 2025 | Accrual          | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 07 February 2025 | Accrual          | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 08 February 2025 | Accrual          | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 09 February 2025 | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 10 February 2025 | Accrual          | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 11 February 2025 | Accrual          | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 12 February 2025 | Accrual          | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 13 February 2025 | Accrual          | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 14 February 2025 | Accrual          | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 15 February 2025 | Disbursement     | 200.0  | 0.0       | 0.0      | 0.0  | 0.0       | 1200.0       | false    | false    |
+#    --- Backdated repayment ---
+    When Customer makes "AUTOPAY" repayment on "01 February 2025" with 340.02 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 2025  |                  | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0    |            |      |             |
+      | 1  | 31   | 01 February 2025 | 01 February 2025 | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02 | 340.02 | 0.0        | 0.0  | 0.0         |
+      |    |      | 15 February 2025 |                  | 200.0           |               |          | 0.0  |           | 0.0    | 0.0    |            |      |             |
+      | 2  | 28   | 01 March 2025    |                  | 437.15          | 432.83        | 8.7      | 0.0  | 0.0       | 441.53 | 0.0    | 0.0        | 0.0  | 441.53      |
+      | 3  | 31   | 01 April 2025    |                  | 0.0             | 437.15        | 4.37     | 0.0  | 0.0       | 441.52 | 0.0    | 0.0        | 0.0  | 441.52      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid   | In advance | Late | Outstanding |
+      | 1200.0        | 23.07    | 0.0  | 0.0       | 1223.07 | 340.02 | 0.0        | 0.0  | 883.05      |
+    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    |
+      | 02 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 03 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 04 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 05 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 06 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 07 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 08 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 09 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 10 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 11 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 12 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 13 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 14 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 15 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 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    |
+      | 17 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 18 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 19 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 20 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 21 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 22 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 23 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 24 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 25 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 26 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 27 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 28 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 29 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 30 January 2025  | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 31 January 2025  | Accrual          | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 01 February 2025 | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 01 February 2025 | Repayment        | 340.02 | 330.02    | 10.0     | 0.0  | 0.0       | 669.98       | false    | false    |
+      | 02 February 2025 | Accrual          | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 03 February 2025 | Accrual          | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 04 February 2025 | Accrual          | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 05 February 2025 | Accrual          | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 06 February 2025 | Accrual          | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 07 February 2025 | Accrual          | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 08 February 2025 | Accrual          | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 09 February 2025 | Accrual          | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 10 February 2025 | Accrual          | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 11 February 2025 | Accrual          | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 12 February 2025 | Accrual          | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 13 February 2025 | Accrual          | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 14 February 2025 | Accrual          | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 15 February 2025 | Disbursement     | 200.0  | 0.0       | 0.0      | 0.0  | 0.0       | 869.98       | false    | false    |
+
+  @TestRailId:C3910
+  Scenario: Verify Loan repayment schedule for progressive loan, interest type: Declining balance, interest calculation period: same as repayment - UC10: complex transactions, interest recalculation enabled, partial period interest calculation enabled
+    When Admin sets the business date to "01 January 2025"
+    And Admin creates a client with random data
+    And Admin creates a fully customized loan with the following data:
+      | LoanProduct                                                                               | submitted on date | 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_DECL_BAL_SARP_EMI_360_30_INT_RECALC_DAILY_MULTIDISB_PARTIAL_PERIOD | 01 January 2025   | 2000           | 12                     | DECLINING_BALANCE | 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 2025" with "2000" 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
+    When Admin sets the business date to "01 February 2025"
+    And Admin runs inline COB job for Loan
+#    --- 2nd Disbursement ---
+    When Admin sets the business date to "15 February 2025"
+    And Admin runs inline COB job for Loan
+    And Admin successfully disburse the loan on "15 February 2025" with "200" EUR transaction amount
+#    --- Backdated repayment (early repayment) ---
+    When Customer makes "AUTOPAY" repayment on "15 January 2025" with 340.02 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 2025  |                 | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0    |            |      |             |
+      | 1  | 31   | 01 February 2025 | 15 January 2025 | 664.5           | 335.5         | 4.52     | 0.0  | 0.0       | 340.02 | 340.02 | 340.02     | 0.0  | 0.0         |
+      |    |      | 15 February 2025 |                 | 200.0           |               |          | 0.0  |           | 0.0    | 0.0    |            |      |             |
+      | 2  | 28   | 01 March 2025    |                 | 434.76          | 429.74        | 11.28    | 0.0  | 0.0       | 441.02 | 0.0    | 0.0        | 0.0  | 441.02      |
+      | 3  | 31   | 01 April 2025    |                 | 0.0             | 434.76        | 4.35     | 0.0  | 0.0       | 439.11 | 0.0    | 0.0        | 0.0  | 439.11      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid   | In advance | Late | Outstanding |
+      | 1200.0        | 20.15    | 0.0  | 0.0       | 1220.15 | 340.02 | 340.02     | 0.0  | 880.13      |
+#    --- Make full 2nd period repayment (late repayment) ---
+    When Admin sets the business date to "15 March 2025"
+    And Admin runs inline COB job for Loan
+    And Customer makes "AUTOPAY" repayment on "15 March 2025" with 441.02 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 2025  |                 | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 1  | 31   | 01 February 2025 | 15 January 2025 | 664.5           | 335.5         | 4.52     | 0.0  | 0.0       | 340.02 | 340.02 | 340.02     | 0.0    | 0.0         |
+      |    |      | 15 February 2025 |                 | 200.0           |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 2  | 28   | 01 March 2025    | 15 March 2025   | 434.76          | 429.74        | 11.28    | 0.0  | 0.0       | 441.02 | 441.02 | 0.0        | 441.02 | 0.0         |
+      | 3  | 31   | 01 April 2025    |                 | 0.0             | 434.76        | 6.29     | 0.0  | 0.0       | 441.05 | 0.0    | 0.0        | 0.0    | 441.05      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid   | In advance | Late   | Outstanding |
+      | 1200.0        | 22.09    | 0.0  | 0.0       | 1222.09 | 781.04 | 340.02     | 441.02 | 441.05      |
+  #    --- Make merchant issued refund ---
+    When Admin sets the business date to "16 March 2025"
+    And Admin runs inline COB job for Loan
+    And Customer makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "16 March 2025" with 250 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 2025  |                 | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 1  | 31   | 01 February 2025 | 15 January 2025 | 664.5           | 335.5         | 4.52     | 0.0  | 0.0       | 340.02 | 340.02 | 340.02     | 0.0    | 0.0         |
+      |    |      | 15 February 2025 |                 | 200.0           |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 2  | 28   | 01 March 2025    | 15 March 2025   | 434.76          | 429.74        | 11.28    | 0.0  | 0.0       | 441.02 | 441.02 | 0.0        | 441.02 | 0.0         |
+      | 3  | 31   | 01 April 2025    |                 | 0.0             | 434.76        | 5.0      | 0.0  | 0.0       | 439.76 | 250.0  | 250.0      | 0.0    | 189.76      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due    | Paid    | In advance | Late   | Outstanding |
+      | 1200.0        | 20.8     | 0.0  | 0.0       | 1220.8 | 1031.04 | 590.02     | 441.02 | 189.76      |
+#    --- Create chargeback ---
+    When Admin sets the business date to "17 March 2025"
+    And Admin runs inline COB job for Loan
+    And Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 250 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 2025  |                 | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 1  | 31   | 01 February 2025 | 15 January 2025 | 664.5           | 335.5         | 4.52     | 0.0  | 0.0       | 340.02 | 340.02 | 340.02     | 0.0    | 0.0         |
+      |    |      | 15 February 2025 |                 | 200.0           |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 2  | 28   | 01 March 2025    | 15 March 2025   | 434.76          | 429.74        | 11.28    | 0.0  | 0.0       | 441.02 | 441.02 | 0.0        | 441.02 | 0.0         |
+      | 3  | 31   | 01 April 2025    |                 | 0.0             | 684.76        | 6.21     | 0.0  | 0.0       | 690.97 | 250.0  | 250.0      | 0.0    | 440.97      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid    | In advance | Late   | Outstanding |
+      | 1450.0        | 22.01    | 0.0  | 0.0       | 1472.01 | 1031.04 | 590.02     | 441.02 | 440.97      |
+#    --- Make repayment with amount to close the loan ---
+    When Admin sets the business date to "18 March 2025"
+    And Admin runs inline COB job for Loan
+    And Customer makes "AUTOPAY" repayment on "18 March 2025" with 439 EUR transaction amount
+    Then Loan status will be "CLOSED_OBLIGATIONS_MET"
+    And Loan has 0 outstanding amount
+    And 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 2025  |                 | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 1  | 31   | 01 February 2025 | 15 January 2025 | 664.5           | 335.5         | 4.52     | 0.0  | 0.0       | 340.02 | 340.02 | 340.02     | 0.0    | 0.0         |
+      |    |      | 15 February 2025 |                 | 200.0           |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 2  | 28   | 01 March 2025    | 15 March 2025   | 434.76          | 429.74        | 11.28    | 0.0  | 0.0       | 441.02 | 441.02 | 0.0        | 441.02 | 0.0         |
+      | 3  | 31   | 01 April 2025    | 18 March 2025   | 0.0             | 684.76        | 4.24     | 0.0  | 0.0       | 689.0  | 689.0  | 689.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 |
+      | 1450.0        | 20.04    | 0.0  | 0.0       | 1470.04 | 1470.04 | 1029.02    | 441.02 | 0.0         |
+#    --- Undo last payment ---
+    When Admin sets the business date to "19 March 2025"
+    And Admin runs inline COB job for Loan
+    And Customer undo "1"th "Repayment" transaction made on "18 March 2025"
+    Then Loan status will be "ACTIVE"
+    And 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 2025  |                 | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 1  | 31   | 01 February 2025 | 15 January 2025 | 664.5           | 335.5         | 4.52     | 0.0  | 0.0       | 340.02 | 340.02 | 340.02     | 0.0    | 0.0         |
+      |    |      | 15 February 2025 |                 | 200.0           |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 2  | 28   | 01 March 2025    | 15 March 2025   | 434.76          | 429.74        | 11.28    | 0.0  | 0.0       | 441.02 | 441.02 | 0.0        | 441.02 | 0.0         |
+      | 3  | 31   | 01 April 2025    |                 | 0.0             | 684.76        | 6.21     | 0.0  | 0.0       | 690.97 | 250.0  | 250.0      | 0.0    | 440.97      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid    | In advance | Late   | Outstanding |
+      | 1450.0        | 22.01    | 0.0  | 0.0       | 1472.01 | 1031.04 | 590.02     | 441.02 | 440.97      |
+#    --- Make repayment with amount that will overpay the loan with half of first repayment ---
+    When Customer makes "AUTOPAY" repayment on "19 March 2025" with 609.15 EUR transaction amount
+    Then Loan status will be "OVERPAID"
+    And Loan has 170.01 overpaid amount
+    And 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 2025  |                 | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 1  | 31   | 01 February 2025 | 15 January 2025 | 664.5           | 335.5         | 4.52     | 0.0  | 0.0       | 340.02 | 340.02 | 340.02     | 0.0    | 0.0         |
+      |    |      | 15 February 2025 |                 | 200.0           |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 2  | 28   | 01 March 2025    | 15 March 2025   | 434.76          | 429.74        | 11.28    | 0.0  | 0.0       | 441.02 | 441.02 | 0.0        | 441.02 | 0.0         |
+      | 3  | 31   | 01 April 2025    | 19 March 2025   | 0.0             | 684.76        | 4.38     | 0.0  | 0.0       | 689.14 | 689.14 | 689.14     | 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 |
+      | 1450.0        | 20.18    | 0.0  | 0.0       | 1470.18 | 1470.18 | 1029.16    | 441.02 | 0.0         |
+#    --- Make credit balance refund ---
+    When Admin makes Credit Balance Refund transaction on "19 March 2025" with 170.01 EUR transaction amount
+    Then Loan status will be "CLOSED_OBLIGATIONS_MET"
+    And Loan has 0 outstanding amount
+    And 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 2025  |                 | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 1  | 31   | 01 February 2025 | 15 January 2025 | 664.5           | 335.5         | 4.52     | 0.0  | 0.0       | 340.02 | 340.02 | 340.02     | 0.0    | 0.0         |
+      |    |      | 15 February 2025 |                 | 200.0           |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 2  | 28   | 01 March 2025    | 15 March 2025   | 434.76          | 429.74        | 11.28    | 0.0  | 0.0       | 441.02 | 441.02 | 0.0        | 441.02 | 0.0         |
+      | 3  | 31   | 01 April 2025    | 19 March 2025   | 0.0             | 684.76        | 4.38     | 0.0  | 0.0       | 689.14 | 689.14 | 689.14     | 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 |
+      | 1450.0        | 20.18    | 0.0  | 0.0       | 1470.18 | 1470.18 | 1029.16    | 441.02 | 0.0         |
+#    --- Make chargeback for first repayment ---
+    When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 340.02 EUR transaction amount for Payment nr. 1
+    Then Loan Repayment schedule has 3 periods, with the following data for periods:
+      | Nr | Days | Date             | Paid date       | Balance of loan | Principal due | Interest | Fees | Penalties | Due     | Paid   | In advance | Late   | Outstanding |
+      |    |      | 01 January 2025  |                 | 1000.0          |               |          | 0.0  |           | 0.0     | 0.0    |            |        |             |
+      | 1  | 31   | 01 February 2025 | 15 January 2025 | 664.5           | 335.5         | 4.52     | 0.0  | 0.0       | 340.02  | 340.02 | 340.02     | 0.0    | 0.0         |
+      |    |      | 15 February 2025 |                 | 200.0           |               |          | 0.0  |           | 0.0     | 0.0    |            |        |             |
+      | 2  | 28   | 01 March 2025    | 15 March 2025   | 434.76          | 429.74        | 11.28    | 0.0  | 0.0       | 441.02  | 441.02 | 0.0        | 441.02 | 0.0         |
+      | 3  | 31   | 01 April 2025    |                 | 0.0             | 1024.78       | 5.81     | 0.0  | 0.0       | 1030.59 | 689.14 | 689.14     | 0.0    | 341.45      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid    | In advance | Late   | Outstanding |
+      | 1790.02       | 21.61    | 0.0  | 0.0       | 1811.63 | 1470.18 | 1029.16    | 441.02 | 341.45      |
+#    --- Make repayment to close the loan ---
+    When Customer makes "AUTOPAY" repayment on "19 March 2025" with 340.02 EUR transaction amount
+    Then Loan status will be "CLOSED_OBLIGATIONS_MET"
+    And Loan has 0 outstanding amount
+    And 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 2025  |                 | 1000.0          |               |          | 0.0  |           | 0.0     | 0.0     |            |        |             |
+      | 1  | 31   | 01 February 2025 | 15 January 2025 | 664.5           | 335.5         | 4.52     | 0.0  | 0.0       | 340.02  | 340.02  | 340.02     | 0.0    | 0.0         |
+      |    |      | 15 February 2025 |                 | 200.0           |               |          | 0.0  |           | 0.0     | 0.0     |            |        |             |
+      | 2  | 28   | 01 March 2025    | 15 March 2025   | 434.76          | 429.74        | 11.28    | 0.0  | 0.0       | 441.02  | 441.02  | 0.0        | 441.02 | 0.0         |
+      | 3  | 31   | 01 April 2025    | 19 March 2025   | 0.0             | 1024.78       | 4.38     | 0.0  | 0.0       | 1029.16 | 1029.16 | 1029.16    | 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 |
+      | 1790.02       | 20.18    | 0.0  | 0.0       | 1810.20 | 1810.20 | 1369.18    | 441.02 | 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    |
+      | 02 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 03 January 2025  | Accrual                | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 04 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 05 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 06 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 07 January 2025  | Accrual                | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 08 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 09 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 10 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 11 January 2025  | Accrual                | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 12 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 13 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 14 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 15 January 2025  | Accrual                | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 15 January 2025  | Repayment              | 340.02 | 335.5     | 4.52     | 0.0  | 0.0       | 664.5        | false    | false    |
+      | 16 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 17 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 18 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 19 January 2025  | Accrual                | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 20 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 21 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 22 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 23 January 2025  | Accrual                | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 24 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 25 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 26 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 27 January 2025  | Accrual                | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 28 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 29 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 30 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 31 January 2025  | Accrual                | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 01 February 2025 | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 02 February 2025 | Accrual                | 0.36   | 0.0       | 0.36     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 03 February 2025 | Accrual                | 0.35   | 0.0       | 0.35     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 04 February 2025 | Accrual                | 0.36   | 0.0       | 0.36     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 05 February 2025 | Accrual                | 0.36   | 0.0       | 0.36     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 06 February 2025 | Accrual                | 0.36   | 0.0       | 0.36     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 07 February 2025 | Accrual                | 0.35   | 0.0       | 0.35     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 08 February 2025 | Accrual                | 0.36   | 0.0       | 0.36     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 09 February 2025 | Accrual                | 0.36   | 0.0       | 0.36     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 10 February 2025 | Accrual                | 0.35   | 0.0       | 0.35     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 11 February 2025 | Accrual                | 0.36   | 0.0       | 0.36     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 12 February 2025 | Accrual                | 0.36   | 0.0       | 0.36     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 13 February 2025 | Accrual                | 0.36   | 0.0       | 0.36     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 14 February 2025 | Accrual                | 0.35   | 0.0       | 0.35     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 15 February 2025 | Disbursement           | 200.0  | 0.0       | 0.0      | 0.0  | 0.0       | 864.5        | false    | false    |
+      | 15 February 2025 | Accrual Adjustment     | 3.16   | 0.0       | 3.16     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 16 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 17 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 18 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 19 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 20 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 21 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 22 February 2025 | Accrual                | 0.3    | 0.0       | 0.3      | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 23 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 24 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 25 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 26 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 27 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 28 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 01 March 2025    | Accrual                | 0.3    | 0.0       | 0.3      | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 02 March 2025    | Accrual                | 0.28   | 0.0       | 0.28     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 03 March 2025    | Accrual                | 0.28   | 0.0       | 0.28     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 04 March 2025    | Accrual                | 0.28   | 0.0       | 0.28     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 05 March 2025    | Accrual                | 0.28   | 0.0       | 0.28     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 06 March 2025    | Accrual                | 0.27   | 0.0       | 0.27     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 07 March 2025    | Accrual                | 0.28   | 0.0       | 0.28     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 08 March 2025    | Accrual                | 0.28   | 0.0       | 0.28     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 09 March 2025    | Accrual                | 0.28   | 0.0       | 0.28     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 10 March 2025    | Accrual                | 0.28   | 0.0       | 0.28     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 11 March 2025    | Accrual                | 0.28   | 0.0       | 0.28     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 12 March 2025    | Accrual                | 0.28   | 0.0       | 0.28     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 13 March 2025    | Accrual                | 0.28   | 0.0       | 0.28     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 14 March 2025    | Accrual                | 0.28   | 0.0       | 0.28     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 15 March 2025    | Repayment              | 441.02 | 429.74    | 11.28    | 0.0  | 0.0       | 434.76       | false    | false    |
+      | 15 March 2025    | Accrual                | 0.27   | 0.0       | 0.27     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 16 March 2025    | Merchant Issued Refund | 250.0  | 250.0     | 0.0      | 0.0  | 0.0       | 184.76       | false    | false    |
+      | 16 March 2025    | Accrual                | 0.14   | 0.0       | 0.14     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 17 March 2025    | Chargeback             | 250.0  | 250.0     | 0.0      | 0.0  | 0.0       | 434.76       | false    | false    |
+      | 17 March 2025    | Accrual                | 0.06   | 0.0       | 0.06     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 18 March 2025    | Repayment              | 439.0  | 434.76    | 4.24     | 0.0  | 0.0       | 0.0          | true     | false    |
+      | 18 March 2025    | Accrual                | 0.14   | 0.0       | 0.14     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 19 March 2025    | Repayment              | 609.15 | 434.76    | 4.38     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 19 March 2025    | Accrual                | 0.14   | 0.0       | 0.14     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 19 March 2025    | Credit Balance Refund  | 170.01 | 0.0       | 0.0      | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 19 March 2025    | Chargeback             | 340.02 | 340.02    | 0.0      | 0.0  | 0.0       | 340.02       | false    | false    |
+      | 19 March 2025    | Repayment              | 340.02 | 340.02    | 0.0      | 0.0  | 0.0       | 0.0          | false    | false    |
+
+  @TestRailId:C3911
+  Scenario: Verify Loan repayment schedule for progressive loan, interest type: Declining balance, interest calculation period: same as repayment - UC11: complex transactions, interest recalculation disabled, partial period interest calculation enabled
+    When Admin sets the business date to "01 January 2025"
+    And Admin creates a client with random data
+    And Admin creates a fully customized loan with the following data:
+      | LoanProduct                                                                            | submitted on date | 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_DECL_BAL_SARP_EMI_360_30_NO_INT_RECALC_MULTIDISB_PARTIAL_PERIOD | 01 January 2025   | 2000           | 12                     | DECLINING_BALANCE | 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 2025" with "2000" 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
+    When Admin sets the business date to "01 February 2025"
+    And Admin runs inline COB job for Loan
+#    --- 2nd Disbursement ---
+    When Admin sets the business date to "15 February 2025"
+    And Admin runs inline COB job for Loan
+    And Admin successfully disburse the loan on "15 February 2025" with "200" EUR transaction amount
+#    --- Backdated repayment (early repayment) ---
+    When Customer makes "AUTOPAY" repayment on "15 January 2025" with 340.02 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 2025  |                 | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0    |            |      |             |
+      | 1  | 31   | 01 February 2025 | 15 January 2025 | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02 | 340.02 | 340.02     | 0.0  | 0.0         |
+      |    |      | 15 February 2025 |                 | 200.0           |               |          | 0.0  |           | 0.0    | 0.0    |            |      |             |
+      | 2  | 28   | 01 March 2025    |                 | 436.66          | 433.32        | 7.7      | 0.0  | 0.0       | 441.02 | 0.0    | 0.0        | 0.0  | 441.02      |
+      | 3  | 31   | 01 April 2025    |                 | 0.0             | 436.66        | 4.37     | 0.0  | 0.0       | 441.03 | 0.0    | 0.0        | 0.0  | 441.03      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid   | In advance | Late | Outstanding |
+      | 1200.0        | 22.07    | 0.0  | 0.0       | 1222.07 | 340.02 | 340.02     | 0.0  | 882.05      |
+#    --- Make full 2nd period repayment (late repayment) ---
+    When Admin sets the business date to "15 March 2025"
+    And Admin runs inline COB job for Loan
+    And Customer makes "AUTOPAY" repayment on "15 March 2025" with 441.02 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 2025  |                 | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 1  | 31   | 01 February 2025 | 15 January 2025 | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02 | 340.02 | 340.02     | 0.0    | 0.0         |
+      |    |      | 15 February 2025 |                 | 200.0           |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 2  | 28   | 01 March 2025    | 15 March 2025   | 436.66          | 433.32        | 7.7      | 0.0  | 0.0       | 441.02 | 441.02 | 0.0        | 441.02 | 0.0         |
+      | 3  | 31   | 01 April 2025    |                 | 0.0             | 436.66        | 4.37     | 0.0  | 0.0       | 441.03 | 0.0    | 0.0        | 0.0    | 441.03      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid   | In advance | Late   | Outstanding |
+      | 1200.0        | 22.07    | 0.0  | 0.0       | 1222.07 | 781.04 | 340.02     | 441.02 | 441.03      |
+  #    --- Make merchant issued refund ---
+    When Admin sets the business date to "16 March 2025"
+    And Admin runs inline COB job for Loan
+    And Customer makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "16 March 2025" with 250 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 2025  |                 | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 1  | 31   | 01 February 2025 | 15 January 2025 | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02 | 340.02 | 340.02     | 0.0    | 0.0         |
+      |    |      | 15 February 2025 |                 | 200.0           |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 2  | 28   | 01 March 2025    | 15 March 2025   | 436.66          | 433.32        | 7.7      | 0.0  | 0.0       | 441.02 | 441.02 | 0.0        | 441.02 | 0.0         |
+      | 3  | 31   | 01 April 2025    |                 | 0.0             | 436.66        | 4.37     | 0.0  | 0.0       | 441.03 | 250.0  | 250.0      | 0.0    | 191.03      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid    | In advance | Late   | Outstanding |
+      | 1200.0        | 22.07    | 0.0  | 0.0       | 1222.07 | 1031.04 | 590.02     | 441.02 | 191.03      |
+#    --- Create chargeback ---
+    When Admin sets the business date to "17 March 2025"
+    And Admin runs inline COB job for Loan
+    And Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 250 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 2025  |                 | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 1  | 31   | 01 February 2025 | 15 January 2025 | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02 | 340.02 | 340.02     | 0.0    | 0.0         |
+      |    |      | 15 February 2025 |                 | 200.0           |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 2  | 28   | 01 March 2025    | 15 March 2025   | 436.66          | 433.32        | 7.7      | 0.0  | 0.0       | 441.02 | 441.02 | 0.0        | 441.02 | 0.0         |
+      | 3  | 31   | 01 April 2025    |                 | 0.0             | 686.66        | 4.37     | 0.0  | 0.0       | 691.03 | 250.0  | 250.0      | 0.0    | 441.03      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid    | In advance | Late   | Outstanding |
+      | 1450.0        | 22.07    | 0.0  | 0.0       | 1472.07 | 1031.04 | 590.02     | 441.02 | 441.03      |
+#    --- Make repayment with amount to close the loan ---
+    When Admin sets the business date to "18 March 2025"
+    And Admin runs inline COB job for Loan
+    And Customer makes "AUTOPAY" repayment on "18 March 2025" with 441.03 EUR transaction amount
+    Then Loan status will be "CLOSED_OBLIGATIONS_MET"
+    And Loan has 0 outstanding amount
+    Then Loan Repayment schedule has 3 periods, with the following data for periods:
+      | Nr | Days | Date             | Paid date       | Balance of loan | Principal due | Interest | Fees | Penalties | Due    | Paid   | In advance | Late   | Outstanding |
+      |    |      | 01 January 2025  |                 | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 1  | 31   | 01 February 2025 | 15 January 2025 | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02 | 340.02 | 340.02     | 0.0    | 0.0         |
+      |    |      | 15 February 2025 |                 | 200.0           |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 2  | 28   | 01 March 2025    | 15 March 2025   | 436.66          | 433.32        | 7.7      | 0.0  | 0.0       | 441.02 | 441.02 | 0.0        | 441.02 | 0.0         |
+      | 3  | 31   | 01 April 2025    | 18 March 2025   | 0.0             | 686.66        | 4.37     | 0.0  | 0.0       | 691.03 | 691.03 | 691.03     | 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 |
+      | 1450.0        | 22.07    | 0.0  | 0.0       | 1472.07 | 1472.07 | 1031.05    | 441.02 | 0.0         |
+#    --- Undo last payment ---
+    When Admin sets the business date to "19 March 2025"
+    And Admin runs inline COB job for Loan
+    And Customer undo "1"th "Repayment" transaction made on "18 March 2025"
+    Then Loan status will be "ACTIVE"
+    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 2025  |                 | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 1  | 31   | 01 February 2025 | 15 January 2025 | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02 | 340.02 | 340.02     | 0.0    | 0.0         |
+      |    |      | 15 February 2025 |                 | 200.0           |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 2  | 28   | 01 March 2025    | 15 March 2025   | 436.66          | 433.32        | 7.7      | 0.0  | 0.0       | 441.02 | 441.02 | 0.0        | 441.02 | 0.0         |
+      | 3  | 31   | 01 April 2025    |                 | 0.0             | 686.66        | 4.37     | 0.0  | 0.0       | 691.03 | 250.0  | 250.0      | 0.0    | 441.03      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid    | In advance | Late   | Outstanding |
+      | 1450.0        | 22.07    | 0.0  | 0.0       | 1472.07 | 1031.04 | 590.02     | 441.02 | 441.03      |
+#    --- Make repayment with amount that will overpay the loan with half of first repayment ---
+    When Customer makes "AUTOPAY" repayment on "19 March 2025" with 611.04 EUR transaction amount
+    Then Loan status will be "OVERPAID"
+    And Loan has 170.01 overpaid 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 2025  |                 | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 1  | 31   | 01 February 2025 | 15 January 2025 | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02 | 340.02 | 340.02     | 0.0    | 0.0         |
+      |    |      | 15 February 2025 |                 | 200.0           |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 2  | 28   | 01 March 2025    | 15 March 2025   | 436.66          | 433.32        | 7.7      | 0.0  | 0.0       | 441.02 | 441.02 | 0.0        | 441.02 | 0.0         |
+      | 3  | 31   | 01 April 2025    | 19 March 2025   | 0.0             | 686.66        | 4.37     | 0.0  | 0.0       | 691.03 | 691.03 | 691.03     | 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 |
+      | 1450.0        | 22.07    | 0.0  | 0.0       | 1472.07 | 1472.07 | 1031.05    | 441.02 | 0.0         |
+#    --- Make credit balance refund ---
+    When Admin makes Credit Balance Refund transaction on "19 March 2025" with 170.01 EUR transaction amount
+    Then Loan status will be "CLOSED_OBLIGATIONS_MET"
+    And Loan has 0 outstanding amount
+    Then Loan Repayment schedule has 3 periods, with the following data for periods:
+      | Nr | Days | Date             | Paid date       | Balance of loan | Principal due | Interest | Fees | Penalties | Due    | Paid   | In advance | Late   | Outstanding |
+      |    |      | 01 January 2025  |                 | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 1  | 31   | 01 February 2025 | 15 January 2025 | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02 | 340.02 | 340.02     | 0.0    | 0.0         |
+      |    |      | 15 February 2025 |                 | 200.0           |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 2  | 28   | 01 March 2025    | 15 March 2025   | 436.66          | 433.32        | 7.7      | 0.0  | 0.0       | 441.02 | 441.02 | 0.0        | 441.02 | 0.0         |
+      | 3  | 31   | 01 April 2025    | 19 March 2025   | 0.0             | 686.66        | 4.37     | 0.0  | 0.0       | 691.03 | 691.03 | 691.03     | 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 |
+      | 1450.0        | 22.07    | 0.0  | 0.0       | 1472.07 | 1472.07 | 1031.05    | 441.02 | 0.0         |
+#    --- Make chargeback for first repayment ---
+    When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 340.02 EUR transaction amount for Payment nr. 1
+    Then Loan Repayment schedule has 3 periods, with the following data for periods:
+      | Nr | Days | Date             | Paid date       | Balance of loan | Principal due | Interest | Fees | Penalties | Due     | Paid   | In advance | Late   | Outstanding |
+      |    |      | 01 January 2025  |                 | 1000.0          |               |          | 0.0  |           | 0.0     | 0.0    |            |        |             |
+      | 1  | 31   | 01 February 2025 | 15 January 2025 | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02  | 340.02 | 340.02     | 0.0    | 0.0         |
+      |    |      | 15 February 2025 |                 | 200.0           |               |          | 0.0  |           | 0.0     | 0.0    |            |        |             |
+      | 2  | 28   | 01 March 2025    | 15 March 2025   | 436.66          | 433.32        | 7.7      | 0.0  | 0.0       | 441.02  | 441.02 | 0.0        | 441.02 | 0.0         |
+      | 3  | 31   | 01 April 2025    |                 | 0.0             | 1026.68       | 4.37     | 0.0  | 0.0       | 1031.05 | 691.03 | 691.03     | 0.0    | 340.02      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid    | In advance | Late   | Outstanding |
+      | 1790.02       | 22.07    | 0.0  | 0.0       | 1812.09 | 1472.07 | 1031.05    | 441.02 | 340.02      |
+#    --- Make repayment to close the loan ---
+    When Customer makes "AUTOPAY" repayment on "19 March 2025" with 340.02 EUR transaction amount
+    Then Loan status will be "CLOSED_OBLIGATIONS_MET"
+    And Loan has 0 outstanding amount
+    Then Loan Repayment schedule has 3 periods, with the following data for periods:
+      | Nr | Days | Date             | Paid date       | Balance of loan | Principal due | Interest | Fees | Penalties | Due     | Paid    | In advance | Late   | Outstanding |
+      |    |      | 01 January 2025  |                 | 1000.0          |               |          | 0.0  |           | 0.0     | 0.0     |            |        |             |
+      | 1  | 31   | 01 February 2025 | 15 January 2025 | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02  | 340.02  | 340.02     | 0.0    | 0.0         |
+      |    |      | 15 February 2025 |                 | 200.0           |               |          | 0.0  |           | 0.0     | 0.0     |            |        |             |
+      | 2  | 28   | 01 March 2025    | 15 March 2025   | 436.66          | 433.32        | 7.7      | 0.0  | 0.0       | 441.02  | 441.02  | 0.0        | 441.02 | 0.0         |
+      | 3  | 31   | 01 April 2025    | 19 March 2025   | 0.0             | 1026.68       | 4.37     | 0.0  | 0.0       | 1031.05 | 1031.05 | 1031.05    | 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 |
+      | 1790.02       | 22.07    | 0.0  | 0.0       | 1812.09 | 1812.09 | 1371.07    | 441.02 | 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    |
+      | 02 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 03 January 2025  | Accrual                | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 04 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 05 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 06 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 07 January 2025  | Accrual                | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 08 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 09 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 10 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 11 January 2025  | Accrual                | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 12 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 13 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 14 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 15 January 2025  | Accrual                | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 15 January 2025  | Repayment              | 340.02 | 330.02    | 10.0     | 0.0  | 0.0       | 669.98       | false    | false    |
+      | 16 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 17 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 18 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 19 January 2025  | Accrual                | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 20 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 21 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 22 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 23 January 2025  | Accrual                | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 24 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 25 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 26 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 27 January 2025  | Accrual                | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 28 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 29 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 30 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 31 January 2025  | Accrual                | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 01 February 2025 | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 02 February 2025 | Accrual                | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 03 February 2025 | Accrual                | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 04 February 2025 | Accrual                | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 05 February 2025 | Accrual                | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 06 February 2025 | Accrual                | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 07 February 2025 | Accrual                | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 08 February 2025 | Accrual                | 0.23   | 0.0       | 0.23     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 09 February 2025 | Accrual                | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 10 February 2025 | Accrual                | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 11 February 2025 | Accrual                | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 12 February 2025 | Accrual                | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 13 February 2025 | Accrual                | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 14 February 2025 | Accrual                | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 15 February 2025 | Disbursement           | 200.0  | 0.0       | 0.0      | 0.0  | 0.0       | 869.98       | false    | false    |
+      | 15 February 2025 | Accrual                | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 16 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 17 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 18 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 19 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 20 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 21 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 22 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 23 February 2025 | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 24 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 25 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 26 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 27 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 28 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 01 March 2025    | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 02 March 2025    | Accrual                | 0.14   | 0.0       | 0.14     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 03 March 2025    | Accrual                | 0.14   | 0.0       | 0.14     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 04 March 2025    | Accrual                | 0.14   | 0.0       | 0.14     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 05 March 2025    | Accrual                | 0.14   | 0.0       | 0.14     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 06 March 2025    | Accrual                | 0.14   | 0.0       | 0.14     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 07 March 2025    | Accrual                | 0.15   | 0.0       | 0.15     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 08 March 2025    | Accrual                | 0.14   | 0.0       | 0.14     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 09 March 2025    | Accrual                | 0.14   | 0.0       | 0.14     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 10 March 2025    | Accrual                | 0.14   | 0.0       | 0.14     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 11 March 2025    | Accrual                | 0.14   | 0.0       | 0.14     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 12 March 2025    | Accrual                | 0.14   | 0.0       | 0.14     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 13 March 2025    | Accrual                | 0.14   | 0.0       | 0.14     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 14 March 2025    | Accrual                | 0.14   | 0.0       | 0.14     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 15 March 2025    | Repayment              | 441.02 | 433.32    | 7.7      | 0.0  | 0.0       | 436.66       | false    | false    |
+      | 15 March 2025    | Accrual                | 0.14   | 0.0       | 0.14     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 16 March 2025    | Merchant Issued Refund | 250.0  | 250.0     | 0.0      | 0.0  | 0.0       | 186.66       | false    | false    |
+      | 16 March 2025    | Accrual                | 0.14   | 0.0       | 0.14     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 17 March 2025    | Chargeback             | 250.0  | 250.0     | 0.0      | 0.0  | 0.0       | 436.66       | false    | false    |
+      | 17 March 2025    | Accrual                | 0.14   | 0.0       | 0.14     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 18 March 2025    | Repayment              | 441.03 | 436.66    | 4.37     | 0.0  | 0.0       | 0.0          | true     | false    |
+      | 18 March 2025    | Accrual                | 2.12   | 0.0       | 2.12     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 19 March 2025    | Repayment              | 611.04 | 436.66    | 4.37     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 19 March 2025    | Credit Balance Refund  | 170.01 | 0.0       | 0.0      | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 19 March 2025    | Chargeback             | 340.02 | 340.02    | 0.0      | 0.0  | 0.0       | 340.02       | false    | false    |
+      | 19 March 2025    | Repayment              | 340.02 | 340.02    | 0.0      | 0.0  | 0.0       | 0.0          | false    | false    |
+
+  @TestRailId:C3912
+  Scenario: Verify Loan repayment schedule for progressive loan, interest type: Declining balance, interest calculation period: same as repayment - UC12: complex transactions, interest recalculation disabled, partial period interest calculation disabled
+    When Admin sets the business date to "01 January 2025"
+    And Admin creates a client with random data
+    And Admin creates a fully customized loan with the following data:
+      | LoanProduct                                                                               | submitted on date | 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_DECL_BAL_SARP_EMI_360_30_NO_INT_RECALC_MULTIDISB_NO_PARTIAL_PERIOD | 01 January 2025   | 2000           | 12                     | DECLINING_BALANCE | 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 2025" with "2000" 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
+    When Admin sets the business date to "01 February 2025"
+    And Admin runs inline COB job for Loan
+#    --- 2nd Disbursement ---
+    When Admin sets the business date to "15 February 2025"
+    And Admin runs inline COB job for Loan
+    And Admin successfully disburse the loan on "15 February 2025" with "200" EUR transaction amount
+#    --- Backdated repayment (early repayment) ---
+    When Customer makes "AUTOPAY" repayment on "15 January 2025" with 340.02 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 2025  |                 | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0    |            |      |             |
+      | 1  | 31   | 01 February 2025 | 15 January 2025 | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02 | 340.02 | 340.02     | 0.0  | 0.0         |
+      |    |      | 15 February 2025 |                 | 200.0           |               |          | 0.0  |           | 0.0    | 0.0    |            |      |             |
+      | 2  | 28   | 01 March 2025    |                 | 437.15          | 432.83        | 8.7      | 0.0  | 0.0       | 441.53 | 0.0    | 0.0        | 0.0  | 441.53      |
+      | 3  | 31   | 01 April 2025    |                 | 0.0             | 437.15        | 4.37     | 0.0  | 0.0       | 441.52 | 0.0    | 0.0        | 0.0  | 441.52      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid   | In advance | Late | Outstanding |
+      | 1200.0        | 23.07    | 0.0  | 0.0       | 1223.07 | 340.02 | 340.02     | 0.0  | 883.05      |
+#    --- Make full 2nd period repayment (late repayment) ---
+    When Admin sets the business date to "15 March 2025"
+    And Admin runs inline COB job for Loan
+    And Customer makes "AUTOPAY" repayment on "15 March 2025" with 441.53 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 2025  |                 | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 1  | 31   | 01 February 2025 | 15 January 2025 | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02 | 340.02 | 340.02     | 0.0    | 0.0         |
+      |    |      | 15 February 2025 |                 | 200.0           |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 2  | 28   | 01 March 2025    | 15 March 2025   | 437.15          | 432.83        | 8.7      | 0.0  | 0.0       | 441.53 | 441.53 | 0.0        | 441.53 | 0.0         |
+      | 3  | 31   | 01 April 2025    |                 | 0.0             | 437.15        | 4.37     | 0.0  | 0.0       | 441.52 | 0.0    | 0.0        | 0.0    | 441.52      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid   | In advance | Late   | Outstanding |
+      | 1200.0        | 23.07    | 0.0  | 0.0       | 1223.07 | 781.55 | 340.02     | 441.53 | 441.52      |
+  #    --- Make merchant issued refund ---
+    When Admin sets the business date to "16 March 2025"
+    And Admin runs inline COB job for Loan
+    And Customer makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "16 March 2025" with 250 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 2025  |                 | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 1  | 31   | 01 February 2025 | 15 January 2025 | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02 | 340.02 | 340.02     | 0.0    | 0.0         |
+      |    |      | 15 February 2025 |                 | 200.0           |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 2  | 28   | 01 March 2025    | 15 March 2025   | 437.15          | 432.83        | 8.7      | 0.0  | 0.0       | 441.53 | 441.53 | 0.0        | 441.53 | 0.0         |
+      | 3  | 31   | 01 April 2025    |                 | 0.0             | 437.15        | 4.37     | 0.0  | 0.0       | 441.52 | 250.0  | 250.0      | 0.0    | 191.52      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid    | In advance | Late   | Outstanding |
+      | 1200.0        | 23.07    | 0.0  | 0.0       | 1223.07 | 1031.55 | 590.02     | 441.53 | 191.52      |
+#    --- Create chargeback ---
+    When Admin sets the business date to "17 March 2025"
+    And Admin runs inline COB job for Loan
+    And Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 250 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 2025  |                 | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 1  | 31   | 01 February 2025 | 15 January 2025 | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02 | 340.02 | 340.02     | 0.0    | 0.0         |
+      |    |      | 15 February 2025 |                 | 200.0           |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 2  | 28   | 01 March 2025    | 15 March 2025   | 437.15          | 432.83        | 8.7      | 0.0  | 0.0       | 441.53 | 441.53 | 0.0        | 441.53 | 0.0         |
+      | 3  | 31   | 01 April 2025    |                 | 0.0             | 687.15        | 4.37     | 0.0  | 0.0       | 691.52 | 250.0  | 250.0      | 0.0    | 441.52      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid    | In advance | Late   | Outstanding |
+      | 1450.0        | 23.07    | 0.0  | 0.0       | 1473.07 | 1031.55 | 590.02     | 441.53 | 441.52      |
+#    --- Make repayment with amount to close the loan ---
+    When Admin sets the business date to "18 March 2025"
+    And Admin runs inline COB job for Loan
+    And Customer makes "AUTOPAY" repayment on "18 March 2025" with 441.52 EUR transaction amount
+    Then Loan status will be "CLOSED_OBLIGATIONS_MET"
+    And Loan has 0 outstanding amount
+    Then Loan Repayment schedule has 3 periods, with the following data for periods:
+      | Nr | Days | Date             | Paid date       | Balance of loan | Principal due | Interest | Fees | Penalties | Due    | Paid   | In advance | Late   | Outstanding |
+      |    |      | 01 January 2025  |                 | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 1  | 31   | 01 February 2025 | 15 January 2025 | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02 | 340.02 | 340.02     | 0.0    | 0.0         |
+      |    |      | 15 February 2025 |                 | 200.0           |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 2  | 28   | 01 March 2025    | 15 March 2025   | 437.15          | 432.83        | 8.7      | 0.0  | 0.0       | 441.53 | 441.53 | 0.0        | 441.53 | 0.0         |
+      | 3  | 31   | 01 April 2025    | 18 March 2025   | 0.0             | 687.15        | 4.37     | 0.0  | 0.0       | 691.52 | 691.52 | 691.52     | 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 |
+      | 1450.0        | 23.07    | 0.0  | 0.0       | 1473.07 | 1473.07 | 1031.54    | 441.53 | 0.0         |
+#    --- Undo last payment ---
+    When Admin sets the business date to "19 March 2025"
+    And Admin runs inline COB job for Loan
+    And Customer undo "1"th "Repayment" transaction made on "18 March 2025"
+    Then Loan status will be "ACTIVE"
+    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 2025  |                 | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 1  | 31   | 01 February 2025 | 15 January 2025 | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02 | 340.02 | 340.02     | 0.0    | 0.0         |
+      |    |      | 15 February 2025 |                 | 200.0           |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 2  | 28   | 01 March 2025    | 15 March 2025   | 437.15          | 432.83        | 8.7      | 0.0  | 0.0       | 441.53 | 441.53 | 0.0        | 441.53 | 0.0         |
+      | 3  | 31   | 01 April 2025    |                 | 0.0             | 687.15        | 4.37     | 0.0  | 0.0       | 691.52 | 250.0  | 250.0      | 0.0    | 441.52      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid    | In advance | Late   | Outstanding |
+      | 1450.0        | 23.07    | 0.0  | 0.0       | 1473.07 | 1031.55 | 590.02     | 441.53 | 441.52      |
+#    --- Make repayment with amount that will overpay the loan with half of first repayment ---
+    When Customer makes "AUTOPAY" repayment on "19 March 2025" with 611.53 EUR transaction amount
+    Then Loan status will be "OVERPAID"
+    And Loan has 170.01 overpaid 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 2025  |                 | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 1  | 31   | 01 February 2025 | 15 January 2025 | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02 | 340.02 | 340.02     | 0.0    | 0.0         |
+      |    |      | 15 February 2025 |                 | 200.0           |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 2  | 28   | 01 March 2025    | 15 March 2025   | 437.15          | 432.83        | 8.7      | 0.0  | 0.0       | 441.53 | 441.53 | 0.0        | 441.53 | 0.0         |
+      | 3  | 31   | 01 April 2025    | 19 March 2025   | 0.0             | 687.15        | 4.37     | 0.0  | 0.0       | 691.52 | 691.52 | 691.52     | 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 |
+      | 1450.0        | 23.07    | 0.0  | 0.0       | 1473.07 | 1473.07 | 1031.54    | 441.53 | 0.0         |
+#    --- Make credit balance refund ---
+    When Admin makes Credit Balance Refund transaction on "19 March 2025" with 170.01 EUR transaction amount
+    Then Loan status will be "CLOSED_OBLIGATIONS_MET"
+    And Loan has 0 outstanding amount
+    Then Loan Repayment schedule has 3 periods, with the following data for periods:
+      | Nr | Days | Date             | Paid date       | Balance of loan | Principal due | Interest | Fees | Penalties | Due    | Paid   | In advance | Late   | Outstanding |
+      |    |      | 01 January 2025  |                 | 1000.0          |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 1  | 31   | 01 February 2025 | 15 January 2025 | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02 | 340.02 | 340.02     | 0.0    | 0.0         |
+      |    |      | 15 February 2025 |                 | 200.0           |               |          | 0.0  |           | 0.0    | 0.0    |            |        |             |
+      | 2  | 28   | 01 March 2025    | 15 March 2025   | 437.15          | 432.83        | 8.7      | 0.0  | 0.0       | 441.53 | 441.53 | 0.0        | 441.53 | 0.0         |
+      | 3  | 31   | 01 April 2025    | 19 March 2025   | 0.0             | 687.15        | 4.37     | 0.0  | 0.0       | 691.52 | 691.52 | 691.52     | 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 |
+      | 1450.0        | 23.07    | 0.0  | 0.0       | 1473.07 | 1473.07 | 1031.54    | 441.53 | 0.0         |
+#    --- Make chargeback for first repayment ---
+    When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 340.02 EUR transaction amount for Payment nr. 1
+    Then Loan Repayment schedule has 3 periods, with the following data for periods:
+      | Nr | Days | Date             | Paid date       | Balance of loan | Principal due | Interest | Fees | Penalties | Due     | Paid   | In advance | Late   | Outstanding |
+      |    |      | 01 January 2025  |                 | 1000.0          |               |          | 0.0  |           | 0.0     | 0.0    |            |        |             |
+      | 1  | 31   | 01 February 2025 | 15 January 2025 | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02  | 340.02 | 340.02     | 0.0    | 0.0         |
+      |    |      | 15 February 2025 |                 | 200.0           |               |          | 0.0  |           | 0.0     | 0.0    |            |        |             |
+      | 2  | 28   | 01 March 2025    | 15 March 2025   | 437.15          | 432.83        | 8.7      | 0.0  | 0.0       | 441.53  | 441.53 | 0.0        | 441.53 | 0.0         |
+      | 3  | 31   | 01 April 2025    |                 | 0.0             | 1027.17       | 4.37     | 0.0  | 0.0       | 1031.54 | 691.52 | 691.52     | 0.0    | 340.02      |
+    And Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid    | In advance | Late   | Outstanding |
+      | 1790.02       | 23.07    | 0.0  | 0.0       | 1813.09 | 1473.07 | 1031.54    | 441.53 | 340.02      |
+#    --- Make repayment to close the loan ---
+    When Customer makes "AUTOPAY" repayment on "19 March 2025" with 340.02 EUR transaction amount
+    Then Loan status will be "CLOSED_OBLIGATIONS_MET"
+    And Loan has 0 outstanding amount
+    Then Loan Repayment schedule has 3 periods, with the following data for periods:
+      | Nr | Days | Date             | Paid date       | Balance of loan | Principal due | Interest | Fees | Penalties | Due     | Paid    | In advance | Late   | Outstanding |
+      |    |      | 01 January 2025  |                 | 1000.0          |               |          | 0.0  |           | 0.0     | 0.0     |            |        |             |
+      | 1  | 31   | 01 February 2025 | 15 January 2025 | 669.98          | 330.02        | 10.0     | 0.0  | 0.0       | 340.02  | 340.02  | 340.02     | 0.0    | 0.0         |
+      |    |      | 15 February 2025 |                 | 200.0           |               |          | 0.0  |           | 0.0     | 0.0     |            |        |             |
+      | 2  | 28   | 01 March 2025    | 15 March 2025   | 437.15          | 432.83        | 8.7      | 0.0  | 0.0       | 441.53  | 441.53  | 0.0        | 441.53 | 0.0         |
+      | 3  | 31   | 01 April 2025    | 19 March 2025   | 0.0             | 1027.17       | 4.37     | 0.0  | 0.0       | 1031.54 | 1031.54 | 1031.54    | 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 |
+      | 1790.02       | 23.07    | 0.0  | 0.0       | 1813.09 | 1813.09 | 1371.56    | 441.53 | 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 2025  | Disbursement           | 1000.0 | 0.0       | 0.0      | 0.0  | 0.0       | 1000.0       | false    | false    |
+      | 02 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 03 January 2025  | Accrual                | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 04 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 05 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 06 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 07 January 2025  | Accrual                | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 08 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 09 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 10 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 11 January 2025  | Accrual                | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 12 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 13 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 14 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 15 January 2025  | Accrual                | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 15 January 2025  | Repayment              | 340.02 | 330.02    | 10.0     | 0.0  | 0.0       | 669.98       | false    | false    |
+      | 16 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 17 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 18 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 19 January 2025  | Accrual                | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 20 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 21 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 22 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 23 January 2025  | Accrual                | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 24 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 25 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 26 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 27 January 2025  | Accrual                | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 28 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 29 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 30 January 2025  | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 31 January 2025  | Accrual                | 0.33   | 0.0       | 0.33     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 01 February 2025 | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 02 February 2025 | Accrual                | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 03 February 2025 | Accrual                | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 04 February 2025 | Accrual                | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 05 February 2025 | Accrual                | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 06 February 2025 | Accrual                | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 07 February 2025 | Accrual                | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 08 February 2025 | Accrual                | 0.23   | 0.0       | 0.23     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 09 February 2025 | Accrual                | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 10 February 2025 | Accrual                | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 11 February 2025 | Accrual                | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 12 February 2025 | Accrual                | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 13 February 2025 | Accrual                | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 14 February 2025 | Accrual                | 0.24   | 0.0       | 0.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 15 February 2025 | Disbursement           | 200.0  | 0.0       | 0.0      | 0.0  | 0.0       | 869.98       | false    | false    |
+      | 15 February 2025 | Accrual                | 1.24   | 0.0       | 1.24     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 16 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 17 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 18 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 19 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 20 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 21 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 22 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 23 February 2025 | Accrual                | 0.32   | 0.0       | 0.32     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 24 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 25 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 26 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 27 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 28 February 2025 | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 01 March 2025    | Accrual                | 0.31   | 0.0       | 0.31     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 02 March 2025    | Accrual                | 0.14   | 0.0       | 0.14     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 03 March 2025    | Accrual                | 0.14   | 0.0       | 0.14     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 04 March 2025    | Accrual                | 0.14   | 0.0       | 0.14     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 05 March 2025    | Accrual                | 0.14   | 0.0       | 0.14     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 06 March 2025    | Accrual                | 0.15   | 0.0       | 0.15     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 07 March 2025    | Accrual                | 0.14   | 0.0       | 0.14     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 08 March 2025    | Accrual                | 0.14   | 0.0       | 0.14     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 09 March 2025    | Accrual                | 0.14   | 0.0       | 0.14     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 10 March 2025    | Accrual                | 0.14   | 0.0       | 0.14     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 11 March 2025    | Accrual                | 0.14   | 0.0       | 0.14     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 12 March 2025    | Accrual                | 0.14   | 0.0       | 0.14     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 13 March 2025    | Accrual                | 0.14   | 0.0       | 0.14     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 14 March 2025    | Accrual                | 0.14   | 0.0       | 0.14     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 15 March 2025    | Repayment              | 441.53 | 432.83    | 8.7      | 0.0  | 0.0       | 437.15       | false    | false    |
+      | 15 March 2025    | Accrual                | 0.14   | 0.0       | 0.14     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 16 March 2025    | Merchant Issued Refund | 250.0  | 250.0     | 0.0      | 0.0  | 0.0       | 187.15       | false    | false    |
+      | 16 March 2025    | Accrual                | 0.15   | 0.0       | 0.15     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 17 March 2025    | Chargeback             | 250.0  | 250.0     | 0.0      | 0.0  | 0.0       | 437.15       | false    | false    |
+      | 17 March 2025    | Accrual                | 0.14   | 0.0       | 0.14     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 18 March 2025    | Repayment              | 441.52 | 437.15    | 4.37     | 0.0  | 0.0       | 0.0          | true     | false    |
+      | 18 March 2025    | Accrual                | 2.11   | 0.0       | 2.11     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 19 March 2025    | Repayment              | 611.53 | 437.15    | 4.37     | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 19 March 2025    | Credit Balance Refund  | 170.01 | 0.0       | 0.0      | 0.0  | 0.0       | 0.0          | false    | false    |
+      | 19 March 2025    | Chargeback             | 340.02 | 340.02    | 0.0      | 0.0  | 0.0       | 340.02       | false    | false    |
+      | 19 March 2025    | Repayment              | 340.02 | 340.02    | 0.0      | 0.0  | 0.0       | 0.0          | false    | false    |


(fineract) 01/02: FINERACT-1968: Progressive Loan schedule handling - interest handling (DECLINING BALANCE interest, Same as repayment period, Equal installments)

Posted by ad...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

adamsaghy pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git

commit dfab66132baac1a013789a2cc3bda7d360153a2f
Author: Soma Sörös <so...@dpc.hu>
AuthorDate: Mon Jul 7 14:33:42 2025 +0200

    FINERACT-1968: Progressive Loan schedule handling - interest handling (DECLINING BALANCE interest, Same as repayment period, Equal installments)
---
 .../calc/ProgressiveEMICalculatorTest.java         | 186 +++++++++++++++++++++
 1 file changed, 186 insertions(+)

diff --git a/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/calc/ProgressiveEMICalculatorTest.java b/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/calc/ProgressiveEMICalculatorTest.java
index ae11225e3e..35a4ca6e20 100644
--- a/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/calc/ProgressiveEMICalculatorTest.java
+++ b/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/calc/ProgressiveEMICalculatorTest.java
@@ -104,6 +104,7 @@ class ProgressiveEMICalculatorTest {
     public void setupTestDefaults() {
         Mockito.when(loanProductRelatedDetail.isInterestRecognitionOnDisbursementDate()).thenReturn(false);
         Mockito.when(loanProductRelatedDetail.getDaysInYearCustomStrategy()).thenReturn(null);
+        Mockito.when(loanProductRelatedDetail.getCurrencyData()).thenReturn(currency);
         Mockito.when(loanProductRelatedDetail.getInterestMethod()).thenReturn(InterestMethod.DECLINING_BALANCE);
         Mockito.when(loanProductRelatedDetail.getInterestCalculationPeriodMethod()).thenReturn(InterestCalculationPeriodMethod.DAILY);
         Mockito.when(loanProductRelatedDetail.isAllowPartialPeriodInterestCalculation()).thenReturn(true);
@@ -3767,6 +3768,191 @@ class ProgressiveEMICalculatorTest {
         }
     }
 
+    @Nested
+    public class DecliningBalanceSameAsRepaymentPeriod {
+
+        @BeforeEach
+        void beforeEach() {
+            Mockito.when(loanProductRelatedDetail.getInterestMethod()).thenReturn(InterestMethod.DECLINING_BALANCE);
+            Mockito.when(loanProductRelatedDetail.getInterestCalculationPeriodMethod())
+                    .thenReturn(InterestCalculationPeriodMethod.SAME_AS_REPAYMENT_PERIOD);
+            Mockito.when(loanProductRelatedDetail.getDaysInYearType()).thenReturn(DaysInYearType.ACTUAL.getValue());
+            Mockito.when(loanProductRelatedDetail.getDaysInMonthType()).thenReturn(DaysInMonthType.ACTUAL.getValue());
+        }
+
+        @Test
+        void test_3_of_1_month_period_multi_disbursement__exact_days() {
+
+            final BigDecimal interestRate = BigDecimal.valueOf(12.0);
+            final LocalDate disbursementDate = LocalDate.of(2024, 6, 1);
+
+            Mockito.when(loanProductRelatedDetail.getAnnualNominalInterestRate()).thenReturn(interestRate);
+            Mockito.when(loanProductRelatedDetail.getRepaymentPeriodFrequencyType()).thenReturn(PeriodFrequencyType.MONTHS);
+            Mockito.when(loanProductRelatedDetail.getNumberOfRepayments()).thenReturn(3);
+            Mockito.when(loanProductRelatedDetail.getRepayEvery()).thenReturn(1);
+
+            Mockito.when(loanProductRelatedDetail.isAllowPartialPeriodInterestCalculation()).thenReturn(true);
+
+            final List<LoanScheduleModelRepaymentPeriod> expectedRepaymentPeriods = generateExpectedRepaymentPeriods(disbursementDate);
+            final Integer installmentAmountInMultiplesOf = null;
+
+            final ProgressiveLoanInterestScheduleModel interestSchedule = emiCalculator.generatePeriodInterestScheduleModel(
+                    expectedRepaymentPeriods, loanProductRelatedDetail, List.of(), installmentAmountInMultiplesOf, mc);
+
+            emiCalculator.addDisbursement(interestSchedule, disbursementDate, toMoney(500.0));
+            checkPeriod(interestSchedule, 0, 170.01, 5.00, 165.01, 334.99, false); //
+            checkPeriod(interestSchedule, 1, 170.01, 3.35, 166.66, 168.33, false); //
+            checkPeriod(interestSchedule, 2, 170.01, 1.68, 168.33, 0.00, false); //
+
+            emiCalculator.addDisbursement(interestSchedule, disbursementDate, toMoney(500.0));
+
+            checkPeriod(interestSchedule, 0, 340.02, 10.00, 330.02, 669.98, false); //
+            checkPeriod(interestSchedule, 1, 340.02, 6.70, 333.32, 336.66, false); //
+            checkPeriod(interestSchedule, 2, 340.03, 3.37, 336.66, 0.00, false); //
+
+            final LocalDate disbursementDate2 = LocalDate.of(2024, 7, 15);
+            emiCalculator.addDisbursement(interestSchedule, disbursementDate2, toMoney(250.0));
+            checkPeriod(interestSchedule, 0, 340.02, 10.00, 330.02, 669.98, false); //
+            checkPeriod(interestSchedule, 1, 466.33, 8.07, 458.26, 461.72, false); //
+            checkPeriod(interestSchedule, 2, 466.34, 4.62, 461.72, 0.00, false); //
+        }
+
+        @Test
+        void test_3_of_1_month_period_multi_disbursement__exact_days__on_period_due_date() {
+
+            final BigDecimal interestRate = BigDecimal.valueOf(12.0);
+            final LocalDate disbursementDate = LocalDate.of(2024, 6, 1);
+
+            Mockito.when(loanProductRelatedDetail.getAnnualNominalInterestRate()).thenReturn(interestRate);
+            Mockito.when(loanProductRelatedDetail.getRepaymentPeriodFrequencyType()).thenReturn(PeriodFrequencyType.MONTHS);
+            Mockito.when(loanProductRelatedDetail.getNumberOfRepayments()).thenReturn(3);
+            Mockito.when(loanProductRelatedDetail.getRepayEvery()).thenReturn(1);
+
+            Mockito.when(loanProductRelatedDetail.isAllowPartialPeriodInterestCalculation()).thenReturn(true);
+
+            final List<LoanScheduleModelRepaymentPeriod> expectedRepaymentPeriods = generateExpectedRepaymentPeriods(disbursementDate);
+            final Integer installmentAmountInMultiplesOf = null;
+
+            final ProgressiveLoanInterestScheduleModel interestSchedule = emiCalculator.generatePeriodInterestScheduleModel(
+                    expectedRepaymentPeriods, loanProductRelatedDetail, List.of(), installmentAmountInMultiplesOf, mc);
+
+            emiCalculator.addDisbursement(interestSchedule, disbursementDate, toMoney(500.0));
+            checkPeriod(interestSchedule, 0, 170.01, 5.00, 165.01, 334.99, false); //
+            checkPeriod(interestSchedule, 1, 170.01, 3.35, 166.66, 168.33, false); //
+            checkPeriod(interestSchedule, 2, 170.01, 1.68, 168.33, 0.00, false); //
+
+            emiCalculator.addDisbursement(interestSchedule, disbursementDate, toMoney(500.0));
+            checkPeriod(interestSchedule, 0, 340.02, 10.00, 330.02, 669.98, false); //
+            checkPeriod(interestSchedule, 1, 340.02, 6.70, 333.32, 336.66, false); //
+            checkPeriod(interestSchedule, 2, 340.03, 3.37, 336.66, 0.00, false); //
+
+            final LocalDate disbursementDate2 = LocalDate.of(2024, 7, 1);
+            emiCalculator.addDisbursement(interestSchedule, disbursementDate2, toMoney(250.0));
+            checkPeriod(interestSchedule, 0, 340.02, 10.00, 330.02, 919.98, false); //
+            checkPeriod(interestSchedule, 1, 466.90, 9.20, 457.70, 462.28, false); //
+            checkPeriod(interestSchedule, 2, 466.90, 4.62, 462.28, 0.00, false); //
+        }
+
+        @Test
+        void test_3_of_1_month_period_multi_disbursement__NOT_exact_days__different_days() {
+
+            final BigDecimal interestRate = BigDecimal.valueOf(12.0);
+            final LocalDate disbursementDate = LocalDate.of(2024, 6, 1);
+
+            Mockito.when(loanProductRelatedDetail.getAnnualNominalInterestRate()).thenReturn(interestRate);
+            Mockito.when(loanProductRelatedDetail.getRepaymentPeriodFrequencyType()).thenReturn(PeriodFrequencyType.MONTHS);
+            Mockito.when(loanProductRelatedDetail.getNumberOfRepayments()).thenReturn(3);
+            Mockito.when(loanProductRelatedDetail.getRepayEvery()).thenReturn(1);
+
+            Mockito.when(loanProductRelatedDetail.isAllowPartialPeriodInterestCalculation()).thenReturn(false);
+
+            final List<LoanScheduleModelRepaymentPeriod> expectedRepaymentPeriods = generateExpectedRepaymentPeriods(disbursementDate);
+            final Integer installmentAmountInMultiplesOf = null;
+
+            final ProgressiveLoanInterestScheduleModel interestSchedule = emiCalculator.generatePeriodInterestScheduleModel(
+                    expectedRepaymentPeriods, loanProductRelatedDetail, List.of(), installmentAmountInMultiplesOf, mc);
+
+            emiCalculator.addDisbursement(interestSchedule, disbursementDate, toMoney(500.0));
+            checkPeriod(interestSchedule, 0, 170.01, 5.00, 165.01, 334.99, false); //
+            checkPeriod(interestSchedule, 1, 170.01, 3.35, 166.66, 168.33, false); //
+            checkPeriod(interestSchedule, 2, 170.01, 1.68, 168.33, 0.00, false); //
+
+            emiCalculator.addDisbursement(interestSchedule, disbursementDate, toMoney(500.0));
+            checkPeriod(interestSchedule, 0, 340.02, 10.00, 330.02, 669.98, false); //
+            checkPeriod(interestSchedule, 1, 340.02, 6.70, 333.32, 336.66, false); //
+            checkPeriod(interestSchedule, 2, 340.03, 3.37, 336.66, 0.00, false); //
+
+            final LocalDate disbursementDate2 = LocalDate.of(2024, 7, 1);
+            final LocalDate disbursementDate3 = LocalDate.of(2024, 7, 15);
+            final LocalDate disbursementDate4 = LocalDate.of(2024, 7, 23);
+            emiCalculator.addDisbursement(interestSchedule, disbursementDate2, toMoney(50.0));
+            checkPeriod(interestSchedule, 0, 340.02, 10.00, 330.02, 719.98, false); //
+            checkPeriod(interestSchedule, 1, 365.40, 7.20, 358.20, 361.78, false); //
+            checkPeriod(interestSchedule, 2, 365.40, 3.62, 361.78, 0.00, false); //
+
+            emiCalculator.addDisbursement(interestSchedule, disbursementDate3, toMoney(50.0));
+            checkPeriod(interestSchedule, 0, 340.02, 10.00, 330.02, 769.98, false); //
+            checkPeriod(interestSchedule, 1, 390.77, 7.70, 383.07, 386.91, false); //
+            checkPeriod(interestSchedule, 2, 390.78, 3.87, 386.91, 0.00, false); //
+
+            emiCalculator.addDisbursement(interestSchedule, disbursementDate3, toMoney(50.0));
+            checkPeriod(interestSchedule, 0, 340.02, 10.00, 330.02, 819.98, false); //
+            checkPeriod(interestSchedule, 1, 416.15, 8.20, 407.95, 412.03, false); //
+            checkPeriod(interestSchedule, 2, 416.15, 4.12, 412.03, 0.00, false); //
+
+            emiCalculator.addDisbursement(interestSchedule, disbursementDate4, toMoney(50.0));
+            checkPeriod(interestSchedule, 0, 340.02, 10.00, 330.02, 869.98, false); //
+            checkPeriod(interestSchedule, 1, 441.53, 8.70, 432.83, 437.15, false); //
+            checkPeriod(interestSchedule, 2, 441.52, 4.37, 437.15, 0.00, false); //
+
+            emiCalculator.addDisbursement(interestSchedule, disbursementDate4, toMoney(50.0));
+            checkPeriod(interestSchedule, 0, 340.02, 10.00, 330.02, 919.98, false); //
+            checkPeriod(interestSchedule, 1, 466.90, 9.20, 457.70, 462.28, false); //
+            checkPeriod(interestSchedule, 2, 466.90, 4.62, 462.28, 0.00, false); //
+        }
+
+        @Test
+        void test_3_of_1_month_period_multi_disbursement__NOT_exact_days() {
+
+            final BigDecimal interestRate = BigDecimal.valueOf(12.0);
+            final LocalDate disbursementDate = LocalDate.of(2024, 6, 1);
+
+            Mockito.when(loanProductRelatedDetail.getAnnualNominalInterestRate()).thenReturn(interestRate);
+            Mockito.when(loanProductRelatedDetail.getRepaymentPeriodFrequencyType()).thenReturn(PeriodFrequencyType.MONTHS);
+            Mockito.when(loanProductRelatedDetail.getNumberOfRepayments()).thenReturn(3);
+            Mockito.when(loanProductRelatedDetail.getRepayEvery()).thenReturn(1);
+
+            Mockito.when(loanProductRelatedDetail.isAllowPartialPeriodInterestCalculation()).thenReturn(false);
+
+            final List<LoanScheduleModelRepaymentPeriod> expectedRepaymentPeriods = generateExpectedRepaymentPeriods(disbursementDate);
+            final Integer installmentAmountInMultiplesOf = null;
+
+            final ProgressiveLoanInterestScheduleModel interestSchedule = emiCalculator.generatePeriodInterestScheduleModel(
+                    expectedRepaymentPeriods, loanProductRelatedDetail, List.of(), installmentAmountInMultiplesOf, mc);
+
+            emiCalculator.addDisbursement(interestSchedule, disbursementDate, toMoney(500.0));
+            checkPeriod(interestSchedule, 0, 170.01, 5.00, 165.01, 334.99, false); //
+            checkPeriod(interestSchedule, 1, 170.01, 3.35, 166.66, 168.33, false); //
+            checkPeriod(interestSchedule, 2, 170.01, 1.68, 168.33, 0.00, false); //
+
+            emiCalculator.addDisbursement(interestSchedule, disbursementDate, toMoney(500.0));
+            checkPeriod(interestSchedule, 0, 340.02, 10.00, 330.02, 669.98, false); //
+            checkPeriod(interestSchedule, 1, 340.02, 6.70, 333.32, 336.66, false); //
+            checkPeriod(interestSchedule, 2, 340.03, 3.37, 336.66, 0.00, false); //
+
+            final LocalDate disbursementDate2 = LocalDate.of(2024, 7, 15);
+            emiCalculator.addDisbursement(interestSchedule, disbursementDate2, toMoney(130.0));
+            checkPeriod(interestSchedule, 0, 340.02, 10.00, 330.02, 799.98, false); //
+            checkPeriod(interestSchedule, 1, 406.00, 8.00, 398.00, 401.98, false); //
+            checkPeriod(interestSchedule, 2, 406.00, 4.02, 401.98, 0.00, false); //
+
+            emiCalculator.addDisbursement(interestSchedule, disbursementDate2, toMoney(120.0));
+            checkPeriod(interestSchedule, 0, 340.02, 10.00, 330.02, 919.98, false); //
+            checkPeriod(interestSchedule, 1, 466.90, 9.20, 457.70, 462.28, false); //
+            checkPeriod(interestSchedule, 2, 466.90, 4.62, 462.28, 0.00, false); //
+        }
+    }
+
     // utilities
     private List<LoanScheduleModelRepaymentPeriod> generateExpectedRepaymentPeriods(LocalDate disbursementDate) {
         return switch (loanProductRelatedDetail.getRepaymentPeriodFrequencyType()) {