From ccc3fac69d9f0c93c9ccb3b03a6d973eb0ef3527 Mon Sep 17 00:00:00 2001 From: Norman King Date: Thu, 9 Jul 2026 08:06:37 -0400 Subject: [PATCH] fix(statements): nudge envelope windows to printed-proof positions Company (return) address down 0.25in (to 0.8in) and customer address down 1.5in (to 3.0in) to line up with the #9 double-window envelope, per a printed proof. Push the body padding-top to clear the lower customer window. Co-Authored-By: Claude Opus 4.8 --- ns_app/api/statements.py | 13 ++++++------- ns_app/templates/statements/customer_statement.html | 8 +++----- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/ns_app/api/statements.py b/ns_app/api/statements.py index 84f81e8..49f5cb5 100644 --- a/ns_app/api/statements.py +++ b/ns_app/api/statements.py @@ -202,24 +202,23 @@ def _wrap_document(pages): overflow: hidden; }} .statement-page:last-of-type {{ page-break-after: auto; }} - /* Window positions match the app's proven #9 (9x4) double-window envelope - geometry — recipient window at top:1.5in/left:1.125in, mirroring - sales_invoice_ns.html ("9x4 envelope position"). */ + /* Window positions are field-tuned to the #9 (9x4) double-window envelope + (verified against a printed proof). */ .return-window {{ - position: absolute; top: 0.55in; left: 0.6in; + position: absolute; top: 0.8in; left: 0.6in; width: 3.5in; font-size: 11px; line-height: 1.3; }} .doc-header {{ - position: absolute; top: 0.55in; right: 0.6in; + position: absolute; top: 0.8in; right: 0.6in; width: 3in; text-align: right; font-size: 13px; line-height: 1.5; }} .doc-header .doc-title {{ font-size: 20px; font-weight: bold; letter-spacing: 1px; }} .recipient-window {{ - position: absolute; top: 1.5in; left: 1.125in; + position: absolute; top: 3.0in; left: 1.125in; width: 4.5in; height: 1.25in; font-size: 15px; line-height: 1.15em; overflow: hidden; }} - .statement-body {{ padding: 2.95in 0.6in 0.6in 0.6in; }} + .statement-body {{ padding: 4.4in 0.6in 0.6in 0.6in; }} .intro {{ font-size: 12px; margin-bottom: 12px; }} table.items, table.aging {{ width: 100%; border-collapse: collapse; }} table.items th, table.items td, diff --git a/ns_app/templates/statements/customer_statement.html b/ns_app/templates/statements/customer_statement.html index 63ce8b1..6661727 100644 --- a/ns_app/templates/statements/customer_statement.html +++ b/ns_app/templates/statements/customer_statement.html @@ -1,9 +1,7 @@ {# One customer account statement = one printed page. - Envelope geometry (recipient window at top:1.5in / left:1.125in) mirrors the - app's proven #9 (9x4) double-window print format (sales_invoice_ns.html) so - the same #9 double-window envelopes work. Rendered via - frappe.render_template with context key `s` - (see ns_app.api.statements.get_statement_data). #} + Envelope geometry (window positions in _wrap_document) is field-tuned to the + #9 (9x4) double-window envelope. Rendered via frappe.render_template with + context key `s` (see ns_app.api.statements.get_statement_data). #} {% set fmt = frappe.utils.fmt_money %}