hsa-app/internal/web/templates/tally.html
Jean-Michel Tremblay 5c21f131fd Add AI auto-fill, tally, recent views, and cheaper-by-default classification
Features (see spec.md v2):
- Wire receipt classification into the upload flow; cheap model (Haiku 4.5)
  is now the default, shown as a footnote with per-scan cost in cents.
- Skip-AI toggle to enter fields by hand.
- Duplicate-transaction warning: live check on date+amount, gated submit.
- Tally tab: person x year totals with margins and grand total.
- Recent uploads / recent receipts tabs with paging and file serving.
- People reconcile on startup: merge stray partial names (e.g. "Jude" ->
  "Jude Tremblay"), reassigning receipts; idempotent seeding.
- scripts/build.sh builds the binary; scripts/run.sh builds and runs with .env.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 22:04:42 -04:00

41 lines
1.1 KiB
HTML

{{define "title"}}Tally{{end}}
{{define "content"}}
<header>
<span><a href="/">← Add receipt</a></span>
<span><a href="/recent">Recent</a> · <a href="/manage">Manage</a> · <a href="/export">Export</a></span>
</header>
<h1>Tally</h1>
{{if .Empty}}
<p><small>No receipts yet. Totals will appear here once you add some.</small></p>
{{else}}
<p><small>Totals by person and receipt-date year, in dollars. Right column is each
person's total; bottom row is each year's total.</small></p>
<div class="tally-wrap">
<table class="tally">
<thead>
<tr>
<th>Who</th>
{{range .Years}}<th class="num">{{.}}</th>{{end}}
<th class="num total">Total</th>
</tr>
</thead>
<tbody>
{{range .Rows}}
<tr>
<th>{{.Person}}</th>
{{range .Cells}}<td class="num">{{if .}}{{.}}{{else}}<span class="muted"></span>{{end}}</td>{{end}}
<td class="num total">{{.Total}}</td>
</tr>
{{end}}
</tbody>
<tfoot>
<tr>
<th>Total</th>
{{range .YearTotals}}<td class="num total">{{.}}</td>{{end}}
<td class="num grand">{{.Grand}}</td>
</tr>
</tfoot>
</table>
</div>
{{end}}
{{end}}