FINERACT-2730: add loan and savings transaction search - #6211
Conversation
179742a to
e4305c4
Compare
e4305c4 to
30895a4
Compare
| left join m_office o on o.id = coalesce(c.office_id, g.office_id) \ | ||
| left join m_product_loan pl on pl.id=l.product_id \ | ||
| where o.hierarchy like :hierarchy \ | ||
| and lt.transaction_type_enum = 2 \ |
There was a problem hiding this comment.
Why is there a hardcoded filter for the repayment type?
There was a problem hiding this comment.
Hi @adamsaghy Thanks for pointing this out. I’ve updated the search SQL to avoid hardcoded transaction type enum values.
The loan transaction search now uses LoanTransactionType.REPAYMENT, and savings transaction search uses SavingsAccountTransactionType.DEPOSIT and SavingsAccountTransactionType.WITHDRAWAL as named SQL parameters.
The search scope is unchanged: loan repayments, savings deposits, and savings withdrawals only.
There was a problem hiding this comment.
Why to filter on these types?
There was a problem hiding this comment.
@adamsaghy I kept this filter because the current scope is limited to loan repayments, savings deposits, and savings withdrawals. If you'd prefer it to cover all transaction types, I can update it.
| left join m_office o on o.id = coalesce(c.office_id, g.office_id) \ | ||
| left join m_savings_product sp on sp.id=s.product_id \ | ||
| where o.hierarchy like :hierarchy \ | ||
| and st.transaction_type_enum in (1, 2) \ |
There was a problem hiding this comment.
Why is there a hardcoded filter for the Deposit and Withdrawal type?
30895a4 to
6e50790
Compare
Description
This PR extends the global search functionality to support searching loan repayment and savings transactions.
Users can now search transactions using existing transaction identifiers without changing the current search endpoint or affecting existing search behavior.
Supported searches
Loan repayments
Savings deposits and withdrawals
Changes
loanTransactionsandsavingsTransactionssearch resources.Related Issue
FINERACT-2730
Screenshots
N/A
Checklist