reluxa commented on code in PR #3604:
URL: https://github.com/apache/fineract/pull/3604#discussion_r1406407207


##########
fineract-provider/src/main/java/org/apache/fineract/cob/loan/SetLoanDelinquencyTagsBusinessStep.java:
##########
@@ -55,7 +67,17 @@ public Loan execute(Loan loan) {
                 // the
                 // current date and not the previous (COB) date.
                 ThreadLocalContextUtil.setActionContext(ActionContext.DEFAULT);
-                loanAccountDomainService.setLoanDelinquencyTag(loan, 
DateUtils.getBusinessLocalDate());
+
+                final List<LoanDelinquencyAction> savedDelinquencyList = 
delinquencyReadPlatformService
+                        .retrieveLoanDelinquencyActions(loan.getId());
+                List<LoanDelinquencyActionData> effectiveDelinquencyList = 
delinquencyEffectivePauseHelper
+                        
.calculateEffectiveDelinquencyList(savedDelinquencyList);
+
+                if (!isDelinquencyOnPause(loan, effectiveDelinquencyList)) {
+                    loanAccountDomainService.setLoanDelinquencyTag(loan, 
DateUtils.getBusinessLocalDate(), effectiveDelinquencyList);
+                } else {
+                    log.info("Delinquency is on pause for loan with ID [{}]", 
loan.getId());

Review Comment:
   We shall not log this on info imo. We can have hundreds of loans like this 
and that would generate noise.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to