Spaces:
Running
Running
Commit History
-
feat: add notes to payments and refactor report calculations with party balance auditing script
AI Assistant9f74692
-
feat: implement redis-based caching layer for party data and reporting endpoints
AI Assistant9eecb05
-
Refactor payment service and enhance invoice handling
AI Assistant- Introduced `get_party_balance` function to calculate party balances considering invoices and payments. - Updated `create_payment` to validate payments against outstanding balances at both invoice and party levels. - Enhanced `get_invoice_totals` to return detailed invoice status and amounts. - Added `get_parties_balances` to fetch balances for multiple parties efficiently. - Refactored invoice type checks in reports to use consistent naming conventions (SELL instead of SALE). - Improved performance of reports by consolidating queries and reducing database hits. - Added migration scripts for database schema updates, including new columns and constraints. - Created utility scripts for database inspection and migration tasks. - Added tests for payment over-allocation scenarios to ensure robust error handling.532e918