FINERACT-2327: Forbid accrual and accrual activity creation for closed, overpaid and cancelled loans
This commit is contained in:
committed by
Adam Saghy
parent
0f1be3c913
commit
6bb68051ce
+1
-1
@@ -65,7 +65,7 @@ public class LoanAccrualActivityProcessingServiceImpl implements LoanAccrualActi
|
||||
|
||||
@Override
|
||||
public void makeAccrualActivityTransaction(@NotNull Loan loan, @NotNull LocalDate currentDate) {
|
||||
if (!loan.getLoanProductRelatedDetail().isEnableAccrualActivityPosting()) {
|
||||
if (!loan.getLoanProductRelatedDetail().isEnableAccrualActivityPosting() || loan.isClosed() || loan.getStatus().isOverpaid()) {
|
||||
return;
|
||||
}
|
||||
// check if loan has installment in the past or due on current date
|
||||
|
||||
+3
@@ -129,6 +129,9 @@ public class LoanAccrualsProcessingServiceImpl implements LoanAccrualsProcessing
|
||||
@Override
|
||||
@Transactional
|
||||
public void addPeriodicAccruals(@NotNull LocalDate tillDate, @NotNull Loan loan) {
|
||||
if (loan.isClosed() || loan.getStatus().isOverpaid()) {
|
||||
return;
|
||||
}
|
||||
addAccruals(loan, tillDate, true, false, true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user