FINEREACT-2404: Improved extensibility and cleanup

This commit is contained in:
cucusenok
2025-11-07 10:19:40 +01:00
committed by Adam Saghy
parent d269cb983f
commit 9320dd1bd7
12 changed files with 72 additions and 45 deletions
@@ -20,11 +20,11 @@ package org.apache.fineract.portfolio.loanaccount.domain;
import java.time.LocalDate;
import java.util.Set;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.Repository;
import org.springframework.data.repository.query.Param;
public interface LoanAccrualActivityRepository extends Repository<Loan, Long> {
public interface LoanAccrualActivityRepository extends JpaRepository<Loan, Long> {
@Query("select loan.id from Loan loan left join LoanTransaction lt on lt.loan = loan and lt.typeOf = :loanType and lt.reversed = false and lt.dateOf = :currentDate inner join LoanRepaymentScheduleInstallment rs on rs.loan = loan and rs.isDownPayment = false and rs.additional = false and rs.dueDate = :currentDate where loan.loanRepaymentScheduleDetail.enableAccrualActivityPosting = true and loan.loanStatus = :loanStatus and lt.id is null ")
Set<Long> fetchLoanIdsForAccrualActivityPosting(@Param("currentDate") LocalDate currentDate,