From 49c3450bedc3bd828d7949f3fc4d9cc4b723db26 Mon Sep 17 00:00:00 2001 From: Manthan Surkar <42006277+thesmallstar@users.noreply.github.com> Date: Tue, 3 Mar 2020 01:27:35 +0530 Subject: [PATCH] FINERACT-80: Include Group loans in resultset (#717) --- .../loanaccount/service/LoanReadPlatformServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java index c37589304..c1eadc7e8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java @@ -292,7 +292,7 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService { // to support senario where loan has group_id only OR client_id will // probably require a UNION query // but that at present is an edge case - sqlBuilder.append(" join m_office o on o.id = c.office_id"); + sqlBuilder.append(" join m_office o on (o.id = c.office_id or o.id = g.office_id) "); sqlBuilder.append(" left join m_office transferToOffice on transferToOffice.id = c.transfer_to_office_id "); sqlBuilder.append(" where ( o.hierarchy like ? or transferToOffice.hierarchy like ?)");