equals-wd-card-expense-proc.../templates/receipt
JasonFraser a3196200de Add Receipt Generator tool
Same pattern as the Payslip Generator: self-contained, entirely
client-side (fill in details, live preview, download PDF), no server-
side logic, so no logic.py - just a route serving the page.

Applied the same fixes proactively, since it's the same design/PDF
pattern that had these exact issues:
- SRI-pinned standalone html2canvas + jsPDF instead of html2pdf.js,
  whose bundled html2canvas mis-renders shorter content on this kind
  of page (confirmed on the Payslip Generator via a controlled A/B
  test against the current standalone html2canvas).
- Page-fit math carried over: hotfixes:['px_scaling'], height clamped
  to >= width with explicit orientation:'portrait' (avoids jsPDF
  swapping width/height for landscape-shaped short content), +8px
  buffer against a sub-pixel-rounding extra-page bug.
- Header logo linked back to / (every other tool's header does this).
- Box-shadow stripped on capture - screen chrome, not part of the
  document.
- Wired into the platform: Blueprint at /receipt/, registered in
  main.py, landing-page card added.

Verified end-to-end (headless Chromium, real Download button) across
defaults, zero items, and a tall/complex receipt with discount/tax/
tip/cash payment - single page, fully rendered, no cropping.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-27 18:00:19 -04:00
..
index.html Add Receipt Generator tool 2026-08-27 18:00:19 -04:00