obsidian-vault/Infra-Network/SPEC-PAYMENTS-MAP-WEEK-PRINT.md

43 lines
2.7 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# SPEC — Payments MAP WEEK / A4 landscape
**Date:** 2026-09-09
**Status:** implemented on VM500 (`/mapa`)
**Language:** English UI and print output
## Scope
- Navigation and page title: **Payments MAP WEEK**.
- Filters: Week, **Week Range**, Month, Year and Date Range.
- ISO Week Range accepts start year/week and end year/week.
- The same compact range controls also appear in the **Residents in period** header.
- **Rev. 2026-09-19 (006.2026):** All cash payments redesigned (Hash / Ticket / Txn / Rent·Other·Total); Residents in period = behaviour only (weekly due / cash done / 6 prior weeks). Details: `SPEC-SESSION-2026-09-19.md`.
## Print contract
- **Print landscape** prints a dedicated A4 landscape document, not the screen layout.
- The action is available twice: in the page toolbar and, with a printer icon, in the **Residents in period** control bar next to the status filters.
- Excluded: page toolbar, KPI cards, donut charts, collection bridge, search/filter controls and the secondary payments section.
- Included: SA/Granby header, selected date range, active roster filter and the complete Residents table.
- Fixed-width column layout uses the full printable width without horizontal clipping.
- Table header repeats on every printed page; resident rows do not split across pages.
- Printed columns: sequence, status, room, SAGE, resident, **weekly due**, **cash done**, behaviour and **six** prior-week status columns (W−1…W−6).
The on-screen **Residents in period** table does **not** include a “Payments this period” detail column — that belongs only to **All cash payments in this period**.
- Colours are preserved with `print-color-adjust: exact` on the print container and all descendants.
## Status colours in print
- Status and prior-week cells print solid badges with inline colours: green `#047857` (PAID), amber `#b45309` (PART), red `#b91c1c` (UNPAID), slate `#64748b` (FUTURE).
- Resident rows print on white. Status colour lives only in the badges, keeping the sheet clean when most residents are in arrears.
- The print header shows a PAID / PART / UNPAID legend.
## On-screen: All cash payments in this period
- Professional header with **Period** button (`period_headline` + date range).
- Columns: Date, Resident, Room, **Hash**, **Invoice / Ticket**, **Txn**, **Time** (rent only; ancillary shows —), Account, **Rent €**, **Other €**, **Total €**.
- One line per transaction; non-rent amounts in **Other €**; footer = period totals.
- Txn prefixes and hash rules: **`SPEC-TRANSACTION-IDS.md`**.
## Reliability
- Gateway 502/503/504 responses are converted to a short English message; raw Cloudflare HTML is never displayed.
- Payment Map retries transient gateway/network failures up to three times.