Files
TimeTracker/tests
Dries Peeters a02fec04c8 feat: Add comprehensive expense tracking system
Implement a complete expense tracking feature that allows users to record,
manage, approve, and track business expenses with full integration into
existing project management and invoicing systems.

Features:
- Create and manage expenses with detailed information (amount, category,
  vendor, receipts, tax tracking)
- Multi-currency support (EUR, USD, GBP, CHF)
- Approval workflow with admin oversight (pending → approved → rejected)
- Reimbursement tracking and status management
- Billable expense flagging for client invoicing
- Receipt file upload and attachment
- Project and client association with auto-client selection
- Tag-based organization and advanced filtering
- CSV export functionality
- Analytics dashboard with category breakdowns
- API endpoints for programmatic access

Database Changes:
- Add expenses table with comprehensive schema
- Create Alembic migration (029_add_expenses_table.py)
- Add composite indexes for query performance
- Implement proper foreign key constraints and cascading

Routes & Templates:
- Add expenses blueprint with 14 endpoints (CRUD, approval, export, API)
- Create 4 responsive templates (list, form, view, dashboard)
- Implement advanced filtering (status, category, project, client, date range)
- Add permission-based access control (user vs admin)
- Integrate receipt file upload handling

User Experience:
- Add "Expenses" to Insights navigation menu
- Auto-populate client when project is selected
- Provide visual feedback for auto-selections
- Display summary statistics and analytics
- Implement pagination and search functionality

Testing & Documentation:
- Add 40+ comprehensive tests covering models, methods, and workflows
- Create complete user documentation (docs/EXPENSE_TRACKING.md)
- Add API documentation and examples
- Include troubleshooting guide and best practices

Integration:
- Link expenses to projects for cost tracking
- Associate with clients for billing purposes
- Connect billable expenses to invoicing system
- Add PostHog event tracking for analytics
- Implement structured logging for audit trail

Security:
- Role-based access control (users see only their expenses)
- Admin-only approval and reimbursement actions
- CSRF protection and file upload validation
- Proper permission checks on all operations

This implementation follows existing codebase patterns and includes full
test coverage, documentation, and database migrations per project standards.
2025-10-24 10:42:51 +02:00
..
2025-10-22 08:50:29 +02:00
2025-10-10 11:37:23 +02:00
2025-10-10 14:02:28 +02:00
2025-10-20 21:25:13 +02:00
2025-10-20 21:25:13 +02:00
2025-10-22 11:25:10 +02:00
2025-10-10 13:48:24 +02:00
2025-10-10 11:37:23 +02:00
2025-10-23 14:00:53 +02:00
2025-10-10 11:37:23 +02:00
2025-10-20 21:25:13 +02:00
2025-10-10 11:37:23 +02:00
2025-10-10 13:33:49 +02:00