[FINERACT-1724] trigger arrears aging on LoanBalanceChangedBusinessEvent
This commit is contained in:
committed by
Arnold Gálovics
parent
60cb0cbe11
commit
9fe7927d7e
+12
@@ -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.BusinessEventListener;
|
||||||
import org.apache.fineract.infrastructure.event.business.domain.loan.LoanAdjustTransactionBusinessEvent;
|
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.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.LoanDisbursalBusinessEvent;
|
||||||
import org.apache.fineract.infrastructure.event.business.domain.loan.charge.LoanAddChargeBusinessEvent;
|
import org.apache.fineract.infrastructure.event.business.domain.loan.charge.LoanAddChargeBusinessEvent;
|
||||||
import org.apache.fineract.infrastructure.event.business.domain.loan.charge.LoanWaiveChargeBusinessEvent;
|
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(LoanDisbursalBusinessEvent.class, new DisbursementEventListener());
|
||||||
businessEventNotifierService.addPostBusinessEventListener(LoanForeClosurePostBusinessEvent.class,
|
businessEventNotifierService.addPostBusinessEventListener(LoanForeClosurePostBusinessEvent.class,
|
||||||
new LoanForeClosureEventListener());
|
new LoanForeClosureEventListener());
|
||||||
|
businessEventNotifierService.addPostBusinessEventListener(LoanBalanceChangedBusinessEvent.class,
|
||||||
|
new LoanBalanceChangedEventListener());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -523,4 +526,13 @@ public class LoanArrearsAgingServiceImpl implements LoanArrearsAgingService {
|
|||||||
handleArrearsForLoan(loan);
|
handleArrearsForLoan(loan);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private class LoanBalanceChangedEventListener implements BusinessEventListener<LoanBalanceChangedBusinessEvent> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBusinessEvent(LoanBalanceChangedBusinessEvent event) {
|
||||||
|
Loan loan = event.get();
|
||||||
|
handleArrearsForLoan(loan);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user