This is an automated email from the ASF dual-hosted git repository.
arnold 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 9fe7927d7 [FINERACT-1724] trigger arrears aging on
LoanBalanceChangedBusinessEvent
9fe7927d7 is described below
commit 9fe7927d7ee3cd42b0358a277b9fc8eaaaf99b1d
Author: taskain7 <[email protected]>
AuthorDate: Thu Jun 1 16:03:49 2023 +0200
[FINERACT-1724] trigger arrears aging on LoanBalanceChangedBusinessEvent
---
.../loanaccount/service/LoanArrearsAgingServiceImpl.java | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanArrearsAgingServiceImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanArrearsAgingServiceImpl.java
index bb88331b8..134aa09d3 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanArrearsAgingServiceImpl.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanArrearsAgingServiceImpl.java
@@ -36,6 +36,7 @@ import
org.apache.fineract.infrastructure.core.service.database.DatabaseSpecific
import org.apache.fineract.infrastructure.event.business.BusinessEventListener;
import
org.apache.fineract.infrastructure.event.business.domain.loan.LoanAdjustTransactionBusinessEvent;
import
org.apache.fineract.infrastructure.event.business.domain.loan.LoanApplyOverdueChargeBusinessEvent;
+import
org.apache.fineract.infrastructure.event.business.domain.loan.LoanBalanceChangedBusinessEvent;
import
org.apache.fineract.infrastructure.event.business.domain.loan.LoanDisbursalBusinessEvent;
import
org.apache.fineract.infrastructure.event.business.domain.loan.charge.LoanAddChargeBusinessEvent;
import
org.apache.fineract.infrastructure.event.business.domain.loan.charge.LoanWaiveChargeBusinessEvent;
@@ -92,6 +93,8 @@ public class LoanArrearsAgingServiceImpl implements
LoanArrearsAgingService {
businessEventNotifierService.addPostBusinessEventListener(LoanDisbursalBusinessEvent.class,
new DisbursementEventListener());
businessEventNotifierService.addPostBusinessEventListener(LoanForeClosurePostBusinessEvent.class,
new LoanForeClosureEventListener());
+
businessEventNotifierService.addPostBusinessEventListener(LoanBalanceChangedBusinessEvent.class,
+ new LoanBalanceChangedEventListener());
}
@Override
@@ -523,4 +526,13 @@ public class LoanArrearsAgingServiceImpl implements
LoanArrearsAgingService {
handleArrearsForLoan(loan);
}
}
+
+ private class LoanBalanceChangedEventListener implements
BusinessEventListener<LoanBalanceChangedBusinessEvent> {
+
+ @Override
+ public void onBusinessEvent(LoanBalanceChangedBusinessEvent event) {
+ Loan loan = event.get();
+ handleArrearsForLoan(loan);
+ }
+ }
}