diff --git a/CLAUDE.md b/CLAUDE.md index 0e11396..a094364 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -268,12 +268,20 @@ into one, and travel was the only thing visible in the union. The fix is to split on `trips.start_date` and use the axis that carries information in each phase: -- **Booked ahead** (before `start_date`, $22,050.51 / 57% on Europe) — everything - is a flight, a stay or a rail ticket, so category is a constant and **merchant** - is the axis: Agoda $4,490.52, Air India $3,454.32, Luxury Escapes $3,283.80. -- **On the ground** (on/after `start_date`, $16,946.94) — travel falls to - $8,240.74 among dining $4,452.18, transport $2,937.70, entertainment $698.14, - groceries $589.22. **Category is finally worth charting.** +- **Booked ahead** (before `start_date`, **$21,229.56 / 56%** on Europe, 30 + bookings) — everything is a flight, a stay or a rail ticket, so category is a + constant and **merchant** is the axis: Agoda $4,491, Air India $3,454, Azwebin + $2,696, Luxury Escapes $2,463. +- **On the ground** (on/after `start_date`, **$16,946.77**, 180 charges) — travel + falls to $8,241 among dining $4,452, transport $2,938, entertainment $698, + groceries $589, shopping $29. **Category is finally worth charting.** + +These are the **net** figures the page shows, and they are lower than a raw +`SUM(amount)` by design: the phase queries apply `NET_SPEND_ROWS` / `SPEND_SIGNED` +and `EXCLUDE_RECONCILED_SOURCE`, the same fragments as every other analytic. Raw +sums give $22,050.51 committed and Luxury Escapes at $3,283.80 — the $820.95 gap +is a partial refund on that booking. Do not "fix" the difference; a partly +refunded booking must not read at full price. `getTripAnalytics` returns `phases`, `committed_merchants`, `on_ground_categories` and `on_ground_daily`. A trip with a NULL `start_date` has no knowable departure,