9f49255253
PR #341 added a useEffect in the Invoices page that fetches /api/invoices/stats/summary. The existing /api/invoices mock was too broad and intercepted this URL, returning { data: [], total: 0 } instead of the stats shape { revenueThisMonth, outstanding, refundsThisMonth, methodBreakdown }. This caused a runtime crash when rendering paymentStats.revenueThisMonth. The fix adds a specific mock for /api/invoices/stats/summary before the general /api/invoices mock, so the stats endpoint returns the correct shape. Fixes GRO-820. Co-Authored-By: Paperclip <noreply@paperclip.ing>