FINERACT-80: Include Group loans in resultset (#717)

This commit is contained in:
Manthan Surkar
2020-03-02 20:57:35 +01:00
committed by GitHub
parent 228ec22a60
commit 49c3450bed
@@ -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 ?)");