Skip to content

feat: track annual tax settlement (Steuerbescheid) on /reports/tax-quarter/#196

Merged
dholbach merged 1 commit into
mainfrom
feat/tax-settlement-tracking
Jul 6, 2026
Merged

feat: track annual tax settlement (Steuerbescheid) on /reports/tax-quarter/#196
dholbach merged 1 commit into
mainfrom
feat/tax-settlement-tracking

Conversation

@dholbach

@dholbach dholbach commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • /reports/tax-quarter/ previously only tracked quarterly advance payments (Vorauszahlungen) with no way to record the annual settlement outcome
  • Adds a Steuerbescheid section below the quarterly table where you can record the Nachzahlung (positive) or Erstattung (negative) and the Bescheid date
  • Shows a net tax position line: total advance payments + settlement = what you actually paid for the year
  • Result display is colour-coded (orange = you owe, green = refund)

Changes

  • TaxYearNote model: two new nullable fields (settlement_amount, settlement_date) + migration 0008
  • save_tax_year_note endpoint extended to accept both fields (existing /reports/tax-summary/note/ URL, no new routes)
  • tax_quarter_overview fetches and passes settlement data + net position to context
  • Template rewritten with full i18n wrapping (P-039); no inline styles (M-PAT-04)
  • CSS: .settlement-result, .settlement-result--owe, .settlement-result--refund in tailwind.css

Test plan

  • Visit /reports/tax-quarter/?year=2025 — Steuerbescheid section shows "No assessment recorded yet" with a "Record assessment" button
  • Click "Record assessment", enter a positive amount (e.g. 320.00) and a date, save → page reloads showing the amount as a Nachzahlung with net position
  • Edit to a negative amount (e.g. -150.00) → section shows Erstattung in green
  • Click "Remove" → clears back to empty state
  • Existing quarterly table and advance payment totals are unaffected

🤖 Generated with Claude Code

Adds Nachzahlung / Erstattung tracking to /reports/tax-quarter/.
Previously the page only showed quarterly advance payments (Vorauszahlungen)
with no way to record what the Finanzamt actually assessed after filing.

Model: TaxYearNote gains two nullable fields:
  settlement_amount  — positive = Nachzahlung, negative = Erstattung
  settlement_date    — date of the Bescheid

View: tax_quarter_overview passes the settlement + net tax position
(advance payments + settlement) to context.
save_tax_year_note accepts the two new fields via the existing
/reports/tax-summary/note/ endpoint.

Template: new "Steuerbescheid" section below the quarterly table with an
Alpine.js inline editor, result display (colour-coded owe/refund), and
net-tax-position line. Template fully wrapped in {% trans %} per P-039.

CSS: .settlement-result / .settlement-result--owe / --refund added to
tailwind.css; no inline styles.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@dholbach dholbach merged commit 134da42 into main Jul 6, 2026
1 check passed
@dholbach dholbach deleted the feat/tax-settlement-tracking branch July 6, 2026 15:12
@dholbach dholbach mentioned this pull request Jul 8, 2026
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