adamsaghy commented on code in PR #5102:
URL: https://github.com/apache/fineract/pull/5102#discussion_r2490146468
##########
fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionRepository.java:
##########
@@ -481,4 +481,13 @@ boolean
existsNonReversedByLoanAndTypeAndDate(@Param("loan") Loan loan, @Param("
""")
CodeValue
fetchClassificationCodeValueByTransactionId(@Param("transactionId") Long
transactionId);
+ @Query("""
+ SELECT lt FROM LoanTransaction lt
+ WHERE lt.loan = :loan
+ AND lt.reversed = false
+ AND lt.typeOf = :type
+ AND lt.dateOf <= :onDate
+ """)
+ Optional<LoanTransaction>
findNonReversedTransactionActiveOnDate(@Param("loan") Loan loan, @Param("type")
LoanTransactionType type,
Review Comment:
This might return multiple transactions. Please review the logic.
--
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]