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


The following commit(s) were added to refs/heads/develop by this push:
     new f0cc697c6 FINERACT-2333: Accrual handling in case of Charged-off loan
f0cc697c6 is described below

commit f0cc697c6788927d0f42069c14277afc9663bf63
Author: mariiaKraievska <[email protected]>
AuthorDate: Wed Feb 19 14:38:03 2025 +0200

    FINERACT-2333: Accrual handling in case of Charged-off loan
---
 .../test/data/loanproduct/DefaultLoanProduct.java  |   1 +
 .../global/LoanProductGlobalInitializerStep.java   |  29 ++
 .../fineract/test/support/TestContextKey.java      |   1 +
 .../src/test/resources/features/BatchApi.feature   |   1 +
 .../test/resources/features/LoanChargeOff.feature  | 311 ++++++++++++++++++++-
 ...dvancedPaymentScheduleTransactionProcessor.java |  83 +++++-
 ...cedPaymentScheduleTransactionProcessorTest.java |   2 +-
 .../starter/LoanAccountAutoStarter.java            |   8 +-
 ...ChargeOffWithAdvancedPaymentAllocationTest.java |   1 +
 .../integrationtests/LoanChargeOffAccrualTest.java |   4 +-
 10 files changed, 426 insertions(+), 15 deletions(-)

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 451333a06..6df7a71fd 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
@@ -101,6 +101,7 @@ public enum DefaultLoanProduct implements LoanProduct {
     
LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALC_EMI_360_30_CHARGEBACK_PRINCIPAL_INTEREST_FEE,
 //
     
LP2_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR_LAST_INSTALLMENT_STRATEGY,
 //
     LP2_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR_LAST_INSTALLMENT_STRATEGY, //
+    
LP2_ADV_PYMNT_INTEREST_DAILY_INT_RECALCULATION_ZERO_INT_CHARGE_OFF_INT_RECOGNITION_FROM_DISB_DATE,
 //
     ;
 
     @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 c4a878807..36245f3f9 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
@@ -1890,6 +1890,35 @@ public class LoanProductGlobalInitializerStep implements 
FineractGlobalInitializ
         TestContext.INSTANCE.set(
                 
TestContextKey.DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_ACCOUNTING_RULE_NONE,
                 
responseLoanProductsRequestLP2AdvancedpaymentInterest36030InterestRecalcAccountingRuleNone);
+
+        // LP2 with progressive loan schedule + horizontal
+        // + interest recalculation + interest recognition from disbursement 
date enabled
+        // 
(LP2_ADV_PYMNT_INTEREST_DAILY_INT_RECALCULATION_ZERO_INT_CHARGE_OFF_INT_RECOGNITION_FROM_DISB_DATE)
+        String name79 = 
DefaultLoanProduct.LP2_ADV_PYMNT_INTEREST_DAILY_INT_RECALCULATION_ZERO_INT_CHARGE_OFF_INT_RECOGNITION_FROM_DISB_DATE
+                .getName();
+        PostLoanProductsRequest 
loanProductsRequestLP2AdvPaymentInterestRecalcDailyZeroIntChargeOffIntRecognitionFromDisbDate
 = loanProductsRequestFactory
+                .defaultLoanProductsRequestLP2Emi()//
+                .name(name79)//
+                .daysInYearType(DaysInYearType.DAYS360.value)//
+                .daysInMonthType(DaysInMonthType.DAYS30.value)//
+                .isInterestRecalculationEnabled(true)//
+                .preClosureInterestCalculationStrategy(1)//
+                .rescheduleStrategyMethod(4)//
+                .interestRecalculationCompoundingMethod(0)//
+                .recalculationRestFrequencyType(2)//
+                .recalculationRestFrequencyInterval(1)//
+                .interestRecognitionOnDisbursementDate(true)//
+                .paymentAllocation(List.of(//
+                        createPaymentAllocation("DEFAULT", 
"NEXT_INSTALLMENT"), //
+                        createPaymentAllocation("GOODWILL_CREDIT", 
"LAST_INSTALLMENT"), //
+                        createPaymentAllocation("MERCHANT_ISSUED_REFUND", 
"REAMORTIZATION"), //
+                        createPaymentAllocation("PAYOUT_REFUND", 
"NEXT_INSTALLMENT"))) //
+                .chargeOffBehaviour("ZERO_INTEREST");//
+        Response<PostLoanProductsResponse> 
responseLoanProductsRequestLP2AdvPaymentInterestRecalcDailyZeroIntChargeOffIntRecognitionFromDisbDate
 = loanProductsApi
+                
.createLoanProduct(loanProductsRequestLP2AdvPaymentInterestRecalcDailyZeroIntChargeOffIntRecognitionFromDisbDate).execute();
+        TestContext.INSTANCE.set(
+                
TestContextKey.DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_INTEREST_DAILY_INT_RECALCULATION_ZERO_INT_CHARGE_OFF_INT_RECOGNITION_FROM_DISB_DATE,
+                
responseLoanProductsRequestLP2AdvPaymentInterestRecalcDailyZeroIntChargeOffIntRecognitionFromDisbDate);
     }
 
     public static AdvancedPaymentData createPaymentAllocation(String 
transactionType, String futureInstallmentAllocationRule,
diff --git 
a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/TestContextKey.java
 
b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/TestContextKey.java
index 40546c174..07902adfd 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
@@ -91,6 +91,7 @@ public abstract class TestContextKey {
     public static final String 
DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30 = 
"loanProductCreateResponseLP2AdvancedPaymentInterestDailyEmi36030";
     public static final String 
DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE
 = 
"loanProductCreateResponseLP2AdvancedPaymentInterestDailyEmi36030InterestRecalculationDailyTillPreClose";
     public static final String 
DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_ACCOUNTING_RULE_NONE
 = 
"loanProductCreateResponseLP2AdvancedPaymentInterestDailyEmi36030InterestRecalculationAccountingRuleNone";
+    public static final String 
DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_INTEREST_DAILY_INT_RECALCULATION_ZERO_INT_CHARGE_OFF_INT_RECOGNITION_FROM_DISB_DATE
 = 
"loanProductCreateResponseLP2AdvancedPaymentInterestDailyInterestRecalculationDailyZeroInterestChargeOffInterestRecognitionFromDisbursementDate";
     public static final String temp = 
"loanProductCreateResponseLP2AdvancedPaymentInterestDailyEmi36030InterestRecalculationDailyNoCalcOnPastDueTillPreClose";
     public static final String 
DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE_LAST_INSTALLMENT
 = 
"loanProductCreateResponseLP2AdvancedPaymentInterestDailyEmi36030InterestRecalculationDailyTillPreCloseLastInstallment";
     public static final String 
DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE_PMT_ALLOC_1
 = 
"loanProductCreateResponseLP2AdvancedPaymentInterestDailyEmi36030InterestRecalculationDailyTillPreClosePmtAlloc1";
diff --git 
a/fineract-e2e-tests-runner/src/test/resources/features/BatchApi.feature 
b/fineract-e2e-tests-runner/src/test/resources/features/BatchApi.feature
index fd0702b8d..d76e10abb 100644
--- a/fineract-e2e-tests-runner/src/test/resources/features/BatchApi.feature
+++ b/fineract-e2e-tests-runner/src/test/resources/features/BatchApi.feature
@@ -139,5 +139,6 @@ Feature: Batch API
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        |
+      | 01 February 2024 | Accrual          | 0.58   | 0.0       | 0.58     | 
0.0  | 0.0       | 0.0          |
       | 01 February 2024 | Charge-off       | 83.57  | 83.57     | 0.0      | 
0.0  | 0.0       | 0.0          |
     And Admin checks the loan has been charged-off on "01 February 2024"
\ No newline at end of file
diff --git 
a/fineract-e2e-tests-runner/src/test/resources/features/LoanChargeOff.feature 
b/fineract-e2e-tests-runner/src/test/resources/features/LoanChargeOff.feature
index 3c4964770..4043996a9 100644
--- 
a/fineract-e2e-tests-runner/src/test/resources/features/LoanChargeOff.feature
+++ 
b/fineract-e2e-tests-runner/src/test/resources/features/LoanChargeOff.feature
@@ -1611,6 +1611,7 @@ Feature: Charge-off
     Then Loan Transactions tab has the following data:
       | Transaction date | Transaction Type | Amount  | Principal | Interest | 
Fees   | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 1000.0  | 0.0       | 0.0      | 
0.0    | 0.0       | 1000.0       | false    | false    |
+      | 28 February 2024 | Accrual          | 36.96   | 0.0       | 36.96    | 
0.0    | 0.0       | 0.0          | false    | false    |
       | 28 February 2024 | Charge-off       | 1220.23 | 1000.0    | 54.75    | 
105.48 | 60.0      | 0.0          | false    | false    |
     Then Admin fails to disburse the loan on "28 February 2024" with "500" EUR 
transaction amount because of charge-off that was performed for the loan
     When Customer makes "REPAYMENT" transaction with "AUTOPAY" payment type on 
"28 February 2024" with 500 EUR transaction amount and system-generated 
Idempotency key
@@ -1687,6 +1688,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 June 2024     | Disbursement     | 250.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 250.0        | false    | false    |
       | 02 June 2024     | Accrual          | 0.07   | 0.0       | 0.07     | 
0.0  | 0.0       | 0.0          | false    | false    |
+      | 03 June 2024     | Accrual          | 0.07   | 0.0       | 0.07     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 03 June 2024     | Charge-off       | 255.23 | 250.0     | 5.23     | 
0.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3338 @AdvancedPaymentAllocation
@@ -1744,6 +1746,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 June 2024     | Disbursement     | 250.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 250.0        | false    | false    |
       | 02 June 2024     | Accrual          | 0.07   | 0.0       | 0.07     | 
0.0  | 0.0       | 0.0          | false    | false    |
+      | 03 June 2024     | Accrual          | 0.07   | 0.0       | 0.07     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 03 June 2024     | Charge-off       | 255.23 | 250.0     | 5.23     | 
0.0  | 0.0       | 0.0          | false    | false    |
     When Admin sets the business date to "06 June 2024"
     Then Admin does a charge-off undo the loan
@@ -1766,8 +1769,9 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 June 2024     | Disbursement     | 250.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 250.0        | false    | false    |
       | 02 June 2024     | Accrual          | 0.07   | 0.0       | 0.07     | 
0.0  | 0.0       | 0.0          | false    | false    |
+      | 03 June 2024     | Accrual          | 0.07   | 0.0       | 0.07     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 03 June 2024     | Charge-off       | 255.23 | 250.0     | 5.23     | 
0.0  | 0.0       | 0.0          | true     | false    |
-      | 06 June 2024     | Accrual          | 0.28   | 0.0       | 0.28     | 
0.0  | 0.0       | 0.0          | false    | false    |
+      | 06 June 2024     | Accrual          | 0.21   | 0.0       | 0.21     | 
0.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3326 @AdvancedPaymentAllocation
   Scenario: Verify the repayment schedule is updated before the Charge-off in 
case of interest recalculation = true
@@ -1862,6 +1866,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 June 2024     | Disbursement     | 250.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 250.0        | false    | false    |
       | 02 June 2024     | Accrual          | 0.07   | 0.0       | 0.07     | 
0.0  | 0.0       | 0.0          | false    | false    |
+      | 03 June 2024     | Accrual          | 0.07   | 0.0       | 0.07     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 03 June 2024     | Charge-off       | 255.23 | 250.0     | 5.23     | 
0.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3338 @AdvancedPaymentAllocation
@@ -1919,6 +1924,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 June 2024     | Disbursement     | 250.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 250.0        | false    | false    |
       | 02 June 2024     | Accrual          | 0.07   | 0.0       | 0.07     | 
0.0  | 0.0       | 0.0          | false    | false    |
+      | 03 June 2024     | Accrual          | 0.07   | 0.0       | 0.07     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 03 June 2024     | Charge-off       | 255.23 | 250.0     | 5.23     | 
0.0  | 0.0       | 0.0          | false    | false    |
     When Admin sets the business date to "06 June 2024"
     Then Admin does a charge-off undo the loan
@@ -1941,8 +1947,9 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 June 2024     | Disbursement     | 250.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 250.0        | false    | false    |
       | 02 June 2024     | Accrual          | 0.07   | 0.0       | 0.07     | 
0.0  | 0.0       | 0.0          | false    | false    |
+      | 03 June 2024     | Accrual          | 0.07   | 0.0       | 0.07     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 03 June 2024     | Charge-off       | 255.23 | 250.0     | 5.23     | 
0.0  | 0.0       | 0.0          | true     | false    |
-      | 06 June 2024     | Accrual          | 0.28   | 0.0       | 0.28     | 
0.0  | 0.0       | 0.0          | false    | false    |
+      | 06 June 2024     | Accrual          | 0.21   | 0.0       | 0.21     | 
0.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3326 @AdvancedPaymentAllocation
   Scenario: Verify the repayment schedule is updated before the Charge-off in 
case of interest recalculation = true
@@ -2031,6 +2038,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 01 March 2024    | Accrual          | 1.07   | 0.0       | 1.07     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 01 March 2024    | Charge-off       | 84.06  | 83.57     | 0.49     | 
0.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3340
@@ -2086,6 +2094,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 29 February 2024 | Accrual          | 1.05   | 0.0       | 1.05     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 29 February 2024 | Charge-off       | 84.04  | 83.57     | 0.47     | 
0.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3341
@@ -2141,6 +2150,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 14 February 2024 | Accrual          | 0.8    | 0.0       | 0.8      | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 14 February 2024 | Charge-off       | 83.79  | 83.57     | 0.22     | 
0.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3342
@@ -2202,6 +2212,7 @@ Feature: Charge-off
       | 01 March 2024    | Repayment        | 17.01  | 16.52     | 0.49     | 
0.0  | 0.0       | 67.05        | false    | false    |
       | 01 April 2024    | Repayment        | 17.01  | 16.62     | 0.39     | 
0.0  | 0.0       | 50.43        | false    | false    |
       | 01 May 2024      | Repayment        | 17.01  | 16.72     | 0.29     | 
0.0  | 0.0       | 33.71        | false    | false    |
+      | 15 July 2024     | Accrual          | 2.15   | 0.0       | 2.15     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 15 July 2024     | Charge-off       | 34.11  | 33.71     | 0.4      | 
0.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3343
@@ -2257,6 +2268,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 31 March 2024    | Accrual          | 1.54   | 0.0       | 1.54     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 31 March 2024    | Charge-off       | 84.53  | 83.57     | 0.96     | 
0.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3344
@@ -2312,6 +2324,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 31 March 2024    | Accrual          | 1.54   | 0.0       | 1.54     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 31 March 2024    | Charge-off       | 84.53  | 83.57     | 0.96     | 
0.0  | 0.0       | 0.0          | false    | false    |
 #  ----- backdated repayment  on 1 March made on 31 March ----- #
     And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR 
transaction amount
@@ -2332,6 +2345,7 @@ Feature: Charge-off
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
       | 01 March 2024    | Repayment        | 17.01  | 16.52     | 0.49     | 
0.0  | 0.0       | 67.05        | false    | false    |
+      | 31 March 2024    | Accrual          | 1.54   | 0.0       | 1.54     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 31 March 2024    | Charge-off       | 67.43  | 67.05     | 0.38     | 
0.0  | 0.0       | 0.0          | false    | true     |
 
   @TestRailId:C3345
@@ -2387,6 +2401,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 29 February 2024 | Accrual          | 1.05   | 0.0       | 1.05     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 29 February 2024 | Charge-off       | 84.04  | 83.57     | 0.47     | 
0.0  | 0.0       | 0.0          | false    | false    |
 #  ----- repayment reversal of 1st February  ----- #
     When Customer undo "1"th "Repayment" transaction made on "01 February 2024"
@@ -2406,6 +2421,8 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | true     | false    |
+      | 29 February 2024 | Accrual          | 1.05   | 0.0       | 1.05     | 
0.0  | 0.0       | 0.0          | false    | false    |
+      | 29 February 2024 | Accrual          | 0.09   | 0.0       | 0.09     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 29 February 2024 | Charge-off       | 101.14 | 100.0     | 1.14     | 
0.0  | 0.0       | 0.0          | false    | true     |
     And In Loan Transactions the "2"th Transaction has Transaction 
type="Repayment" and is reverted
 
@@ -2463,6 +2480,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 29 February 2024 | Accrual          | 1.05   | 0.0       | 1.05     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 29 February 2024 | Charge-off       | 84.04  | 83.57     | 0.47     | 
0.0  | 0.0       | 0.0          | false    | false    |
 #  ----- repayment after charge off on 1st March  ----- #
     When Admin sets the business date to "1 March 2024"
@@ -2483,6 +2501,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 29 February 2024 | Accrual          | 1.05   | 0.0       | 1.05     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 29 February 2024 | Charge-off       | 84.04  | 83.57     | 0.47     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 01 March 2024    | Repayment        | 17.01  | 16.54     | 0.47     | 
0.0  | 0.0       | 67.03        | false    | false    |
 
@@ -2542,6 +2561,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 22.01  | 16.43     | 0.58     | 
5.0  | 0.0       | 83.57        | false    | false    |
+      | 29 February 2024 | Accrual          | 1.05   | 0.0       | 1.05     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 29 February 2024 | Charge-off       | 87.04  | 83.57     | 0.47     | 
3.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3348
@@ -2599,6 +2619,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 22.01  | 16.43     | 0.58     | 
5.0  | 0.0       | 83.57        | false    | false    |
+      | 29 February 2024 | Accrual          | 1.05   | 0.0       | 1.05     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 29 February 2024 | Charge-off       | 87.04  | 83.57     | 0.47     | 
3.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3349
@@ -2658,6 +2679,7 @@ Feature: Charge-off
       | 01 January 2024  | Disbursement       | 100.0  | 0.0       | 0.0      
| 0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment          | 22.01  | 16.43     | 0.58     
| 5.0  | 0.0       | 83.57        | false    | false    |
       | 29 February 2024 | Waive loan charges | 3.0    | 0.0       | 0.0      
| 0.0  | 0.0       | 83.57        | false    | false    |
+      | 29 February 2024 | Accrual            | 1.05   | 0.0       | 1.05     
| 0.0  | 0.0       | 0.0          | false    | false    |
       | 29 February 2024 | Charge-off         | 84.04  | 83.57     | 0.47     
| 0.0  | 0.0       | 0.0          | false    | true     |
 
   @TestRailId:C3412
@@ -2715,6 +2737,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 22.01  | 16.43     | 0.58     | 
5.0  | 0.0       | 83.57        | false    | false    |
+      | 29 February 2024 | Accrual          | 1.05   | 0.0       | 1.05     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 29 February 2024 | Charge-off       | 87.04  | 83.57     | 0.47     | 
3.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3413
@@ -2939,6 +2962,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 15 January 2024  | Repayment        | 17.01  | 17.01     | 0.0      | 
0.0  | 0.0       | 82.99        | false    | false    |
+      | 29 February 2024 | Accrual          | 1.0    | 0.0       | 1.0      | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 29 February 2024 | Charge-off       | 83.99  | 82.99     | 1.0      | 
0.0  | 0.0       | 0.0          | false    | false    |
     And Admin set 
"LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF" 
loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future 
installment allocation rule
 
@@ -2977,6 +3001,7 @@ Feature: Charge-off
     Then Loan Transactions tab has the following data:
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance |
       | 01 January 2023  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        |
+      | 14 February 2023 | Accrual          | 0.85   | 0.0       | 0.85     | 
0.0  | 0.0       | 0.0          |
       | 14 February 2023 | Charge-off       | 100.85 | 100.0     | 0.85     | 
0.0  | 0.0       | 0.0          |
     And Admin does a charge-off undo the loan
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
@@ -2994,6 +3019,7 @@ Feature: Charge-off
     Then Loan Transactions tab has the following data:
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance |
       | 01 January 2023  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        |
+      | 14 February 2023 | Accrual          | 0.85   | 0.0       | 0.85     | 
0.0  | 0.0       | 0.0          |
       | 14 February 2023 | Charge-off       | 100.85 | 100.0     | 0.85     | 
0.0  | 0.0       | 0.0          |
 
   @TestRailId:C3352 @AdvancedPaymentAllocation
@@ -3052,6 +3078,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 01 March 2024    | Accrual          | 1.07   | 0.0       | 1.07     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 01 March 2024    | Charge-off       | 84.06  | 83.57     | 0.49     | 
0.0  | 0.0       | 0.0          | false    | false    |
     When Admin sets the business date to "1 March 2024"
     And Admin does a charge-off undo the loan
@@ -3071,6 +3098,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 01 March 2024    | Accrual          | 1.07   | 0.0       | 1.07     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 01 March 2024    | Charge-off       | 84.06  | 83.57     | 0.49     | 
0.0  | 0.0       | 0.0          | true     | false    |
 
   @TestRailId:C3353 @AdvancedPaymentAllocation
@@ -3129,6 +3157,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 29 February 2024 | Accrual          | 1.05   | 0.0       | 1.05     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 29 February 2024 | Charge-off       | 84.04  | 83.57     | 0.47     | 
0.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3354 @AdvancedPaymentAllocation
@@ -3187,6 +3216,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 14 February 2024 | Accrual          | 0.8    | 0.0       | 0.8      | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 14 February 2024 | Charge-off       | 83.79  | 83.57     | 0.22     | 
0.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3355 @AdvancedPaymentAllocation
@@ -3262,6 +3292,7 @@ Feature: Charge-off
       | 01 March 2024    | Repayment        | 17.01  | 16.52     | 0.49     | 
0.0  | 0.0       | 67.05        | false    | false    |
       | 01 April 2024    | Repayment        | 17.01  | 16.62     | 0.39     | 
0.0  | 0.0       | 50.43        | false    | false    |
       | 01 May 2024      | Repayment        | 17.01  | 16.72     | 0.29     | 
0.0  | 0.0       | 33.71        | false    | false    |
+      | 15 July 2024     | Accrual          | 2.15   | 0.0       | 2.15     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 15 July 2024     | Charge-off       | 34.11  | 33.71     | 0.4      | 
0.0  | 0.0       | 0.0          | false    | false    |
     Given Global configuration 
"is-principal-compounding-disabled-for-overdue-loans" is disabled
 
@@ -3322,6 +3353,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 31 March 2024    | Accrual          | 1.54   | 0.0       | 1.54     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 31 March 2024    | Charge-off       | 84.53  | 83.57     | 0.96     | 
0.0  | 0.0       | 0.0          | false    | false    |
     When Admin sets the business date to "02 April 2024"
     When Admin runs inline COB job for Loan
@@ -3339,6 +3371,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 31 March 2024    | Accrual          | 1.54   | 0.0       | 1.54     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 31 March 2024    | Charge-off       | 84.53  | 83.57     | 0.96     | 
0.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3357 @AdvancedPaymentAllocation
@@ -3399,6 +3432,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 31 March 2024    | Accrual          | 1.54   | 0.0       | 1.54     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 31 March 2024    | Charge-off       | 84.53  | 83.57     | 0.96     | 
0.0  | 0.0       | 0.0          | false    | false    |
 #    --- Backdated repayment ---
     And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR 
transaction amount
@@ -3419,6 +3453,7 @@ Feature: Charge-off
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
       | 01 March 2024    | Repayment        | 17.01  | 16.52     | 0.49     | 
0.0  | 0.0       | 67.05        | false    | false    |
+      | 31 March 2024    | Accrual          | 1.54   | 0.0       | 1.54     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 31 March 2024    | Charge-off       | 67.43  | 67.05     | 0.38     | 
0.0  | 0.0       | 0.0          | false    | true     |
     And Global configuration 
"is-principal-compounding-disabled-for-overdue-loans" is disabled
 
@@ -3479,6 +3514,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 29 February 2024 | Accrual          | 1.05   | 0.0       | 1.05     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 29 February 2024 | Charge-off       | 84.04  | 83.57     | 0.47     | 
0.0  | 0.0       | 0.0          | false    | false    |
     When Customer undo "1"th repayment on "01 February 2024"
     Then Loan Repayment schedule has 2 periods, with the following data for 
periods:
@@ -3496,6 +3532,8 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | true     | false    |
+      | 29 February 2024 | Accrual          | 1.05   | 0.0       | 1.05     | 
0.0  | 0.0       | 0.0          | false    | false    |
+      | 29 February 2024 | Accrual          | 0.09   | 0.0       | 0.09     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 29 February 2024 | Charge-off       | 101.14 | 100.0     | 1.14     | 
0.0  | 0.0       | 0.0          | false    | true     |
     And Global configuration 
"is-principal-compounding-disabled-for-overdue-loans" is disabled
 
@@ -3556,6 +3594,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 29 February 2024 | Accrual          | 1.05   | 0.0       | 1.05     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 29 February 2024 | Charge-off       | 84.04  | 83.57     | 0.47     | 
0.0  | 0.0       | 0.0          | false    | false    |
     When Admin sets the business date to "01 March 2024"
     And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR 
transaction amount
@@ -3571,6 +3610,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 29 February 2024 | Accrual          | 1.05   | 0.0       | 1.05     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 29 February 2024 | Charge-off       | 84.04  | 83.57     | 0.47     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 01 March 2024    | Repayment        | 17.01  | 16.54     | 0.47     | 
0.0  | 0.0       | 67.03        | false    | false    |
     And Global configuration 
"is-principal-compounding-disabled-for-overdue-loans" is disabled
@@ -3634,6 +3674,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 15 January 2024  | Repayment        | 17.01  | 17.01     | 0.0      | 
0.0  | 0.0       | 82.99        | false    | false    |
+      | 29 February 2024 | Accrual          | 0.9    | 0.0       | 0.9      | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 29 February 2024 | Charge-off       | 83.89  | 82.99     | 0.9      | 
0.0  | 0.0       | 0.0          | false    | false    |
 
   @Skip @TestRailId:C3361 @AdvancedPaymentAllocation
@@ -3794,6 +3835,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 20.98  | 13.98     | 7.0      | 
0.0  | 0.0       | 86.02        | false    | false    |
+      | 02 April 2024    | Accrual          | 19.24  | 0.0       | 19.24    | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 02 April 2024    | Charge-off       | 108.57 | 86.02     | 22.55    | 
0.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3363
@@ -3849,6 +3891,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 01 March 2024    | Accrual          | 1.07   | 0.0       | 1.07     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 01 March 2024    | Charge-off       | 84.06  | 83.57     | 0.49     | 
0.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3364
@@ -3904,6 +3947,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 29 February 2024 | Accrual          | 1.05   | 0.0       | 1.05     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 29 February 2024 | Charge-off       | 84.04  | 83.57     | 0.47     | 
0.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3365
@@ -3959,6 +4003,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 14 February 2024 | Accrual          | 0.8    | 0.0       | 0.8      | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 14 February 2024 | Charge-off       | 83.79  | 83.57     | 0.22     | 
0.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3366
@@ -4020,6 +4065,7 @@ Feature: Charge-off
       | 01 March 2024    | Repayment        | 17.01  | 16.52     | 0.49     | 
0.0  | 0.0       | 67.05        | false    | false    |
       | 01 April 2024    | Repayment        | 17.01  | 16.62     | 0.39     | 
0.0  | 0.0       | 50.43        | false    | false    |
       | 01 May 2024      | Repayment        | 17.01  | 16.72     | 0.29     | 
0.0  | 0.0       | 33.71        | false    | false    |
+      | 15 July 2024     | Accrual          | 2.05   | 0.0       | 2.05     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 15 July 2024     | Charge-off       | 34.01  | 33.71     | 0.3      | 
0.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3367
@@ -4075,6 +4121,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 31 March 2024    | Accrual          | 1.45   | 0.0       | 1.45     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 31 March 2024    | Charge-off       | 84.44  | 83.57     | 0.87     | 
0.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3368
@@ -4130,6 +4177,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 31 March 2024    | Accrual          | 1.45   | 0.0       | 1.45     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 31 March 2024    | Charge-off       | 84.44  | 83.57     | 0.87     | 
0.0  | 0.0       | 0.0          | false    | false    |
 #  ----- backdated repayment  on 1 March made on 31 March ----- #
     And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR 
transaction amount
@@ -4150,6 +4198,7 @@ Feature: Charge-off
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
       | 01 March 2024    | Repayment        | 17.01  | 16.52     | 0.49     | 
0.0  | 0.0       | 67.05        | false    | false    |
+      | 31 March 2024    | Accrual          | 1.45   | 0.0       | 1.45     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 31 March 2024    | Charge-off       | 67.43  | 67.05     | 0.38     | 
0.0  | 0.0       | 0.0          | false    | true     |
 
   @TestRailId:C3369
@@ -4205,6 +4254,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 29 February 2024 | Accrual          | 1.05   | 0.0       | 1.05     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 29 February 2024 | Charge-off       | 84.04  | 83.57     | 0.47     | 
0.0  | 0.0       | 0.0          | false    | false    |
 #  ----- repayment reversal of 1st February  ----- #
     When Customer undo "1"th "Repayment" transaction made on "01 February 2024"
@@ -4224,6 +4274,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | true     | false    |
+      | 29 February 2024 | Accrual          | 1.05   | 0.0       | 1.05     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 29 February 2024 | Charge-off       | 101.05 | 100.0     | 1.05     | 
0.0  | 0.0       | 0.0          | false    | true     |
     And In Loan Transactions the "2"th Transaction has Transaction 
type="Repayment" and is reverted
 
@@ -4281,6 +4332,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 29 February 2024 | Accrual          | 1.05   | 0.0       | 1.05     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 29 February 2024 | Charge-off       | 84.04  | 83.57     | 0.47     | 
0.0  | 0.0       | 0.0          | false    | false    |
 #  ----- repayment after charge off on 1st March  ----- #
     When Admin sets the business date to "1 March 2024"
@@ -4301,6 +4353,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 29 February 2024 | Accrual          | 1.05   | 0.0       | 1.05     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 29 February 2024 | Charge-off       | 84.04  | 83.57     | 0.47     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 01 March 2024    | Repayment        | 17.01  | 16.54     | 0.47     | 
0.0  | 0.0       | 67.03        | false    | false    |
 
@@ -4360,6 +4413,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 22.01  | 16.43     | 0.58     | 
5.0  | 0.0       | 83.57        | false    | false    |
+      | 29 February 2024 | Accrual          | 1.05   | 0.0       | 1.05     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 29 February 2024 | Charge-off       | 87.04  | 83.57     | 0.47     | 
3.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3372
@@ -4417,6 +4471,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 22.01  | 16.43     | 0.58     | 
5.0  | 0.0       | 83.57        | false    | false    |
+      | 29 February 2024 | Accrual          | 1.05   | 0.0       | 1.05     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 29 February 2024 | Charge-off       | 87.04  | 83.57     | 0.47     | 
3.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3373
@@ -4476,6 +4531,7 @@ Feature: Charge-off
       | 01 January 2024  | Disbursement       | 100.0  | 0.0       | 0.0      
| 0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment          | 22.01  | 16.43     | 0.58     
| 5.0  | 0.0       | 83.57        | false    | false    |
       | 29 February 2024 | Waive loan charges | 3.0    | 0.0       | 0.0      
| 0.0  | 0.0       | 83.57        | false    | false    |
+      | 29 February 2024 | Accrual            | 1.05   | 0.0       | 1.05     
| 0.0  | 0.0       | 0.0          | false    | false    |
       | 29 February 2024 | Charge-off         | 84.04  | 83.57     | 0.47     
| 0.0  | 0.0       | 0.0          | false    | true     |
 
   @TestRailId:C3414
@@ -4530,10 +4586,11 @@ Feature: Charge-off
       | Principal due | Interest | Fees | Penalties | Due    | Paid  | In 
advance | Late | Waived | Outstanding |
       | 100           | 1.05     | 8.0  | 0         | 109.05 | 22.01 | 0       
   | 0    | 0.0    | 87.04       |
     Then Loan Transactions tab has the following data:
-      | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
-      | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
-      | 01 February 2024 | Repayment        | 22.01  | 16.43     | 0.58     | 
5.0  | 0.0       | 83.57        | false    | false    |
-      | 29 February 2024 | Charge-off       | 87.04  | 83.57     | 0.47     | 
3.0  | 0.0       | 0.0          | false    | false    |
+      | Transaction date | Transaction Type  | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
+      | 01 January 2024  | Disbursement      | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
+      | 01 February 2024 | Repayment         | 22.01  | 16.43     | 0.58     | 
5.0  | 0.0       | 83.57        | false    | false    |
+      | 29 February 2024 | Accrual           | 1.05   | 0.0       | 1.05     | 
0.0  | 0.0       | 0.0          | false    | false    |
+      | 29 February 2024 | Charge-off        | 87.04  | 83.57     | 0.47     | 
3.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3415
   Scenario: Backdated charge-off with charge is added after the charge off 
date when loan behavior is zero-interest with interestRecalculation disabled is 
forbidden - UC9.5
@@ -4757,6 +4814,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 15 January 2024  | Repayment        | 17.01  | 16.91     | 0.1      | 
0.0  | 0.0       | 83.09        | false    | false    |
+      | 29 February 2024 | Accrual          | 1.05   | 0.0       | 1.05     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 29 February 2024 | Charge-off       | 84.14  | 83.09     | 1.05     | 
0.0  | 0.0       | 0.0          | false    | false    |
     And Admin set "LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF" loan product 
"DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation 
rule
 
@@ -4814,6 +4872,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 15 January 2024  | Repayment        | 17.15  | 16.94     | 0.21     | 
0.0  | 0.0       | 83.06        | false    | false    |
+      | 29 February 2024 | Accrual          | 1.03   | 0.0       | 1.03     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 29 February 2024 | Charge-off       | 84.09  | 83.06     | 1.03     | 
0.0  | 0.0       | 0.0          | false    | false    |
     And Admin set "LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF_BEHAVIOUR" loan 
product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment 
allocation rule
 
@@ -4852,6 +4911,7 @@ Feature: Charge-off
     Then Loan Transactions tab has the following data:
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance |
       | 01 January 2023  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        |
+      | 14 February 2023 | Accrual          | 0.8    | 0.0       | 0.8      | 
0.0  | 0.0       | 0.0          |
       | 14 February 2023 | Charge-off       | 100.8  | 100.0     | 0.8      | 
0.0  | 0.0       | 0.0          |
     And Admin does a charge-off undo the loan
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
@@ -4869,6 +4929,7 @@ Feature: Charge-off
     Then Loan Transactions tab has the following data:
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance |
       | 01 January 2023  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        |
+      | 14 February 2023 | Accrual          | 0.8    | 0.0       | 0.8      | 
0.0  | 0.0       | 0.0          |
       | 14 February 2023 | Charge-off       | 100.8  | 100.0     | 0.8      | 
0.0  | 0.0       | 0.0          |
 
   @TestRailId:C3379
@@ -4924,6 +4985,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 29 February 2024 | Accrual          | 1.05   | 0.0       | 1.05     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 29 February 2024 | Charge-off       | 84.04  | 83.57     | 0.47     | 
0.0  | 0.0       | 0.0          | false    | false    |
     Then Loan Transactions tab has a "CHARGE_OFF" transaction with date "29 
February 2024" which has the following Journal entries:
       | Type    | Account code | Account name               | Debit | Credit |
@@ -4985,6 +5047,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 29 February 2024 | Accrual          | 1.05   | 0.0       | 1.05     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 29 February 2024 | Charge-off       | 84.04  | 83.57     | 0.47     | 
0.0  | 0.0       | 0.0          | false    | false    |
     Then Loan Transactions tab has a "CHARGE_OFF" transaction with date "29 
February 2024" which has the following Journal entries:
       | Type    | Account code | Account name               | Debit | Credit |
@@ -5046,6 +5109,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 29 February 2024 | Accrual          | 1.05   | 0.0       | 1.05     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 29 February 2024 | Charge-off       | 84.04  | 83.57     | 0.47     | 
0.0  | 0.0       | 0.0          | false    | false    |
     Then Loan Transactions tab has a "CHARGE_OFF" transaction with date "29 
February 2024" which has the following Journal entries:
       | Type    | Account code | Account name               | Debit | Credit |
@@ -5112,6 +5176,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 01 March 2024    | Accrual          | 1.07   | 0.0       | 1.07     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 01 March 2024    | Charge-off       | 92.06  | 83.57     | 0.49     | 
8.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3461
@@ -5173,6 +5238,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 01 March 2024    | Accrual          | 1.07   | 0.0       | 1.07     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 01 March 2024    | Charge-off       | 99.06  | 83.57     | 0.49     | 
5.0  | 10.0      | 0.0          | false    | false    |
 
   @TestRailId:C3462
@@ -5234,6 +5300,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 01 March 2024    | Accrual          | 1.07   | 0.0       | 1.07     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 01 March 2024    | Charge-off       | 99.06  | 83.57     | 0.49     | 
5.0  | 10.0      | 0.0          | false    | false    |
     And Admin waives due date charge
     Then Loan Repayment schedule has 2 periods, with the following data for 
periods:
@@ -5249,6 +5316,7 @@ Feature: Charge-off
       | 01 January 2024  | Disbursement       | 100.0  | 0.0       | 0.0      
| 0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment          | 17.01  | 16.43     | 0.58     
| 0.0  | 0.0       | 83.57        | false    | false    |
       | 15 February 2024 | Waive loan charges | 5.0    | 0.0       | 0.0      
| 0.0  | 0.0       | 83.57        | false    | false    |
+      | 01 March 2024    | Accrual            | 1.07   | 0.0       | 1.07     
| 0.0  | 0.0       | 0.0          | false    | false    |
       | 01 March 2024    | Charge-off         | 94.06  | 83.57     | 0.49     
| 0.0  | 10.0      | 0.0          | false    | true     |
 
   @TestRailId:C3463
@@ -5309,6 +5377,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 01 March 2024    | Accrual          | 1.07   | 0.0       | 1.07     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 01 March 2024    | Charge-off       | 89.06  | 83.57     | 0.49     | 
5.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3464
@@ -5370,6 +5439,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 01 March 2024    | Accrual          | 1.07   | 0.0       | 1.07     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 01 March 2024    | Charge-off       | 91.06  | 83.57     | 0.49     | 
7.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3465
@@ -5431,6 +5501,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 15 February 2024 | Accrual          | 0.82   | 0.0       | 0.82     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 15 February 2024 | Charge-off       | 98.81  | 83.57     | 0.24     | 
5.0  | 10.0      | 0.0          | false    | false    |
 
   @TestRailId:C3466
@@ -5492,6 +5563,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
+      | 15 February 2024 | Accrual          | 0.82   | 0.0       | 0.82     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 15 February 2024 | Charge-off       | 98.81  | 83.57     | 0.24     | 
5.0  | 10.0      | 0.0          | false    | false    |
     And Admin waives charge
     Then Loan Repayment schedule has 3 periods, with the following data for 
periods:
@@ -5508,6 +5580,7 @@ Feature: Charge-off
       | 01 January 2024  | Disbursement       | 100.0  | 0.0       | 0.0      
| 0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment          | 17.01  | 16.43     | 0.58     
| 0.0  | 0.0       | 83.57        | false    | false    |
       | 15 February 2024 | Waive loan charges | 10.0   | 0.0       | 0.0      
| 0.0  | 0.0       | 83.57        | false    | false    |
+      | 15 February 2024 | Accrual            | 0.82   | 0.0       | 0.82     
| 0.0  | 0.0       | 0.0          | false    | false    |
       | 15 February 2024 | Charge-off         | 88.81  | 83.57     | 0.24     
| 5.0  | 0.0       | 0.0          | false    | true     |
 
   @TestRailId:C3497 @AdvancedPaymentAllocation
@@ -5566,6 +5639,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 15 January 2024  | Repayment        | 17.01  | 17.01     | 0.0      | 
0.0  | 0.0       | 82.99        | false    | false    |
+      | 29 February 2024 | Accrual          | 1.0    | 0.0       | 1.0      | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 29 February 2024 | Charge-off       | 83.99  | 82.99     | 1.0      | 
0.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3498 @AdvancedPaymentAllocation
@@ -5644,6 +5718,7 @@ Feature: Charge-off
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
       | 15 February 2024 | Repayment        | 17.01  | 16.77     | 0.24     | 
0.0  | 0.0       | 66.8         | false    | true     |
+      | 29 February 2024 | Accrual          | 1.0    | 0.0       | 1.0      | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 29 February 2024 | Charge-off       | 66.98  | 66.8      | 0.18     | 
0.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3499 @AdvancedPaymentAllocation
@@ -5700,6 +5775,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 15 January 2024  | Repayment        | 17.04  | 16.6      | 0.44     | 
0.0  | 0.0       | 83.4         | false    | true     |
+      | 29 February 2024 | Accrual          | 1.03   | 0.0       | 1.03     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 29 February 2024 | Charge-off       | 83.99  | 83.4      | 0.59     | 
0.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3500 @AdvancedPaymentAllocation
@@ -5777,6 +5853,7 @@ Feature: Charge-off
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.0   | 16.41     | 0.59     | 
0.0  | 0.0       | 83.59        | false    | false    |
       | 15 February 2024 | Repayment        | 17.04  | 16.6      | 0.44     | 
0.0  | 0.0       | 66.99        | false    | true     |
+      | 29 February 2024 | Accrual          | 1.03   | 0.0       | 1.03     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 29 February 2024 | Charge-off       | 66.99  | 66.99     | 0.0      | 
0.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3467
@@ -5834,6 +5911,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.0   | 16.41     | 0.59     | 
0.0  | 0.0       | 83.59        | false    | false    |
+      | 01 March 2024    | Accrual          | 1.05   | 0.0       | 1.05     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 01 March 2024    | Charge-off       | 89.05  | 83.59     | 0.46     | 
5.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3468
@@ -5892,6 +5970,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.0   | 16.41     | 0.59     | 
0.0  | 0.0       | 83.59        | false    | false    |
+      | 01 March 2024    | Accrual          | 1.05   | 0.0       | 1.05     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 01 March 2024    | Charge-off       | 92.05  | 83.59     | 0.46     | 
8.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3469
@@ -5951,6 +6030,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.0   | 16.41     | 0.59     | 
0.0  | 0.0       | 83.59        | false    | false    |
+      | 01 March 2024    | Accrual          | 1.05   | 0.0       | 1.05     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 01 March 2024    | Charge-off       | 99.05  | 83.59     | 0.46     | 
5.0  | 10.0      | 0.0          | false    | false    |
 
   @TestRailId:C3470
@@ -6010,6 +6090,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.0   | 16.41     | 0.59     | 
0.0  | 0.0       | 83.59        | false    | false    |
+      | 01 March 2024    | Accrual          | 1.05   | 0.0       | 1.05     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 01 March 2024    | Charge-off       | 99.05  | 83.59     | 0.46     | 
5.0  | 10.0      | 0.0          | false    | false    |
     And Admin waives due date charge
     Then Loan Repayment schedule has 2 periods, with the following data for 
periods:
@@ -6025,6 +6106,7 @@ Feature: Charge-off
       | 01 January 2024  | Disbursement       | 100.0  | 0.0       | 0.0      
| 0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment          | 17.0   | 16.41     | 0.59     
| 0.0  | 0.0       | 83.59        | false    | false    |
       | 15 February 2024 | Waive loan charges | 5.0    | 0.0       | 0.0      
| 0.0  | 0.0       | 83.59        | false    | false    |
+      | 01 March 2024    | Accrual            | 1.05   | 0.0       | 1.05     
| 0.0  | 0.0       | 0.0          | false    | false    |
       | 01 March 2024    | Charge-off         | 94.05  | 83.59     | 0.46     
| 0.0  | 10.0      | 0.0          | false    | true     |
 
   @TestRailId:C3471
@@ -6083,6 +6165,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.0   | 16.41     | 0.59     | 
0.0  | 0.0       | 83.59        | false    | false    |
+      | 01 March 2024    | Accrual          | 1.05   | 0.0       | 1.05     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 01 March 2024    | Charge-off       | 89.05  | 83.59     | 0.46     | 
5.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3472
@@ -6142,6 +6225,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.0   | 16.41     | 0.59     | 
0.0  | 0.0       | 83.59        | false    | false    |
+      | 01 March 2024    | Accrual          | 1.05   | 0.0       | 1.05     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 01 March 2024    | Charge-off       | 91.05  | 83.59     | 0.46     | 
7.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3473
@@ -6201,6 +6285,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.0   | 16.41     | 0.59     | 
0.0  | 0.0       | 83.59        | false    | false    |
+      | 15 February 2024 | Accrual          | 0.81   | 0.0       | 0.81     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 15 February 2024 | Charge-off       | 98.81  | 83.59     | 0.22     | 
5.0  | 10.0      | 0.0          | false    | false    |
 
   @TestRailId:C3474
@@ -6260,6 +6345,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment        | 17.0   | 16.41     | 0.59     | 
0.0  | 0.0       | 83.59        | false    | false    |
+      | 15 February 2024 | Accrual          | 0.81   | 0.0       | 0.81     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 15 February 2024 | Charge-off       | 98.81  | 83.59     | 0.22     | 
5.0  | 10.0      | 0.0          | false    | false    |
     And Admin waives charge
     Then Loan Repayment schedule has 3 periods, with the following data for 
periods:
@@ -6276,6 +6362,7 @@ Feature: Charge-off
       | 01 January 2024  | Disbursement       | 100.0  | 0.0       | 0.0      
| 0.0  | 0.0       | 100.0        | false    | false    |
       | 01 February 2024 | Repayment          | 17.0   | 16.41     | 0.59     
| 0.0  | 0.0       | 83.59        | false    | false    |
       | 15 February 2024 | Waive loan charges | 10.0   | 0.0       | 0.0      
| 0.0  | 0.0       | 83.59        | false    | false    |
+      | 15 February 2024 | Accrual            | 0.81   | 0.0       | 0.81     
| 0.0  | 0.0       | 0.0          | false    | false    |
       | 15 February 2024 | Charge-off         | 88.81  | 83.59     | 0.22     
| 5.0  | 0.0       | 0.0          | false    | true     |
 
   @TestRailId:C3508
@@ -6338,6 +6425,7 @@ Feature: Charge-off
       | Transaction date | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance | Reverted | Replayed |
       | 01 January 2023  | Disbursement     | 1000.0 | 0.0       | 0.0      | 
0.0  | 0.0       | 1000.0       | false    | false    |
       | 15 January 2023  | Repayment        | 170.09 | 167.46    | 2.63     | 
0.0  | 0.0       | 832.54       | false    | false    |
+      | 31 January 2023  | Accrual          | 5.14   | 0.0       | 5.14     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 31 January 2023  | Charge-off       | 835.05 | 832.54    | 2.51     | 
0.0  | 0.0       | 0.0          | false    | false    |
 
   @TestRailId:C3511
@@ -6473,4 +6561,213 @@ Feature: Charge-off
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
       | 01 January 2024  | Accrual          | 2.05   | 0.0       | 2.05     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 15 January 2024  | Repayment        | 17.01  | 16.75     | 0.26     | 
0.0  | 0.0       | 83.25        | false    | false    |
-      | 01 March 2024    | Charge-off       | 84.99  | 83.25     | 1.74     | 
0.0  | 0.0       | 0.0          | false    | false    |
\ No newline at end of file
+      | 01 March 2024    | Charge-off       | 84.99  | 83.25     | 1.74     | 
0.0  | 0.0       | 0.0          | false    | false    |
+
+  @TestRailId:C3513
+  Scenario: Accrual handling in case of charged-off loan when loan behavior is 
zero-interest with interestRecalculation enabled, interest recognition from 
disbursement date = FALSE
+    When Admin sets the business date to "2 January 2024"
+    And Admin creates a client with random data
+    And Admin creates a fully customized loan with the following data:
+      | LoanProduct                                                            
       | submitted on date | with Principal | ANNUAL interest rate % | interest 
type     | interest calculation period | amortization type  | loanTermFrequency 
| loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | 
numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | 
interest free period | Payment strategy            |
+      | 
LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF  | 
01 January 2024   | 100            | 7                      | DECLINING_BALANCE 
| DAILY                       | EQUAL_INSTALLMENTS | 6                 | MONTHS 
               | 1              | MONTHS                 | 6                  | 
0                       | 0                      | 0                    | 
ADVANCED_PAYMENT_ALLOCATION |
+    Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
+      | Nr | Days | Date             | Paid date | Balance of loan | Principal 
due | Interest | Fees  | Penalties | Due     | Paid | In advance | Late | 
Outstanding |
+      |    |      | 01 January 2024  |           | 100.0           |           
    |          | 0.0   |           | 0.0     |      |            |      | 0.0   
      |
+      | 1  | 31   | 01 February 2024 |           | 83.57           | 16.43     
    | 0.58     | 0.0   | 0.0       | 17.01   | 0.0  | 0.0        | 0.0  | 17.01 
      |
+      | 2  | 29   | 01 March 2024    |           | 67.05           | 16.52     
    | 0.49     | 0.0   | 0.0       | 17.01   | 0.0  | 0.0        | 0.0  | 17.01 
      |
+      | 3  | 31   | 01 April 2024    |           | 50.43           | 16.62     
    | 0.39     | 0.0   | 0.0       | 17.01   | 0.0  | 0.0        | 0.0  | 17.01 
      |
+      | 4  | 30   | 01 May 2024      |           | 33.71           | 16.72     
       | 0.29     | 0.0   | 0.0       | 17.01   | 0.0  | 0.0        | 0.0  | 
17.01           |
+      | 5  | 31   | 01 June 2024     |           | 16.9            | 16.81     
    | 0.2      | 0.0   | 0.0       | 17.01      | 0.0  | 0.0        | 0.0  | 
17.01           |
+      | 6  | 30   | 01 July 2024     |           | 0.0             | 16.9      
    | 0.1      | 0.0   | 0.0       | 17.0       | 0.0  | 0.0        | 0.0  | 
17.0            |
+    Then Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid | In 
advance | Late | Outstanding |
+      | 100           | 2.05     | 0    | 0         | 102.05  | 0    | 0       
   | 0    | 102.05      |
+    And Admin successfully approves the loan on "1 January 2024" with "100" 
amount and expected disbursement date on "1 January 2024"
+    And Admin successfully disburse the loan on "1 January 2024" with "100" 
EUR transaction amount
+    When Admin runs inline COB job for Loan
+    When Admin sets the business date to "31 January 2024"
+    When Admin runs inline COB job for Loan
+    Then Loan Transactions tab has the following data:
+      | Transaction date | Transaction Type | Amount  | Principal | Interest | 
Fees  | Penalties | Loan Balance | Reverted | Replayed |
+      | 01 January 2024  | Disbursement     | 100.0   | 0.0       | 0.0      | 
0.0   | 0.0       | 100.0        | false    | false    |
+      | 02 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 03 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 04 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 05 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 06 January 2024  | Accrual          | 0.01    | 0.0       | 0.01     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 07 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 08 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 09 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 10 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 11 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 12 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 13 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 14 January 2024  | Accrual          | 0.01    | 0.0       | 0.01     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 15 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 16 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 17 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 18 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 19 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 20 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 21 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 22 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 23 January 2024  | Accrual          | 0.01    | 0.0       | 0.01     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 24 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 25 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 26 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 27 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 28 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 29 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 30 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+    And Admin does charge-off the loan on "31 January 2024"
+    Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
+      | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees  | Penalties | Due     | Paid | In advance | 
Late | Outstanding |
+      |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0   |           | 0.0     | 0.0  |            |      
|             |
+      | 1  | 31   | 01 February 2024 |                  | 83.55           | 
16.45         | 0.56     | 0.0   | 0.0       | 17.01   | 0.0  | 0.0        | 
0.0  | 17.01       |
+      | 2  | 29   | 01 March 2024    |                  | 66.54           | 
17.01         | 0.0      | 0.0   | 0.0       | 17.01   | 0.0  | 0.0        | 
0.0  | 17.01       |
+      | 3  | 31   | 01 April 2024    |                  | 49.53           | 
17.01         | 0.0      | 0.0   | 0.0       | 17.01   | 0.0  | 0.0        | 
0.0  | 17.01       |
+      | 4  | 30   | 01 May 2024      |                  | 32.52           | 
17.01            | 0.0      | 0.0   | 0.0       | 17.01   | 0.0  | 0.0        | 
0.0  | 17.01           |
+      | 5  | 31   | 01 June 2024     |                  | 15.51           | 
17.01         | 0.0      | 0.0   | 0.0       | 17.01   | 0.0  | 0.0        | 
0.0  | 17.01      |
+      | 6  | 30   | 01 July 2024     |                  | 0.0             | 
15.51         | 0.0      | 0.0   | 0.0       | 15.51   | 0.0  | 0.0        | 
0.0  | 15.51      |
+    Then Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid | In 
advance | Late | Outstanding |
+      | 100           | 0.56     | 0    | 0         | 100.56  | 0.0  | 0       
   | 0    | 100.56      |
+    Then Loan Transactions tab has the following data:
+      | Transaction date | Transaction Type | Amount  | Principal | Interest | 
Fees  | Penalties | Loan Balance | Reverted | Replayed |
+      | 01 January 2024  | Disbursement     | 100.0   | 0.0       | 0.0      | 
0.0   | 0.0       | 100.0        | false    | false    |
+      | 02 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 03 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 04 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 05 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 06 January 2024  | Accrual          | 0.01    | 0.0       | 0.01     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 07 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 08 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 09 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 10 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 11 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 12 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 13 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 14 January 2024  | Accrual          | 0.01    | 0.0       | 0.01     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 15 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 16 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 17 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 18 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 19 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 20 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 21 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 22 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 23 January 2024  | Accrual          | 0.01    | 0.0       | 0.01     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 24 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 25 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 26 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 27 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 28 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 29 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 30 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 31 January 2024  | Accrual          | 0.01    | 0.0       | 0.01     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 31 January 2024  | Charge-off       | 100.56  | 100.0     | 0.56     | 
0.0   | 0.0       | 0.0          | false    | false    |
+
+  @TestRailId:C3514
+  Scenario: Accrual handling in case of charged-off loan when loan behavior is 
zero-interest with interestRecalculation enabled, interest recognition from 
disbursement date = TRUE
+    When Admin sets the business date to "2 January 2024"
+    And Admin creates a client with random data
+    And Admin creates a fully customized loan with the following data:
+      | LoanProduct                                                            
                           | submitted on date | with Principal | ANNUAL 
interest rate % | interest type     | interest calculation period | 
amortization type  | loanTermFrequency | loanTermFrequencyType | repaymentEvery 
| repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | 
graceOnInterestPayment | interest free period | Payment strategy            |
+      | 
LP2_ADV_PYMNT_INTEREST_DAILY_INT_RECALCULATION_ZERO_INT_CHARGE_OFF_INT_RECOGNITION_FROM_DISB_DATE
 | 01 January 2024   | 100            | 7                      | 
DECLINING_BALANCE | DAILY                       | EQUAL_INSTALLMENTS | 6        
         | MONTHS                | 1              | MONTHS                 | 6  
                | 0                       | 0                      | 0          
          | ADVANCED_PAYMENT_ALLOCATION |
+    Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
+      | Nr | Days | Date             | Paid date | Balance of loan | Principal 
due | Interest | Fees  | Penalties | Due     | Paid | In advance | Late | 
Outstanding |
+      |    |      | 01 January 2024  |           | 100.0           |           
    |          | 0.0   |           | 0.0     |      |            |      | 0.0   
      |
+      | 1  | 31   | 01 February 2024 |           | 83.57           | 16.43     
    | 0.58     | 0.0   | 0.0       | 17.01   | 0.0  | 0.0        | 0.0  | 17.01 
      |
+      | 2  | 29   | 01 March 2024    |           | 67.05           | 16.52     
    | 0.49     | 0.0   | 0.0       | 17.01   | 0.0  | 0.0        | 0.0  | 17.01 
      |
+      | 3  | 31   | 01 April 2024    |           | 50.43           | 16.62     
    | 0.39     | 0.0   | 0.0       | 17.01   | 0.0  | 0.0        | 0.0  | 17.01 
      |
+      | 4  | 30   | 01 May 2024      |           | 33.71           | 16.72     
       | 0.29     | 0.0   | 0.0       | 17.01   | 0.0  | 0.0        | 0.0  | 
17.01           |
+      | 5  | 31   | 01 June 2024     |           | 16.9            | 16.81     
    | 0.2      | 0.0   | 0.0       | 17.01      | 0.0  | 0.0        | 0.0  | 
17.01           |
+      | 6  | 30   | 01 July 2024     |           | 0.0             | 16.9      
    | 0.1      | 0.0   | 0.0       | 17.0       | 0.0  | 0.0        | 0.0  | 
17.0            |
+    Then Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid | In 
advance | Late | Outstanding |
+      | 100           | 2.05     | 0    | 0         | 102.05  | 0    | 0       
   | 0    | 102.05      |
+    And Admin successfully approves the loan on "1 January 2024" with "100" 
amount and expected disbursement date on "1 January 2024"
+    And Admin successfully disburse the loan on "1 January 2024" with "100" 
EUR transaction amount
+    When Admin runs inline COB job for Loan
+    When Admin sets the business date to "31 January 2024"
+    When Admin runs inline COB job for Loan
+    Then Loan Transactions tab has the following data:
+      | Transaction date | Transaction Type | Amount  | Principal | Interest | 
Fees  | Penalties | Loan Balance | Reverted | Replayed |
+      | 01 January 2024  | Disbursement     | 100.0   | 0.0       | 0.0      | 
0.0   | 0.0       | 100.0        | false    | false    |
+      | 01 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 02 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 03 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 04 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 05 January 2024  | Accrual          | 0.01    | 0.0       | 0.01     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 06 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 07 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 08 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 09 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 10 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 11 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 12 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 13 January 2024  | Accrual          | 0.01    | 0.0       | 0.01     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 14 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 15 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 16 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 17 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 18 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 19 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 20 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 21 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 22 January 2024  | Accrual          | 0.01    | 0.0       | 0.01     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 23 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 24 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 25 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 26 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 27 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 28 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 29 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 30 January 2024  | Accrual          | 0.01    | 0.0       | 0.01     | 
0.0   | 0.0       | 0.0          | false    | false    |
+    And Admin does charge-off the loan on "31 January 2024"
+    Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
+      | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees  | Penalties | Due     | Paid | In advance | 
Late | Outstanding |
+      |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0   |           | 0.0     | 0.0  |            |      
|             |
+      | 1  | 31   | 01 February 2024 |                  | 83.55           | 
16.45         | 0.56     | 0.0   | 0.0       | 17.01   | 0.0  | 0.0        | 
0.0  | 17.01       |
+      | 2  | 29   | 01 March 2024    |                  | 66.54           | 
17.01         | 0.0      | 0.0   | 0.0       | 17.01   | 0.0  | 0.0        | 
0.0  | 17.01       |
+      | 3  | 31   | 01 April 2024    |                  | 49.53           | 
17.01         | 0.0      | 0.0   | 0.0       | 17.01   | 0.0  | 0.0        | 
0.0  | 17.01       |
+      | 4  | 30   | 01 May 2024      |                  | 32.52           | 
17.01            | 0.0      | 0.0   | 0.0       | 17.01   | 0.0  | 0.0        | 
0.0  | 17.01           |
+      | 5  | 31   | 01 June 2024     |                  | 15.51           | 
17.01         | 0.0      | 0.0   | 0.0       | 17.01   | 0.0  | 0.0        | 
0.0  | 17.01      |
+      | 6  | 30   | 01 July 2024     |                  | 0.0             | 
15.51         | 0.0      | 0.0   | 0.0       | 15.51   | 0.0  | 0.0        | 
0.0  | 15.51      |
+    Then Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due     | Paid | In 
advance | Late | Outstanding |
+      | 100           | 0.56     | 0    | 0         | 100.56  | 0.0  | 0       
   | 0    | 100.56      |
+    Then Loan Transactions tab has the following data:
+      | Transaction date | Transaction Type | Amount  | Principal | Interest | 
Fees  | Penalties | Loan Balance | Reverted | Replayed |
+      | 01 January 2024  | Disbursement     | 100.0   | 0.0       | 0.0      | 
0.0   | 0.0       | 100.0        | false    | false    |
+      | 01 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 02 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 03 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 04 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 05 January 2024  | Accrual          | 0.01    | 0.0       | 0.01     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 06 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 07 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 08 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 09 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 10 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 11 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 12 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 13 January 2024  | Accrual          | 0.01    | 0.0       | 0.01     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 14 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 15 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 16 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 17 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 18 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 19 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 20 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 21 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 22 January 2024  | Accrual          | 0.01    | 0.0       | 0.01     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 23 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 24 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 25 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 26 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 27 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 28 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 29 January 2024  | Accrual          | 0.02    | 0.0       | 0.02     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 30 January 2024  | Accrual          | 0.01    | 0.0       | 0.01     | 
0.0   | 0.0       | 0.0          | false    | false    |
+      | 31 January 2024  | Charge-off       | 100.56  | 100.0     | 0.56     | 
0.0   | 0.0       | 0.0          | false    | false    |
diff --git 
a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/AdvancedPaymentScheduleTransactionProcessor.java
 
b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/AdvancedPaymentScheduleTransactionProcessor.java
index 131951e9c..8d1855b7f 100644
--- 
a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/AdvancedPaymentScheduleTransactionProcessor.java
+++ 
b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/AdvancedPaymentScheduleTransactionProcessor.java
@@ -21,6 +21,7 @@ package 
org.apache.fineract.portfolio.loanaccount.domain.transactionprocessor.im
 import static java.math.BigDecimal.ZERO;
 import static java.util.stream.Collectors.mapping;
 import static java.util.stream.Collectors.toList;
+import static 
org.apache.fineract.portfolio.loanaccount.domain.LoanTransaction.accrueTransaction;
 import static 
org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionRelationTypeEnum.CHARGEBACK;
 import static 
org.apache.fineract.portfolio.loanproduct.domain.AllocationType.FEE;
 import static 
org.apache.fineract.portfolio.loanproduct.domain.AllocationType.INTEREST;
@@ -60,6 +61,7 @@ import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.lang3.tuple.Pair;
 import 
org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom;
 import org.apache.fineract.infrastructure.core.service.DateUtils;
+import org.apache.fineract.infrastructure.core.service.ExternalIdFactory;
 import org.apache.fineract.infrastructure.core.service.MathUtil;
 import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency;
 import org.apache.fineract.organisation.monetary.domain.Money;
@@ -81,6 +83,7 @@ import 
org.apache.fineract.portfolio.loanaccount.domain.LoanTransaction;
 import 
org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionComparator;
 import 
org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionRelation;
 import 
org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionRelationTypeEnum;
+import 
org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionRepository;
 import 
org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionToRepaymentScheduleMapping;
 import 
org.apache.fineract.portfolio.loanaccount.domain.reaging.LoanReAgeParameter;
 import 
org.apache.fineract.portfolio.loanaccount.domain.transactionprocessor.AbstractLoanRepaymentScheduleTransactionProcessor;
@@ -109,9 +112,11 @@ public class AdvancedPaymentScheduleTransactionProcessor 
extends AbstractLoanRep
     public static final String ADVANCED_PAYMENT_ALLOCATION_STRATEGY = 
"advanced-payment-allocation-strategy";
     public static final String ADVANCED_PAYMENT_ALLOCATION_STRATEGY_NAME = 
"Advanced payment allocation strategy";
 
-    public final EMICalculator emiCalculator;
-    public final LoanRepositoryWrapper loanRepositoryWrapper;
-    public final InterestRefundService interestRefundService;
+    private final EMICalculator emiCalculator;
+    private final LoanRepositoryWrapper loanRepositoryWrapper;
+    private final InterestRefundService interestRefundService;
+    private final LoanTransactionRepository loanTransactionRepository;
+    private final ExternalIdFactory externalIdFactory;
 
     @Override
     public String getCode() {
@@ -1342,6 +1347,11 @@ public class AdvancedPaymentScheduleTransactionProcessor 
extends AbstractLoanRep
             }
         }
 
+        final BigDecimal newInterest = 
getInterestTillChargeOffForPeriod(loanTransaction.getLoan(), 
loanTransaction.getTransactionDate(),
+                transactionCtx);
+        createMissingAccrualTransactionDuringChargeOffIfNeeded(newInterest, 
loanTransaction.getLoan(),
+                loanTransaction.getTransactionDate());
+
         loanTransaction.resetDerivedComponents();
         // determine how much is outstanding total and breakdown for 
principal, interest and charges
         Money principalPortion = Money.zero(transactionCtx.getCurrency());
@@ -2267,4 +2277,71 @@ public class AdvancedPaymentScheduleTransactionProcessor 
extends AbstractLoanRep
             processSingleTransaction(processTransaction, transactionCtx);
         }
     }
+
+    private BigDecimal getInterestTillChargeOffForPeriod(final Loan loan, 
final LocalDate chargeOffDate,
+            final TransactionCtx transactionCtx) {
+        BigDecimal interestTillChargeOff = BigDecimal.ZERO;
+        final MonetaryCurrency currency = loan.getCurrency();
+
+        final List<LoanRepaymentScheduleInstallment> installments = 
loan.getRepaymentScheduleInstallments().stream()
+                .filter(i -> !i.isAdditional()).toList();
+
+        for (LoanRepaymentScheduleInstallment installment : installments) {
+            final boolean isPastPeriod = 
!installment.getDueDate().isAfter(chargeOffDate);
+            final boolean isInPeriod = 
!installment.getFromDate().isAfter(chargeOffDate) && 
installment.getDueDate().isAfter(chargeOffDate);
+
+            BigDecimal interest = BigDecimal.ZERO;
+
+            if (isPastPeriod) {
+                interest = 
installment.getInterestCharged(currency).minus(installment.getCreditedInterest()).getAmount();
+            } else if (isInPeriod) {
+                if (transactionCtx instanceof ProgressiveTransactionCtx 
progressiveTransactionCtx
+                        && 
loan.isInterestBearingAndInterestRecalculationEnabled()) {
+                    interest = emiCalculator
+                            
.getPeriodInterestTillDate(progressiveTransactionCtx.getModel(), 
installment.getDueDate(), chargeOffDate, true)
+                            .getAmount();
+                } else {
+                    final BigDecimal totalInterest = 
installment.getInterestOutstanding(currency).getAmount();
+                    if 
(LoanChargeOffBehaviour.ZERO_INTEREST.equals(loan.getLoanProductRelatedDetail().getChargeOffBehaviour())
+                            || LoanChargeOffBehaviour.ACCELERATE_MATURITY
+                                    
.equals(loan.getLoanProductRelatedDetail().getChargeOffBehaviour())) {
+                        interest = totalInterest;
+                    } else {
+                        final long totalDaysInPeriod = 
ChronoUnit.DAYS.between(installment.getFromDate(), installment.getDueDate());
+                        final long daysTillChargeOff = 
ChronoUnit.DAYS.between(installment.getFromDate(), chargeOffDate);
+                        final MathContext mc = MoneyHelper.getMathContext();
+
+                        interest = Money.of(currency, 
totalInterest.divide(BigDecimal.valueOf(totalDaysInPeriod), mc)
+                                
.multiply(BigDecimal.valueOf(daysTillChargeOff), mc), mc).getAmount();
+                    }
+                }
+            }
+            interestTillChargeOff = interestTillChargeOff.add(interest);
+        }
+
+        return interestTillChargeOff;
+    }
+
+    private void createMissingAccrualTransactionDuringChargeOffIfNeeded(final 
BigDecimal newInterest, final Loan loan,
+            final LocalDate chargeOffDate) {
+        final List<LoanRepaymentScheduleInstallment> relevantInstallments = 
loan.getRepaymentScheduleInstallments().stream()
+                .filter(i -> !i.getFromDate().isAfter(chargeOffDate)).toList();
+
+        if (relevantInstallments.isEmpty()) {
+            return;
+        }
+
+        final BigDecimal sumOfAccrualsTillChargeOff = 
loan.getLoanTransactions().stream()
+                .filter(lt -> lt.isAccrual() && 
!lt.getTransactionDate().isAfter(chargeOffDate))
+                .map(lt -> 
Optional.ofNullable(lt.getInterestPortion()).orElse(BigDecimal.ZERO)).reduce(BigDecimal.ZERO,
 BigDecimal::add);
+
+        final BigDecimal missingAccrualAmount = 
newInterest.subtract(sumOfAccrualsTillChargeOff);
+
+        if (missingAccrualAmount.compareTo(BigDecimal.ZERO) > 0) {
+            final LoanTransaction newAccrualTransaction = 
accrueTransaction(loan, loan.getOffice(), chargeOffDate, missingAccrualAmount,
+                    missingAccrualAmount, ZERO, ZERO, 
externalIdFactory.create());
+            loan.addLoanTransaction(newAccrualTransaction);
+            loanTransactionRepository.saveAndFlush(newAccrualTransaction);
+        }
+    }
 }
diff --git 
a/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/AdvancedPaymentScheduleTransactionProcessorTest.java
 
b/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/AdvancedPaymentScheduleTransactionProcessorTest.java
index ca646447c..9a9a5ef1c 100644
--- 
a/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/AdvancedPaymentScheduleTransactionProcessorTest.java
+++ 
b/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/AdvancedPaymentScheduleTransactionProcessorTest.java
@@ -111,7 +111,7 @@ class AdvancedPaymentScheduleTransactionProcessorTest {
 
     @BeforeEach
     public void setUp() {
-        underTest = new 
AdvancedPaymentScheduleTransactionProcessor(emiCalculator, 
loanRepositoryWrapper, null);
+        underTest = new 
AdvancedPaymentScheduleTransactionProcessor(emiCalculator, 
loanRepositoryWrapper, null, null, null);
 
         ThreadLocalContextUtil.setTenant(new FineractPlatformTenant(1L, 
"default", "Default", "Asia/Kolkata", null));
         ThreadLocalContextUtil.setActionContext(ActionContext.DEFAULT);
diff --git 
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/LoanAccountAutoStarter.java
 
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/LoanAccountAutoStarter.java
index 0f7ce982f..fa20d4eee 100644
--- 
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/LoanAccountAutoStarter.java
+++ 
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/LoanAccountAutoStarter.java
@@ -19,8 +19,10 @@
 package org.apache.fineract.portfolio.loanaccount.starter;
 
 import java.util.List;
+import org.apache.fineract.infrastructure.core.service.ExternalIdFactory;
 import 
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleTransactionProcessorFactory;
 import org.apache.fineract.portfolio.loanaccount.domain.LoanRepositoryWrapper;
+import 
org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionRepository;
 import 
org.apache.fineract.portfolio.loanaccount.domain.transactionprocessor.LoanRepaymentScheduleTransactionProcessor;
 import 
org.apache.fineract.portfolio.loanaccount.domain.transactionprocessor.impl.AdvancedPaymentScheduleTransactionProcessor;
 import 
org.apache.fineract.portfolio.loanaccount.domain.transactionprocessor.impl.CreocoreLoanRepaymentScheduleTransactionProcessor;
@@ -109,7 +111,9 @@ public class LoanAccountAutoStarter {
     @Conditional(AdvancedPaymentScheduleTransactionProcessorCondition.class)
     public AdvancedPaymentScheduleTransactionProcessor 
advancedPaymentScheduleTransactionProcessor(EMICalculator emiCalculator,
             LoanRepositoryWrapper loanRepositoryWrapper,
-            @Lazy ProgressiveLoanInterestRefundServiceImpl 
progressiveLoanInterestRefundService) {
-        return new AdvancedPaymentScheduleTransactionProcessor(emiCalculator, 
loanRepositoryWrapper, progressiveLoanInterestRefundService);
+            @Lazy ProgressiveLoanInterestRefundServiceImpl 
progressiveLoanInterestRefundService,
+            LoanTransactionRepository loanTransactionRepository, 
ExternalIdFactory externalIdFactory) {
+        return new AdvancedPaymentScheduleTransactionProcessor(emiCalculator, 
loanRepositoryWrapper, progressiveLoanInterestRefundService,
+                loanTransactionRepository, externalIdFactory);
     }
 }
diff --git 
a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountChargeOffWithAdvancedPaymentAllocationTest.java
 
b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountChargeOffWithAdvancedPaymentAllocationTest.java
index 802c3522f..06c63b642 100644
--- 
a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountChargeOffWithAdvancedPaymentAllocationTest.java
+++ 
b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountChargeOffWithAdvancedPaymentAllocationTest.java
@@ -591,6 +591,7 @@ public class 
LoanAccountChargeOffWithAdvancedPaymentAllocationTest extends BaseL
             verifyTransactions(loanId, //
                     transaction(1000.0d, "Disbursement", "01 January 2024", 
1000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, false), //
                     transaction(170.09d, "Repayment", "15 January 2024", 
832.54, 167.46, 2.63, 0.0, 0.0, 0.0, 0.0, false), //
+                    transaction(5.14d, "Accrual", "31 January 2024", 0.0, 0.0, 
5.14, 0.0, 0.0, 0.0, 0.0, false), //
                     transaction(835.05d, "Charge-off", "31 January 2024", 0.0, 
832.54, 2.51, 0.0, 0.0, 0.0, 0.0, false) //
             );
         });
diff --git 
a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanChargeOffAccrualTest.java
 
b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanChargeOffAccrualTest.java
index 5c3730e93..cdd8415d5 100644
--- 
a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanChargeOffAccrualTest.java
+++ 
b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanChargeOffAccrualTest.java
@@ -69,7 +69,7 @@ public class LoanChargeOffAccrualTest extends 
BaseLoanIntegrationTest {
             executeInlineCOB(loanId);
             final GetLoansLoanIdResponse loanDetails = 
loanTransactionHelper.getLoanDetails(loanId);
             final List<GetLoansLoanIdTransactions> transactions = 
loanDetails.getTransactions();
-            Assertions.assertTrue(transactions.stream().filter(o -> 
o.getType().getAccrual()).toList().size() == 1);
+            Assertions.assertTrue(transactions.stream().filter(o -> 
o.getType().getAccrual()).toList().size() == 2);
         });
 
         runAt("05 June 2024", () -> {
@@ -78,7 +78,7 @@ public class LoanChargeOffAccrualTest extends 
BaseLoanIntegrationTest {
 
             final GetLoansLoanIdResponse loanDetails = 
loanTransactionHelper.getLoanDetails(loanId);
             final List<GetLoansLoanIdTransactions> transactions = 
loanDetails.getTransactions();
-            Assertions.assertTrue(transactions.stream().filter(o -> 
o.getType().getAccrual()).toList().size() == 2);
+            Assertions.assertTrue(transactions.stream().filter(o -> 
o.getType().getAccrual()).toList().size() == 3);
         });
     }
 }

Reply via email to