FINERACT-2055 Internal Server Error Encountered When Accessing Individual Collection Sheet Option

This commit is contained in:
yvana-kengne
2026-01-16 22:18:22 +01:00
committed by Adam Saghy
parent 44b6b29dc5
commit 61d361f998
@@ -741,13 +741,13 @@ public class CollectionSheetReadPlatformServiceImpl implements CollectionSheetRe
sb.append("ln.fee_charges_repaid_derived As feePaid ");
sb.append("FROM m_loan ln ");
sb.append("JOIN m_client cl ON cl.id = ln.client_id ");
sb.append("LEFT JOIN m_office of ON of.id = cl.office_id AND of.hierarchy like :officeHierarchy ");
sb.append("LEFT JOIN m_office off ON off.id = cl.office_id AND off.hierarchy like :officeHierarchy ");
sb.append("LEFT JOIN m_product_loan pl ON pl.id = ln.product_id ");
sb.append("LEFT JOIN m_currency rc on rc." + sqlGenerator.escape("code") + " = ln.currency_code ");
sb.append("JOIN m_loan_repayment_schedule ls ON ls.loan_id = ln.id AND ls.completed_derived = 0 AND ls.duedate <= :dueDate ");
sb.append("where ");
if (checkForOfficeId) {
sb.append("of.id = :officeId and ");
sb.append("off.id = :officeId and ");
}
if (checkforStaffId) {
sb.append("ln.loan_officer_id = :staffId and ");
@@ -829,12 +829,12 @@ public class CollectionSheetReadPlatformServiceImpl implements CollectionSheetRe
"LEFT JOIN m_deposit_account_recurring_detail dard ON sa.id = dard.savings_account_id AND dard.is_mandatory = true AND dard.is_calendar_inherited = false ");
sb.append(
"LEFT JOIN m_mandatory_savings_schedule mss ON mss.savings_account_id=sa.id AND mss.completed_derived = 0 AND mss.duedate <= :dueDate ");
sb.append("LEFT JOIN m_office of ON of.id = cl.office_id AND of.hierarchy like :officeHierarchy ");
sb.append("LEFT JOIN m_office off ON off.id = cl.office_id AND off.hierarchy like :officeHierarchy ");
sb.append("LEFT JOIN m_currency rc on rc." + sqlGenerator.escape("code") + " = sa.currency_code ");
sb.append("WHERE sa.status_enum=300 and sa.group_id is null and sa.deposit_type_enum in (100,300,400) ");
sb.append("and (cl.status_enum = 300 or (cl.status_enum = 600 and cl.closedon_date >= :dueDate)) ");
if (checkForOfficeId) {
sb.append("and of.id = :officeId ");
sb.append("and off.id = :officeId ");
}
if (checkforStaffId) {
sb.append("and sa.field_officer_id = :staffId ");