Pennywise

1 min read

Show per-day totals in the Daily / Running table

Summary

Each date group header in the Daily / Running table now shows that day’s total spent, aligned with the amount column, computed in the frontend from the loaded rows with no backend change. Settlements are left out of the total and shown separately as a muted ‘settled’ note on days that have one. Checked in the browser on a month of real data: the day totals added up to the tile’s Incurred figure. Opened as PR 28, stacked on PR 27.

Decisions

  • Exclude settlement rows from the day total, matching the tile’s Incurred figure, because a settlement clears earlier credit spend and counting it would double count the money
  • Show settlements as a subtle muted note next to the entry count instead of a second column, so the total column stays clean and days without settlements look unchanged
  • Compute totals from all rows rather than the visible ones, so the Status filter does not change a day’s figures

Learnings

  • Matching an existing aggregate’s rule (the tile’s Incurred) lets the new numbers be checked by summing them against it