Skip to content

feat(reports): show per-project estimated tax and take-home#8

Merged
0x054 merged 1 commit into
mainfrom
feat/report-tax-take-home
Jun 12, 2026
Merged

feat(reports): show per-project estimated tax and take-home#8
0x054 merged 1 commit into
mainfrom
feat/report-tax-take-home

Conversation

@0x054

@0x054 0x054 commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Reports now show what you actually keep, not just what you billed. With tax.set_aside_rate configured, the TUI reports screen and the CLI ttd report week/month/range project and client views gain est. tax and take-home columns next to billable value, and every report's totals line — including the day view — reports both figures. Without a rate, reports are unchanged: rate 0 means off, the same convention the quarterly tax dashboard uses.

Demo

Week of Jun 8 – Jun 14 2026
Project     ┃ Days ┃ Hours ┃ Activity ┃  Amount ┃ Est. Tax ┃ Take-Home
━━━━━━━━━━━━╇━━━━━━╇━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━
acme/api    │ 1    │  4:00 │ ····█··  │ $600.00 │  $192.00 │   $408.00
acme/design │ 1    │  2:00 │ ····█··  │ $300.00 │   $96.00 │   $204.00
Total: 6:00  ·  $900.00 billable value  ·  $288.00 est. tax  ·  $612.00 take-home

Design notes

  • Amounts reuse the same cents-aligned compute_set_aside math as the quarterly tax dashboard — no new tax primitives in core.
  • Totals are summed from the displayed per-row values, so the columns always add up to the totals line.
  • The TUI rebuilds its column set per render (config reloads fresh each render), so setting or clearing the rate mid-session updates the table on the next refresh.
  • Projects with no hourly rate show in the new columns and stay out of the tax totals, mirroring the existing Amount behavior.
  • The CLI day view keeps its per-row columns lean (no per-cell tax) but still reports est. tax and take-home in the totals line.

Tests

Three new CLI tests (columns with a rate, day-view summary, hidden without a rate) and a TUI pilot test that also covers clearing the rate mid-session. Full suite: 282 passed, coverage 87%, ruff/ty clean.

Reports now answer "what do I actually keep?" per project. When
tax.set_aside_rate is configured, the TUI reports screen and the CLI
report week/month/range project and client views gain est. tax and
take-home columns next to billable value, and every report's totals
line includes both figures. Rate 0 keeps reports exactly as before,
matching the taxes dashboard's "unset means off" behavior.

Amounts reuse the same cents-aligned set-aside math as the quarterly
tax dashboard, and totals are summed from the displayed rows so the
table always adds up. The TUI rebuilds its column set per render,
since config reloads fresh — setting or clearing the rate mid-session
updates the table on the next refresh.
@0x054 0x054 merged commit 6c397de into main Jun 12, 2026
6 checks passed
@0x054 0x054 deleted the feat/report-tax-take-home branch June 12, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant