adamsaghy commented on code in PR #4916:
URL: https://github.com/apache/fineract/pull/4916#discussion_r2272908253


##########
fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanTransactionService.java:
##########
@@ -56,4 +66,37 @@ private Predicate<LoanTransaction> 
loanTransactionForReprocessingPredicate() {
                         || !transaction.isNonMonetaryTransaction() || 
transaction.isContractTermination());
     }
 
+    @Transactional(readOnly = true)
+    public boolean hasChargeOffTransaction(final Loan loan) {
+        return loanTransactionRepository.hasChargeOffTransaction(loan);
+    }
+
+    @Transactional(readOnly = true)
+    public boolean hasContractTerminationTransaction(final Loan loan) {
+        return 
loanTransactionRepository.hasContractTerminationTransaction(loan);
+    }
+
+    @Transactional(readOnly = true)
+    public boolean shouldRegenerateRepaymentSchedule(final Loan loan) {

Review Comment:
   Since we are already in transaction, we can drop the @Transaction(readOnly = 
true) flag. it will never start a new transaction...



-- 
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