adamsaghy commented on code in PR #2777: URL: https://github.com/apache/fineract/pull/2777#discussion_r1037939515
########## fineract-provider/src/main/java/org/apache/fineract/cob/service/InlineLoanCOBExecutorServiceImpl.java: ########## @@ -120,6 +132,19 @@ public void execute(List<Long> loanIds, String jobName) { } } + private LocalDate getOldestCOBBusinessDate(List<Long> loanIds) { + return loanRepository.findOldestCOBProcessedLoanByLoanIds(loanIds) + .orElse(ThreadLocalContextUtil.getBusinessDateByType(BusinessDateType.COB_DATE).minusDays(1)); + } + + private List<Long> getLoanIdsTOBeProcessed(List<Long> loanIds, LocalDate oldestCOBBusinessDate, LocalDate cobBusinessDate) { + if (!oldestCOBBusinessDate.isBefore(cobBusinessDate)) { Review Comment: for better readability would you switch this condition? -- 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: commits-unsubscr...@fineract.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org