Commit Graph

4 Commits

Author SHA1 Message Date
Misaka_Company
bf9199189a Add HTTP print API for packing list and sign-off receipt
- core/printing.py: SumatraPDF silent print backend (dry_run, timeout, error capture)
- core/print_document.py: orchestrate generate() + print, per-report paper size, printer fallback
- core/print_api.py: FastAPI POST /api/print + GET /api/health, HTTPBearer auth, English Swagger at /api/docs
- serve.py: uvicorn entrypoint
- config: printers/print/api sections in settings.yaml + core/settings.py
- requirements.txt: add fastapi, uvicorn
- .gitignore: ignore logs/
2026-08-05 16:22:59 +08:00
Misaka_Company
df8f25f6da Add sign-off receipt report and refine packing list: single-line info bar, real-glyph row height, auto-paginated detail table
- Packing list: info bar changed to a single-line three-column layout (schedule no. | order no. | box no.); packing date moved to bottom-right on the same row as the total; date separator changed to slash
- Packing list: range column widened 20->30mm; quantity/position-no./remark start shifted right 10mm; remark column narrowed to compensate; total width unchanged
- Packing list: detail cells now use line_spacing=1.0 + valign=top; separators changed to thin solid lines at row bottom (+1mm line spacing); placeholder empty rows no longer step y
- Packing list: row height estimation now uses fpdf2's same simhei glyph measured width (replacing rough character-count estimate); _clean adds control-character cleanup
- New sign-off receipt report reports/sign_receipt: master+detail linked query, ReportBro auto-paginated table, PyMuPDF stamped footer (document no. / page no. / sign-off column)
- run.py: required params now read from each report's config.yaml; default output path auto-generated; added transform.stamp_footer post-processing hook
- .gitignore: ignore .workbuddy/
2026-08-04 08:55:09 +08:00
Misaka_Company
22b764ef19 Adjust packing list layout: merge detail-area bottom border, double-line title, dashed detail separators
- Merge the detail area's bottom border into the last record's thick line; remove the redundant thick line above the total (keep vertical spacing, total position unchanged)
- Add a thick line below the "Packing List" title matching the detail header's thickness, forming a "thick-above-thin-below" double line
- Change the detail list inner separators to dashed lines (simulated with multiple short solid segments, as ReportBro lines do not support native dashes); line weight raised from hairline to 1pt
2026-07-30 14:51:37 +08:00
Misaka_Company
4dc563cdd9 Initial commit 2026-07-30 14:17:18 +08:00