Bug #2954
Wallet report - Date Range issue Fixes
Description
Wallet report - Date Range issue Fixes
Updated by Shreya Agarwal about 2 months ago
completed the backend implementation for fixing the date filter issue on wallet summary and transactions APIs. The core problem was that both APIs had a hardcoded 90-day restriction, which meant users could never see their complete transaction history even when selecting "All Time" from the UI.
The fix involved making the date parameters optional across all layers of the application - from the controller all the way down to the database queries. I removed all hardcoded 90-day defaults from both the wallet summary endpoint and the transactions history endpoint. The repository layer was updated to dynamically build SQL WHERE clauses, so when no dates are provided, the query returns all transactions without any date restriction.
I also updated the DTO mapping extensions to handle nullable dates properly. All modified methods now accept optional fromDate and toDate parameters that default to null, which signals "no date filter" to the database.