From c8ad1337b5e033339ff7fba0e601503b4dcf828f Mon Sep 17 00:00:00 2001 From: Sharang Parnerkar <30073382+mighty840@users.noreply.github.com> Date: Mon, 19 Oct 2026 23:12:26 +0200 Subject: [PATCH] fix(erpsetup): visible footer line in PDFs, tighter totals The PDF renderer drops the 0.5px top border of the letter footer table, so the line above the footer showed in the browser preview but not in the PDF. The line is now a 1px border on its own div. The company address column no longer wraps the city, and the totals rows keep their 2px padding: Frappe's print stylesheet sets cell padding with !important, which spread the totals over twice the height. Co-Authored-By: Claude Opus 5.5 --- internal/erpsetup/branding.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/internal/erpsetup/branding.go b/internal/erpsetup/branding.go index 5c72e44..608040a 100644 --- a/internal/erpsetup/branding.go +++ b/internal/erpsetup/branding.go @@ -155,12 +155,13 @@ var letterHeadHTML = brand.Replace(strings.ReplaceAll(`${companyVars} var letterFooterHTML = brand.Replace(strings.ReplaceAll(`${companyVars} {%- set bp_bic = frappe.db.get_value("Bank", bp_bank.bank, "swift_number") if bp_bank.bank else "" -%} - +
+
- - + + - +
{{ doc.company }}
{{ bp_addr.address_line1 }}
{{ bp_addr.pincode }} {{ bp_addr.city }}
$REGISTER_BR
USt-IdNr. {{ frappe.db.get_value("Company", doc.company, "tax_id") or "" }}
{{ doc.company }}
{{ bp_addr.address_line1 }}
{{ bp_addr.pincode }} {{ bp_addr.city }}
$REGISTER_BR
USt-IdNr. {{ frappe.db.get_value("Company", doc.company, "tax_id") or "" }}
$DIRECTORS_BR{% if bp_bank.iban %}{{ bp_bank.bank }}
IBAN {{ bp_bank.iban }}{% if bp_bic %}
BIC {{ bp_bic }}{% endif %}{% endif %}
{% if bp_bank.iban %}{{ bp_bank.bank }}
IBAN {{ bp_bank.iban }}{% if bp_bic %}
BIC {{ bp_bic }}{% endif %}{% endif %}
`, "${companyVars}", companyVars)) @@ -201,8 +202,8 @@ var documentHTML = brand.Replace(`{%- set is_inv = doc.doctype == "Sales Invoice .bp .desc { font-size: 7.5pt; color: $MUTED; } .bp .nw { white-space: nowrap; } .bp .totals { margin-left: auto; margin-top: 10px; min-width: 45%; } -.bp .totals td { padding: 2px 0 2px 16px; } -.bp .totals tr.grand td { border-top: 1px solid $INK; font-weight: bold; font-size: 10.5pt; padding-top: 5px; } +.bp .totals td { padding: 2px 0 2px 16px !important; } +.bp .totals tr.grand td { border-top: 1px solid $INK; font-weight: bold; font-size: 10.5pt; padding-top: 5px !important; } .bp .note { margin-top: 18px; font-size: 8.5pt; } .bp .sepa-head { margin: 10px 0 2px 0; } .bp .note p.sepa-head + p { margin-top: 0; } -- 2.54.1