Session 6 — Xero/PMS Historical Data Integration
What was built
- Xero Historical Data Integration — xero_history_service.py queries Supabase xero_invoices (2,286 rows, $2.7M) and xero_payments (2,269 rows) with 5-min cache
- Revenue aggregation by period/branch/month/year
- PMS Archive Pipeline Integration — 7,774 PMS historical projects blended into pipeline snapshot
- Portal Analytics Enhancements — pipeline dot chart scaled up, all 8 statuses, Xero + PMS blended
- Portal Historical Data Across Pages — Payments: “Historical Invoices — Xero” section; ProjectDetail: historical invoices; Morning Briefing: “Lifetime” revenue banner
- 3 new API endpoints: /history/project-invoices/{id}, /history/xero-invoices, /history/xero-lifetime
Services touched