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 f504281067 FINERACT-2465: Send a loan account business event during 
charge-off
f504281067 is described below

commit f5042810679e347c79fd50aa19a82ea7dc149c3c
Author: mariiaKraievska <[email protected]>
AuthorDate: Thu Feb 5 13:42:28 2026 +0200

    FINERACT-2465: Send a loan account business event during charge-off
---
 .../src/test/resources/features/LoanCharge.feature |  2 +
 .../test/resources/features/LoanChargeOff.feature  | 72 ++++++++++++++++++++++
 .../features/LoanDelayedScheduleCaptures.feature   |  1 +
 .../features/LoanInterestRateChange.feature        |  4 ++
 .../test/resources/features/LoanReAging.feature    |  5 ++
 .../features/LoanReAgingEqualAmortization.feature  |  6 ++
 .../resources/features/LoanReAmortization.feature  |  8 +++
 .../features/LoanReAmortizationAccruals.feature    |  2 +
 .../test/resources/features/LoanWriteOff.feature   |  2 +
 .../LoanWritePlatformServiceJpaRepositoryImpl.java |  6 ++
 10 files changed, 108 insertions(+)

diff --git 
a/fineract-e2e-tests-runner/src/test/resources/features/LoanCharge.feature 
b/fineract-e2e-tests-runner/src/test/resources/features/LoanCharge.feature
index db82c41d29..68a373a99c 100644
--- a/fineract-e2e-tests-runner/src/test/resources/features/LoanCharge.feature
+++ b/fineract-e2e-tests-runner/src/test/resources/features/LoanCharge.feature
@@ -7163,6 +7163,7 @@ Feature: LoanCharge
       | LIABILITY | 145023       | Suspense/Clearing account | 27.36 |        |
     When Admin sets the business date to "1 March 2024"
     And Admin does charge-off the loan on "1 March 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "01 March 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees  | Penalties | Due   | Paid  | In advance | 
Late | Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0   |           | 0.0   | 0.0   |            |      | 
            |
@@ -7254,6 +7255,7 @@ Feature: LoanCharge
       | LIABILITY | 145023       | Suspense/Clearing account | 27.36 |        |
     When Admin sets the business date to "1 March 2024"
     And Admin does charge-off the loan on "1 March 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "01 March 2024"
     Then Loan Repayment schedule has 2 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees  | Penalties | Due   | Paid  | In advance | 
Late | Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0   |           | 0.0   | 0.0   |            |      | 
            |
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 15d24e7bd1..e897b52945 100644
--- 
a/fineract-e2e-tests-runner/src/test/resources/features/LoanChargeOff.feature
+++ 
b/fineract-e2e-tests-runner/src/test/resources/features/LoanChargeOff.feature
@@ -2096,6 +2096,7 @@ Feature: Charge-off
       | 100           | 2.05     | 0    | 0         | 102.05 | 17.01 | 0       
   | 0    | 85.04       |
     When Admin sets the business date to "1 March 2024"
     And Admin does charge-off the loan on "1 March 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "01 March 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -2152,6 +2153,7 @@ Feature: Charge-off
       | 100           | 2.05     | 0    | 0         | 102.05 | 17.01 | 0       
   | 0    | 85.04       |
     When Admin sets the business date to "29 February 2024"
     And Admin does charge-off the loan on "29 February 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "29 February 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -2208,6 +2210,7 @@ Feature: Charge-off
       | 100           | 2.05     | 0    | 0         | 102.05 | 17.01 | 0       
   | 0    | 85.04       |
     When Admin sets the business date to "14 February 2024"
     And Admin does charge-off the loan on "14 February 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "14 February 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -2267,6 +2270,7 @@ Feature: Charge-off
       | 100           | 2.05     | 0    | 0         | 102.05 | 68.04 | 0       
   | 0    | 34.01       |
     When Admin sets the business date to "15 July 2024"
     And Admin does charge-off the loan on "15 July 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "15 July 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -2326,6 +2330,7 @@ Feature: Charge-off
       | 100           | 2.05     | 0    | 0         | 102.05 | 17.01 | 0       
   | 0    | 85.04       |
     When Admin sets the business date to "31 March 2024"
     And Admin does charge-off the loan on "31 March 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "31 March 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -2382,6 +2387,7 @@ Feature: Charge-off
       | 100           | 2.05     | 0    | 0         | 102.05 | 17.01 | 0       
   | 0    | 85.04       |
     When Admin sets the business date to "31 March 2024"
     And Admin does charge-off the loan on "31 March 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "31 March 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -2460,6 +2466,7 @@ Feature: Charge-off
       | 100           | 2.05     | 0    | 0         | 102.05 | 17.01 | 0       
   | 0    | 85.04       |
     When Admin sets the business date to "29 February 2024"
     And Admin does charge-off the loan on "29 February 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "29 February 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -2539,6 +2546,7 @@ Feature: Charge-off
       | 100           | 2.05     | 0    | 0         | 102.05 | 17.01 | 0       
   | 0    | 85.04       |
     When Admin sets the business date to "29 February 2024"
     And Admin does charge-off the loan on "29 February 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "29 February 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -2620,6 +2628,7 @@ Feature: Charge-off
     When Admin adds "LOAN_SNOOZE_FEE" due date charge with "28 February 2024" 
due date and 3 EUR transaction amount
     When Admin sets the business date to "29 February 2024"
     And Admin does charge-off the loan on "29 February 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "29 February 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -2678,6 +2687,7 @@ Feature: Charge-off
     When Admin sets the business date to "29 February 2024"
     When Admin adds "LOAN_SNOOZE_FEE" due date charge with "29 February 2024" 
due date and 3 EUR transaction amount
     And Admin does charge-off the loan on "29 February 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "29 February 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -2736,6 +2746,7 @@ Feature: Charge-off
     When Admin sets the business date to "29 February 2024"
     When Admin adds "LOAN_SNOOZE_FEE" due date charge with "05 March 2024" due 
date and 3 EUR transaction amount
     And Admin does charge-off the loan on "29 February 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "29 February 2024"
     And Admin waives charge
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Waived | Outstanding |
@@ -2796,6 +2807,7 @@ Feature: Charge-off
     When Admin sets the business date to "29 February 2024"
     When Admin adds "LOAN_SNOOZE_FEE" due date charge with "05 March 2024" due 
date and 3 EUR transaction amount
     And Admin does charge-off the loan on "29 February 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "29 February 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Waived | Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
      |             |
@@ -2958,6 +2970,7 @@ Feature: Charge-off
       | 02 July 2024     | Credit Balance Refund | 3.0    | 3.0       | 0.0    
  | 0.0  | 0.0       | 19.9         | false    | true     |
     When Admin sets the business date to "15 July 2024"
     And Admin does charge-off the loan on "15 July 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "15 July 2024"
     Then Loan Repayment schedule has 7 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -3021,6 +3034,7 @@ Feature: Charge-off
       | 100           | 1.5      | 0    | 0         | 101.5 | 17.01 | 17.01    
  | 0    | 84.49       |
     When Admin sets the business date to "29 February 2024"
     And Admin does charge-off the loan on "29 February 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "29 February 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date       | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                 | 100.0           |     
          |          | 0.0  |           | 0.0   | 0.0   |            |      |   
          |
@@ -3141,6 +3155,7 @@ Feature: Charge-off
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
     When Admin sets the business date to "1 March 2024"
     And Admin does charge-off the loan on "1 March 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "01 March 2024"
     Then Loan Repayment schedule has 2 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -3220,6 +3235,7 @@ Feature: Charge-off
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
     When Admin sets the business date to "29 February 2024"
     And Admin does charge-off the loan on "29 February 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "29 February 2024"
     Then Loan Repayment schedule has 2 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -3279,6 +3295,7 @@ Feature: Charge-off
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
     When Admin sets the business date to "14 February 2024"
     And Admin does charge-off the loan on "14 February 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "14 February 2024"
     Then Loan Repayment schedule has 2 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -3348,6 +3365,7 @@ Feature: Charge-off
       | 01 May 2024      | Repayment        | 17.01  | 16.72     | 0.29     | 
0.0  | 0.0       | 33.71        | false    | false    |
     When Admin sets the business date to "15 July 2024"
     And Admin does charge-off the loan on "15 July 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "15 July 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -3415,6 +3433,7 @@ Feature: Charge-off
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
     When Admin sets the business date to "31 March 2024"
     And Admin does charge-off the loan on "31 March 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "31 March 2024"
     Then Loan Repayment schedule has 3 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -3494,6 +3513,7 @@ Feature: Charge-off
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
     When Admin sets the business date to "31 March 2024"
     And Admin does charge-off the loan on "31 March 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "31 March 2024"
     Then Loan Repayment schedule has 3 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -3578,6 +3598,7 @@ Feature: Charge-off
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
     When Admin sets the business date to "29 February 2024"
     And Admin does charge-off the loan on "29 February 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "29 February 2024"
     Then Loan Repayment schedule has 2 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -3658,6 +3679,7 @@ Feature: Charge-off
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
     When Admin sets the business date to "29 February 2024"
     And Admin does charge-off the loan on "29 February 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "29 February 2024"
     Then Loan Repayment schedule has 2 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -3738,6 +3760,7 @@ Feature: Charge-off
       | 15 January 2024  | Repayment        | 17.01  | 17.01     | 0.0      | 
0.0  | 0.0       | 82.99        | false    | false    |
     When Admin sets the business date to "29 February 2024"
     And Admin does charge-off the loan on "29 February 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "29 February 2024"
     Then Loan Repayment schedule has 2 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date       | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                 | 100.0           |     
          |          | 0.0  |           | 0.0   | 0.0   |            |      |   
          |
@@ -3819,6 +3842,7 @@ Feature: Charge-off
       | 15 February 2024 | Repayment        | 17.01  | 17.01     | 0.0      | 
0.0  | 0.0       | 66.56        | false    | false    |
     When Admin sets the business date to "29 February 2024"
     And Admin does charge-off the loan on "29 February 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "29 February 2024"
     Then Loan Repayment schedule has 3 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -3951,6 +3975,7 @@ Feature: Charge-off
       | 100           | 2.05     | 0    | 0         | 102.05 | 17.01 | 0       
   | 0    | 85.04       |
     When Admin sets the business date to "1 March 2024"
     And Admin does charge-off the loan on "1 March 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "01 March 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -4007,6 +4032,7 @@ Feature: Charge-off
       | 100           | 2.05     | 0    | 0         | 102.05 | 17.01 | 0       
   | 0    | 85.04       |
     When Admin sets the business date to "29 February 2024"
     And Admin does charge-off the loan on "29 February 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "29 February 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -4063,6 +4089,7 @@ Feature: Charge-off
       | 100           | 2.05     | 0    | 0         | 102.05 | 17.01 | 0       
   | 0    | 85.04       |
     When Admin sets the business date to "14 February 2024"
     And Admin does charge-off the loan on "14 February 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "14 February 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -4122,6 +4149,7 @@ Feature: Charge-off
       | 100           | 2.05     | 0    | 0         | 102.05 | 68.04 | 0       
   | 0    | 34.01       |
     When Admin sets the business date to "15 July 2024"
     And Admin does charge-off the loan on "15 July 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "15 July 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -4181,6 +4209,7 @@ Feature: Charge-off
       | 100           | 2.05     | 0    | 0         | 102.05 | 17.01 | 0       
   | 0    | 85.04       |
     When Admin sets the business date to "31 March 2024"
     And Admin does charge-off the loan on "31 March 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "31 March 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -4237,6 +4266,7 @@ Feature: Charge-off
       | 100           | 2.05     | 0    | 0         | 102.05 | 17.01 | 0       
   | 0    | 85.04       |
     When Admin sets the business date to "31 March 2024"
     And Admin does charge-off the loan on "31 March 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "31 March 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -4314,6 +4344,7 @@ Feature: Charge-off
       | 100           | 2.05     | 0    | 0         | 102.05 | 17.01 | 0       
   | 0    | 85.04       |
     When Admin sets the business date to "29 February 2024"
     And Admin does charge-off the loan on "29 February 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "29 February 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -4392,6 +4423,7 @@ Feature: Charge-off
       | 100           | 2.05     | 0    | 0         | 102.05 | 17.01 | 0       
   | 0    | 85.04       |
     When Admin sets the business date to "29 February 2024"
     And Admin does charge-off the loan on "29 February 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "29 February 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -4473,6 +4505,7 @@ Feature: Charge-off
     When Admin adds "LOAN_SNOOZE_FEE" due date charge with "28 February 2024" 
due date and 3 EUR transaction amount
     When Admin sets the business date to "29 February 2024"
     And Admin does charge-off the loan on "29 February 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "29 February 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -4531,6 +4564,7 @@ Feature: Charge-off
     When Admin sets the business date to "29 February 2024"
     When Admin adds "LOAN_SNOOZE_FEE" due date charge with "29 February 2024" 
due date and 3 EUR transaction amount
     And Admin does charge-off the loan on "29 February 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "29 February 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -4589,6 +4623,7 @@ Feature: Charge-off
     When Admin sets the business date to "29 February 2024"
     When Admin adds "LOAN_SNOOZE_FEE" due date charge with "05 March 2024" due 
date and 3 EUR transaction amount
     And Admin does charge-off the loan on "29 February 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "29 February 2024"
     And Admin waives charge
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Waived | Outstanding |
@@ -4649,6 +4684,7 @@ Feature: Charge-off
     When Admin sets the business date to "29 February 2024"
     When Admin adds "LOAN_SNOOZE_FEE" due date charge with "05 March 2024" due 
date and 3 EUR transaction amount
     And Admin does charge-off the loan on "29 February 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "29 February 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Waived | Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
      |             |
@@ -4811,6 +4847,7 @@ Feature: Charge-off
       | 02 July 2024     | Credit Balance Refund | 3.0    | 3.0       | 0.0    
  | 0.0  | 0.0       | 19.9         | false    | true     |
     When Admin sets the business date to "15 July 2024"
     And Admin does charge-off the loan on "15 July 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "15 July 2024"
     Then Loan Repayment schedule has 7 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -4874,6 +4911,7 @@ Feature: Charge-off
       | 100           | 2.05     | 0    | 0         | 102.05 | 17.01 | 17.01   
   | 0    | 85.04       |
     When Admin sets the business date to "29 February 2024"
     And Admin does charge-off the loan on "29 February 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "29 February 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date       | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                 | 100.0           |     
          |          | 0.0  |           | 0.0   | 0.0  |            |      |    
         |
@@ -4932,6 +4970,7 @@ Feature: Charge-off
       | 100           | 2.05     | 0    | 0         | 102.05 | 17.15 | 17.15   
   | 0    | 84.9        |
     When Admin sets the business date to "29 February 2024"
     And Admin does charge-off the loan on "29 February 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "29 February 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date       | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                 | 100.0           |     
          |          | 0.0  |           | 0.0   | 0.0   |            |      |   
          |
@@ -5045,6 +5084,7 @@ Feature: Charge-off
       | 100           | 2.05     | 0    | 0         | 102.05 | 17.01 | 0       
   | 0    | 85.04       |
     When Admin sets the business date to "29 February 2024"
     And Admin does charge-off the loan with reason "FRAUD" on "29 February 
2024"
+    Then LoanBalanceChangedBusinessEvent is created on "29 February 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -5107,6 +5147,7 @@ Feature: Charge-off
       | 100           | 2.05     | 0    | 0         | 102.05 | 17.01 | 0       
   | 0    | 85.04       |
     When Admin sets the business date to "29 February 2024"
     And Admin does charge-off the loan with reason "DELINQUENT" on "29 
February 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "29 February 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -5169,6 +5210,7 @@ Feature: Charge-off
       | 100           | 2.05     | 0    | 0         | 102.05 | 17.01 | 0       
   | 0    | 85.04       |
     When Admin sets the business date to "29 February 2024"
     And Admin does charge-off the loan with reason "OTHER" on "29 February 
2024"
+    Then LoanBalanceChangedBusinessEvent is created on "29 February 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -5240,6 +5282,7 @@ Feature: Charge-off
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
     When Admin sets the business date to "01 March 2024"
     And Admin does charge-off the loan on "01 March 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "01 March 2024"
     Then Loan Repayment schedule has 2 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -5302,6 +5345,7 @@ Feature: Charge-off
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
     When Admin sets the business date to "01 March 2024"
     And Admin does charge-off the loan on "01 March 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "01 March 2024"
     Then Loan Repayment schedule has 2 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -5364,6 +5408,7 @@ Feature: Charge-off
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
     When Admin sets the business date to "01 March 2024"
     And Admin does charge-off the loan on "01 March 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "01 March 2024"
     Then Loan Repayment schedule has 2 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -5440,6 +5485,7 @@ Feature: Charge-off
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
     When Admin sets the business date to "01 March 2024"
     And Admin does charge-off the loan on "01 March 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "01 March 2024"
     Then Loan Repayment schedule has 3 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -5502,6 +5548,7 @@ Feature: Charge-off
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
     When Admin sets the business date to "01 March 2024"
     And Admin does charge-off the loan on "01 March 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "01 March 2024"
     Then Loan Repayment schedule has 3 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -5564,6 +5611,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    |
     And Admin does charge-off the loan on "15 February 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "15 February 2024"
     Then Loan Repayment schedule has 3 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -5626,6 +5674,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    |
     And Admin does charge-off the loan on "15 February 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "15 February 2024"
     Then Loan Repayment schedule has 3 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -5703,6 +5752,7 @@ Feature: Charge-off
       | 15 January 2024  | Repayment        | 17.01  | 17.01     | 0.0      | 
0.0  | 0.0       | 82.99        | false    | false    |
     When Admin sets the business date to "29 February 2024"
     And Admin does charge-off the loan on "29 February 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "29 February 2024"
     Then Loan Repayment schedule has 2 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date | Balance of loan | Principal 
due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late | 
Outstanding |
       |    |      | 01 January 2024  |           | 100.0           |           
    |          | 0.0  |           | 0.0   | 0.0   |            |      |         
    |
@@ -5781,6 +5831,7 @@ Feature: Charge-off
       | 15 February 2024 | Repayment        | 17.01  | 17.01     | 0.0      | 
0.0  | 0.0       | 66.56        | false    | false    |
     When Admin sets the business date to "29 February 2024"
     And Admin does charge-off the loan on "29 February 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "29 February 2024"
     Then Loan Repayment schedule has 2 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -5842,6 +5893,7 @@ Feature: Charge-off
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
     When Admin sets the business date to "31 March 2024"
     And Admin does charge-off the loan on "31 March 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "31 March 2024"
     Then Loan Repayment schedule has 3 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -5924,6 +5976,7 @@ Feature: Charge-off
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
     When Admin sets the business date to "31 March 2024"
     And Admin does charge-off the loan on "31 March 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "31 March 2024"
     Then Loan Repayment schedule has 3 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -5986,6 +6039,7 @@ Feature: Charge-off
       | 01 January 2024  | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        | false    | false    |
     When Admin sets the business date to "31 March 2024"
     And Admin does charge-off the loan on "31 March 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "31 March 2024"
     Then Loan Repayment schedule has 3 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date | Balance of loan | Principal 
due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late | 
Outstanding |
       |    |      | 01 January 2024  |           | 100.0           |           
    |          | 0.0  |           | 0.0   | 0.0   |            |      |         
    |
@@ -6707,6 +6761,7 @@ Feature: Charge-off
       | 15 January 2023  | Repayment        | 170.09 | 167.46    | 2.63     | 
0.0  | 0.0       | 832.54       | false    | false    |
     When Admin sets the business date to "31 January 2023"
     And Admin does charge-off the loan on "31 January 2023"
+    Then LoanBalanceChangedBusinessEvent is created on "31 January 2023"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date       | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due    | Paid   | In advance | 
Late | Outstanding |
       |    |      | 01 January 2023  |                 | 1000.0          |     
          |          | 0.0  |           | 0.0    | 0.0    |            |      | 
            |
@@ -6921,6 +6976,7 @@ Feature: Charge-off
       | 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 LoanBalanceChangedBusinessEvent is created 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  |            |      
|             |
@@ -7149,6 +7205,7 @@ Feature: Charge-off
       | 18 January 2024  | Accrual          | 0.52   | 0.0       | 0.52     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 19 January 2024  | Accrual          | 0.52   | 0.0       | 0.52     | 
0.0  | 0.0       | 0.0          | false    | false    |
     And Admin does charge-off the loan on "20 January 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "20 January 2024"
     Then Loan Repayment schedule has 4 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date       | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due    | Paid   | In advance | 
Late | Outstanding |
       |    |      | 01 January 2024  |                 | 1000.0          |     
          |          | 0.0  |           | 0.0    | 0.0    |            |      | 
            |
@@ -7237,6 +7294,7 @@ Feature: Charge-off
     When Admin sets the business date to "14 February 2024"
     When Admin runs inline COB job for Loan
     And Admin does charge-off the loan on "14 February 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "14 February 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date | Balance of loan | Principal 
due | Interest | Fees | Penalties | Due   | Paid | In advance | Late | 
Outstanding |
       |    |      | 01 January 2024  |           | 100.0           |           
    |          | 0.0  |           | 0.0   | 0.0  |            |      |          
   |
@@ -7771,6 +7829,7 @@ Feature: Charge-off
     Then Admin can successfully set Fraud flag to the loan
     When Admin sets the business date to "03 February 2024"
     And Admin does charge-off the loan with reason "DELINQUENT" on "03 
February 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "03 February 2024"
     Then Loan Transactions tab has a "CHARGE_OFF" transaction with date "03 
February 2024" which has the following Journal entries:
       | Type    | Account code | Account name               | Debit | Credit |
       | ASSET   | 112601       | Loans Receivable           |       | 100.0  |
@@ -7812,6 +7871,7 @@ Feature: Charge-off
     And Admin successfully disburse the loan on "1 January 2024" with "100" 
EUR transaction amount
     When Admin sets the business date to "23 January 2024"
     And Admin does charge-off the loan on "23 January 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "23 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  |            |      |          
   |
@@ -7927,6 +7987,7 @@ Feature: Charge-off
       | 22 January 2024  | Accrual            | 0.4    | 0.0       | 0.4      
| 0.0  | 0.0       | 0.0          | false    | false    |
       | 23 January 2024  | Repayment          | 17.01  | 16.6      | 0.41     
| 0.0  | 0.0       | 83.4         | true     | false    |
     And Admin does charge-off the loan on "05 January 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "23 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  |            |      |          
   |
@@ -8047,6 +8108,7 @@ Feature: Charge-off
       | 22 January 2024  | Accrual            | 0.02   | 0.0       | 0.02     
| 0.0  | 0.0       | 0.0          | false    | false    |
       | 23 January 2024  | Repayment          | 17.01  | 16.6      | 0.41     
| 0.0  | 0.0       | 83.4         | true     | false    |
     And Admin does charge-off the loan on "05 January 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "23 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  |            |      |          
   |
@@ -8367,6 +8429,7 @@ Feature: Charge-off
     When Admin runs inline COB job for Loan
     When Admin sets the business date to "14 April 2025"
     And Admin does charge-off the loan with reason "DELINQUENT" on "14 April 
2025"
+    Then LoanBalanceChangedBusinessEvent is created on "14 April 2025"
     Then Loan marked as charged-off on "14 April 2025"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date              | Paid date | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid | In advance | Late 
| Waived | Outstanding |
@@ -8478,6 +8541,7 @@ Feature: Charge-off
     When Admin runs inline COB job for Loan
     When Admin sets the business date to "14 April 2025"
     And Admin does charge-off the loan with reason "DELINQUENT" on "14 April 
2025"
+    Then LoanBalanceChangedBusinessEvent is created on "14 April 2025"
     Then Loan marked as charged-off on "14 April 2025"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date              | Paid date | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid | In advance | Late 
| Waived | Outstanding |
@@ -8612,6 +8676,7 @@ Feature: Charge-off
     Then Admin can successfully set Fraud flag to the loan
     When Admin sets the business date to "03 February 2024"
     And Admin does charge-off the loan with reason "DELINQUENT" on "03 
February 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "03 February 2024"
     Then Loan Transactions tab has a "CHARGE_OFF" transaction with date "03 
February 2024" which has the following Journal entries:
       | Type    | Account code | Account name               | Debit | Credit |
       | ASSET   | 112601       | Loans Receivable           |       | 100.0  |
@@ -8892,6 +8957,7 @@ Feature: Charge-off
       | 05 April 2025    | Repayment        | 100.0  | 100.0     | 0.0      | 
0.0  | 0.0       | 800.0        |
     When Admin sets the business date to "14 April 2025"
     And Admin does charge-off the loan on "14 April 2025"
+    Then LoanBalanceChangedBusinessEvent is created on "14 April 2025"
     When Admin runs inline COB job for Loan
     Then Loan Repayment schedule has 1 periods, with the following data for 
periods:
       | Nr | Days | Date          | Paid date    | Balance of loan | Principal 
due | Interest | Fees | Penalties | Due    | Paid   | In advance | Late | 
Outstanding |
@@ -9245,6 +9311,7 @@ Feature: Charge-off
     When Admin runs inline COB job for Loan
     When Admin sets the business date to "14 April 2025"
     And Admin does charge-off the loan with reason "DELINQUENT" on "14 April 
2025"
+    Then LoanBalanceChangedBusinessEvent is created on "14 April 2025"
     Then Loan marked as charged-off on "14 April 2025"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date              | Paid date | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid | In advance | Late 
| Waived | Outstanding |
@@ -9334,6 +9401,7 @@ Feature: Charge-off
     When Admin runs inline COB job for Loan
     When Admin sets the business date to "14 April 2025"
     And Admin does charge-off the loan with reason "DELINQUENT" on "14 April 
2025"
+    Then LoanBalanceChangedBusinessEvent is created on "14 April 2025"
     Then Loan marked as charged-off on "14 April 2025"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date              | Paid date | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid | In advance | Late 
| Waived | Outstanding |
@@ -9460,6 +9528,7 @@ Feature: Charge-off
   # Charge-off on 01 April 2025 (accelerated maturity)
     When Admin sets the business date to "01 April 2025"
     And Admin does charge-off the loan on "01 April 2025"
+    Then LoanBalanceChangedBusinessEvent is created on "01 April 2025"
     Then Loan Repayment schedule has 3 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due     | Paid   | In advance | 
Late | Outstanding |
       |    |      | 06 January 2025  |                  | 5000.0          |    
           |          | 0.0  |           | 0.0     | 0.0    |            |      
|             |
@@ -9546,6 +9615,7 @@ Feature: Charge-off
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    | false    |
     When Admin sets the business date to "31 March 2024"
     And Admin does charge-off the loan with reason "OTHER" on "31 March 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "31 March 2024"
     Then Loan Repayment schedule has 3 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -10003,6 +10073,7 @@ Feature: Charge-off
       | 01 October 2025   | Accrual Activity | 3.67   | 0.0       | 3.67     | 
0.0  | 0.0       | 0.0          |
       | 07 October 2025   | Accrual          | 20.67  | 0.0       | 20.67    | 
0.0  | 0.0       | 0.0          |
     And Admin does charge-off the loan on "08 October 2025"
+    Then LoanBalanceChangedBusinessEvent is created on "08 October 2025"
     Then Loan has 11.51 total unpaid payable due interest
     Then Loan has 0.79 total unpaid payable not due interest
     Then Loan Repayment schedule has the following data in Total row:
@@ -10074,6 +10145,7 @@ Feature: Charge-off
       | 01 September 2025 | Accrual Activity | 3.84   | 0.0       | 3.84     | 
0.0  | 0.0       | 0.0          |
       | 30 September 2025 | Accrual          | 19.87  | 0.0       | 19.87    | 
0.0  | 0.0       | 0.0          |
     And Admin does charge-off the loan on "01 October 2025"
+    Then LoanBalanceChangedBusinessEvent is created on "01 October 2025"
     Then Loan has 11.51 total unpaid payable due interest
     Then Loan has 0.0 total unpaid payable not due interest
 
diff --git 
a/fineract-e2e-tests-runner/src/test/resources/features/LoanDelayedScheduleCaptures.feature
 
b/fineract-e2e-tests-runner/src/test/resources/features/LoanDelayedScheduleCaptures.feature
index 0a21147aa8..2269618cce 100644
--- 
a/fineract-e2e-tests-runner/src/test/resources/features/LoanDelayedScheduleCaptures.feature
+++ 
b/fineract-e2e-tests-runner/src/test/resources/features/LoanDelayedScheduleCaptures.feature
@@ -1546,6 +1546,7 @@ Feature: Full Term Tranche - Schedule handling and 
Calculations
 # --- add charge-off transaction --- #
     When Admin sets the business date to "01 March 2024"
     And Admin does charge-off the loan on "01 March 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "01 March 2024"
     Then Loan Repayment schedule has 2 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due    | Paid  | In advance | 
Late | Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0    | 0.0   |            |      | 
            |
diff --git 
a/fineract-e2e-tests-runner/src/test/resources/features/LoanInterestRateChange.feature
 
b/fineract-e2e-tests-runner/src/test/resources/features/LoanInterestRateChange.feature
index c921d9b185..4baf17b8bb 100644
--- 
a/fineract-e2e-tests-runner/src/test/resources/features/LoanInterestRateChange.feature
+++ 
b/fineract-e2e-tests-runner/src/test/resources/features/LoanInterestRateChange.feature
@@ -359,6 +359,7 @@ Feature: Loan interest rate change on repayment schedule
     And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 
EUR transaction amount
     And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR 
transaction amount
     And Admin does charge-off the loan on "01 April 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "01 April 2024"
     When Admin creates and approves Loan reschedule with the following data:
       | rescheduleFromDate | submittedOnDate  | adjustedDueDate | 
graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate |
       | 02 February 2024   | 02 February 2024 |                 |              
    |                 |            | 4               |
@@ -415,6 +416,7 @@ Feature: Loan interest rate change on repayment schedule
     And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 
EUR transaction amount
     And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR 
transaction amount
     And Admin does charge-off the loan on "01 April 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "01 April 2024"
     When Admin creates and approves Loan reschedule with the following data:
       | rescheduleFromDate | submittedOnDate  | adjustedDueDate | 
graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate |
       | 02 February 2024   | 02 February 2024 |                 |              
    |                 |            | 4               |
@@ -920,6 +922,7 @@ Feature: Loan interest rate change on repayment schedule
       | 01 March 2024    | Repayment        | 10.0   | 9.42      | 0.58     | 
0.0  | 0.0       | 80.58        | false    | false    |
     When Admin sets the business date to "01 April 2024"
     And Admin does charge-off the loan on "01 April 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "01 April 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date     | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |               | 100.0           |       
        |          | 0.0  |           | 0.0   | 0.0   |            |      |     
        |
@@ -1027,6 +1030,7 @@ Feature: Loan interest rate change on repayment schedule
       | 01 March 2024    | Repayment        | 17.01  | 16.52     | 0.49     | 
0.0  | 0.0       | 67.05        | false    | false    |
     When Admin sets the business date to "01 April 2024"
     And Admin does charge-off the loan on "01 April 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "01 April 2024"
     Then Loan Repayment schedule has 3 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
diff --git 
a/fineract-e2e-tests-runner/src/test/resources/features/LoanReAging.feature 
b/fineract-e2e-tests-runner/src/test/resources/features/LoanReAging.feature
index 1d2b7252a2..82e9f1ff17 100644
--- a/fineract-e2e-tests-runner/src/test/resources/features/LoanReAging.feature
+++ b/fineract-e2e-tests-runner/src/test/resources/features/LoanReAging.feature
@@ -5539,6 +5539,7 @@ Feature: LoanReAging
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    |
     When Admin sets the business date to "01 March 2024"
     And Admin does charge-off the loan on "01 March 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "01 March 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date            | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024 |                  | 100.0           |     
          |          | 0.0  |           | 0.0   | 0.0   |            |      |   
          |
@@ -5749,6 +5750,7 @@ Feature: LoanReAging
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    |
     When Admin sets the business date to "01 March 2024"
     And Admin does charge-off the loan on "01 March 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "01 March 2024"
     Then Loan Repayment schedule has 2 periods, with the following data for 
periods:
       | Nr | Days | Date            | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024 |                  | 100.0           |     
          |          | 0.0  |           | 0.0   | 0.0   |            |      |   
          |
@@ -10655,6 +10657,7 @@ Feature: LoanReAging
 # --- charge-off with zero interest behaviour --- #
     When Admin sets the business date to "01 April 2024"
     And Admin does charge-off the loan on "01 April 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "01 April 2024"
     Then Loan Repayment schedule has 9 periods, with the following data for 
periods:
       | Nr | Days | Date              | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024   |                  | 100.0           |   
            |          | 0.0  |           | 0.0   | 0.0   |            |      | 
            |
@@ -10753,6 +10756,7 @@ Feature: LoanReAging
 # --- charge-off with accelerate maturity behaviour --- #
     When Admin sets the business date to "01 April 2024"
     And Admin does charge-off the loan on "01 April 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "01 April 2024"
     Then Loan Repayment schedule has 4 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -10845,6 +10849,7 @@ Feature: LoanReAging
       | 15 March 2024    | Re-age           | 84.28  | 83.57     | 0.71     | 
0.0  | 0.0       | 0.0          | false    | false    |
 # --- charge-off with accelerate maturity behaviour --- #
     And Admin does charge-off the loan on "15 March 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "15 March 2024"
     Then Loan Repayment schedule has 3 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
diff --git 
a/fineract-e2e-tests-runner/src/test/resources/features/LoanReAgingEqualAmortization.feature
 
b/fineract-e2e-tests-runner/src/test/resources/features/LoanReAgingEqualAmortization.feature
index f1e2f4cdc1..5a0f02d3b0 100644
--- 
a/fineract-e2e-tests-runner/src/test/resources/features/LoanReAgingEqualAmortization.feature
+++ 
b/fineract-e2e-tests-runner/src/test/resources/features/LoanReAgingEqualAmortization.feature
@@ -5102,6 +5102,7 @@ Feature: LoanReAgingEqualAmortization
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    |
     When Admin sets the business date to "01 March 2024"
     And Admin does charge-off the loan on "01 March 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "01 March 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -5172,6 +5173,7 @@ Feature: LoanReAgingEqualAmortization
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    |
     When Admin sets the business date to "01 March 2024"
     And Admin does charge-off the loan on "01 March 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "01 March 2024"
     Then Loan Repayment schedule has 2 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -10873,6 +10875,7 @@ Feature: LoanReAgingEqualAmortization
 # --- charge-off with zero interest behaviour --- #
     When Admin sets the business date to "01 April 2024"
     And Admin does charge-off the loan on "01 April 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "01 April 2024"
     Then Loan Repayment schedule has 9 periods, with the following data for 
periods:
       | Nr | Days | Date              | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024   |                  | 100.0           |   
            |          | 0.0  |           | 0.0   | 0.0   |            |      | 
            |
@@ -10971,6 +10974,7 @@ Feature: LoanReAgingEqualAmortization
 # --- charge-off with zero interest behaviour --- #
     When Admin sets the business date to "01 April 2024"
     And Admin does charge-off the loan on "01 April 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "01 April 2024"
     Then Loan Repayment schedule has 9 periods, with the following data for 
periods:
       | Nr | Days | Date              | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024   |                  | 100.0           |   
            |          | 0.0  |           | 0.0   | 0.0   |            |      | 
            |
@@ -11069,6 +11073,7 @@ Feature: LoanReAgingEqualAmortization
 # --- charge-off with accelerate maturity behaviour --- #
     When Admin sets the business date to "01 April 2024"
     And Admin does charge-off the loan on "01 April 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "01 April 2024"
     Then Loan Repayment schedule has 4 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -11162,6 +11167,7 @@ Feature: LoanReAgingEqualAmortization
 # --- charge-off with accelerate maturity behaviour --- #
     When Admin sets the business date to "01 April 2024"
     And Admin does charge-off the loan on "01 April 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "01 April 2024"
     Then Loan Repayment schedule has 4 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
diff --git 
a/fineract-e2e-tests-runner/src/test/resources/features/LoanReAmortization.feature
 
b/fineract-e2e-tests-runner/src/test/resources/features/LoanReAmortization.feature
index ef852ed27d..463825c413 100644
--- 
a/fineract-e2e-tests-runner/src/test/resources/features/LoanReAmortization.feature
+++ 
b/fineract-e2e-tests-runner/src/test/resources/features/LoanReAmortization.feature
@@ -2905,6 +2905,7 @@ Feature: LoanReAmortization
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    |
     When Admin sets the business date to "01 March 2024"
     And Admin does charge-off the loan on "01 March 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "01 March 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date            | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024 |                  | 100.0           |     
          |          | 0.0  |           | 0.0   | 0.0   |            |      |   
          |
@@ -3043,6 +3044,7 @@ Feature: LoanReAmortization
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    |
     When Admin sets the business date to "01 March 2024"
     And Admin does charge-off the loan on "01 March 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "01 March 2024"
     Then Loan Repayment schedule has 2 periods, with the following data for 
periods:
       | Nr | Days | Date            | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024 |                  | 100.0           |     
          |          | 0.0  |           | 0.0   | 0.0   |            |      |   
          |
@@ -3107,6 +3109,7 @@ Feature: LoanReAmortization
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    |
     When Admin sets the business date to "01 March 2024"
     And Admin does charge-off the loan on "01 March 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "01 March 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date            | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024 |                  | 100.0           |     
          |          | 0.0  |           | 0.0   | 0.0   |            |      |   
          |
@@ -3245,6 +3248,7 @@ Feature: LoanReAmortization
       | 01 February 2024 | Repayment        | 17.01  | 16.43     | 0.58     | 
0.0  | 0.0       | 83.57        | false    |
     When Admin sets the business date to "01 March 2024"
     And Admin does charge-off the loan on "01 March 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "01 March 2024"
     Then Loan Repayment schedule has 2 periods, with the following data for 
periods:
       | Nr | Days | Date            | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024 |                  | 100.0           |     
          |          | 0.0  |           | 0.0   | 0.0   |            |      |   
          |
@@ -5288,6 +5292,7 @@ Feature: LoanReAmortization
 # --- charge-off the loan --- #
     When Admin sets the business date to "15 April 2024"
     And Admin does charge-off the loan on "15 April 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "15 April 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date              | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024   |                  | 100.0           |   
            |          | 0.0  |           | 0.0   | 0.0   |            |      | 
            |
@@ -5379,6 +5384,7 @@ Feature: LoanReAmortization
 # --- charge-off the loan --- #
     When Admin sets the business date to "15 April 2024"
     And Admin does charge-off the loan on "15 April 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "15 April 2024"
     Then Loan Repayment schedule has 4 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -5886,6 +5892,7 @@ Feature: LoanReAmortization
       | 15 March 2024    | Re-amortize      | 17.01  | 16.52     | 0.49     | 
0.0  | 0.0       | 0.0          | false    | false    |
     When Admin sets the business date to "15 April 2024"
     And Admin does charge-off the loan on "15 April 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "15 April 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -5971,6 +5978,7 @@ Feature: LoanReAmortization
       | 15 March 2024    | Re-amortize      | 17.01  | 16.52     | 0.49     | 
0.0  | 0.0       | 0.0          | false    | false    |
     When Admin sets the business date to "15 April 2024"
     And Admin does charge-off the loan on "15 April 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "15 April 2024"
     Then Loan Repayment schedule has 4 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
diff --git 
a/fineract-e2e-tests-runner/src/test/resources/features/LoanReAmortizationAccruals.feature
 
b/fineract-e2e-tests-runner/src/test/resources/features/LoanReAmortizationAccruals.feature
index a7cee6404f..31e41a7675 100644
--- 
a/fineract-e2e-tests-runner/src/test/resources/features/LoanReAmortizationAccruals.feature
+++ 
b/fineract-e2e-tests-runner/src/test/resources/features/LoanReAmortizationAccruals.feature
@@ -1789,6 +1789,7 @@ Feature: LoanReAmortizationAccruals
       | 13 April 2024    | Accrual          | 0.01   | 0.0       | 0.01     | 
0.0  | 0.0       | 0.0          | false    | false    |
       | 14 April 2024    | Accrual          | 0.02   | 0.0       | 0.02     | 
0.0  | 0.0       | 0.0          | false    | false    |
     And Admin does charge-off the loan on "15 April 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "15 April 2024"
     Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
@@ -1888,6 +1889,7 @@ Feature: LoanReAmortizationAccruals
     When Admin sets the business date to "15 April 2024"
     When Admin runs inline COB job for Loan
     And Admin does charge-off the loan on "15 April 2024"
+    Then LoanBalanceChangedBusinessEvent is created on "15 April 2024"
     Then Loan Repayment schedule has 4 periods, with the following data for 
periods:
       | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
       |    |      | 01 January 2024  |                  | 100.0           |    
           |          | 0.0  |           | 0.0   | 0.0   |            |      |  
           |
diff --git 
a/fineract-e2e-tests-runner/src/test/resources/features/LoanWriteOff.feature 
b/fineract-e2e-tests-runner/src/test/resources/features/LoanWriteOff.feature
index d651caa4e6..02d7c09a80 100644
--- a/fineract-e2e-tests-runner/src/test/resources/features/LoanWriteOff.feature
+++ b/fineract-e2e-tests-runner/src/test/resources/features/LoanWriteOff.feature
@@ -226,6 +226,7 @@
         | 100           | 2.05     | 0    | 0         | 102.05 | 17.01 | 0     
     | 0    | 85.04       |
       When Admin sets the business date to "1 March 2024"
       And Admin does charge-off the loan on "1 March 2024"
+      Then LoanBalanceChangedBusinessEvent is created on "01 March 2024"
       Then Loan Repayment schedule has 6 periods, with the following data for 
periods:
         | Nr | Days | Date             | Paid date        | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
         |    |      | 01 January 2024  |                  | 100.0           |  
             |          | 0.0  |           | 0.0   | 0.0   |            |      
|             |
@@ -300,6 +301,7 @@
       Then Admin can successfully set Fraud flag to the loan
       When Admin sets the business date to "03 February 2024"
       And Admin does charge-off the loan with reason "DELINQUENT" on "03 
February 2024"
+      Then LoanBalanceChangedBusinessEvent is created on "03 February 2024"
       Then Loan Transactions tab has a "CHARGE_OFF" transaction with date "03 
February 2024" which has the following Journal entries:
         | Type    | Account code | Account name               | Debit | Credit 
|
         | ASSET   | 112601       | Loans Receivable           |       | 100.0  
|
diff --git 
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java
 
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java
index af7644c7b6..49bc7e2a0f 100644
--- 
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java
+++ 
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java
@@ -159,6 +159,7 @@ import 
org.apache.fineract.portfolio.loanaccount.domain.Loan;
 import 
org.apache.fineract.portfolio.loanaccount.domain.LoanAccountDomainService;
 import org.apache.fineract.portfolio.loanaccount.domain.LoanAccountService;
 import org.apache.fineract.portfolio.loanaccount.domain.LoanCharge;
+import org.apache.fineract.portfolio.loanaccount.domain.LoanChargeOffBehaviour;
 import 
org.apache.fineract.portfolio.loanaccount.domain.LoanDisbursementDetails;
 import org.apache.fineract.portfolio.loanaccount.domain.LoanEvent;
 import 
org.apache.fineract.portfolio.loanaccount.domain.LoanLifecycleStateMachine;
@@ -2766,6 +2767,11 @@ public class LoanWritePlatformServiceJpaRepositoryImpl 
implements LoanWritePlatf
             this.noteRepository.save(note);
         }
 
+        final LoanChargeOffBehaviour chargeOffBehaviour = 
loan.getLoanProductRelatedDetail().getChargeOffBehaviour();
+        if (chargeOffBehaviour != null && 
(chargeOffBehaviour.equals(LoanChargeOffBehaviour.ZERO_INTEREST)
+                || 
chargeOffBehaviour.equals(LoanChargeOffBehaviour.ACCELERATE_MATURITY))) {
+            businessEventNotifierService.notifyPostBusinessEvent(new 
LoanBalanceChangedBusinessEvent(loan));
+        }
         businessEventNotifierService.notifyPostBusinessEvent(new 
LoanChargeOffPostBusinessEvent(chargeOffTransaction));
         return new CommandProcessingResultBuilder() //
                 .withCommandId(command.commandId()) //

Reply via email to