Files
personal-admin-2026/apps
Jose Selesan 0f62a13246 fix(analysis): compute variation for oldest month in 12-month table
The last row of the monthly variation table (oldest month of the rolling
window) always showed only the inflation value: the window started exactly
at that month, so there was no previous month to compare against, the
variation was null and the currency cells rendered '--' (hiding the prices
too).

- Backend: fetch 13 months (12 displayed + 1 base) so the oldest displayed
  month gets its previous month; bump cache key to monthly-last-v3.
- Backend: fix external fallback filter comparing a full date against a
  month key ('2026-10-14' > '2026-10' is always true), which silently
  dropped the most recent month whenever it was missing from the DB.
  Now filters by month key only.
- Backend: normalize subtractMonths to the 1st of the target month to avoid
  month shifts; skip external quotes without a buy value.
- Frontend: compute variations over the 13 months and render the last 12;
  show the current price when a variation is unavailable so no row is blank.
- Add regression tests for the window size and the external fallback.
2026-10-14 12:05:27 -03:00
..