From 7c19113c27e62ac80dd4096bbe0cc7f665d65cb6 Mon Sep 17 00:00:00 2001 From: Sharang Parnerkar <30073382+mighty840@users.noreply.github.com> Date: Wed, 28 Oct 2026 09:03:05 +0100 Subject: [PATCH] fix(erpsetup): top room for the Vertragsbedingungen block on page 2 With page-break-inside: avoid (#96) the block moves whole to page 2, which has no letter head, so it sat flush against the top edge. Give the wrapper 28px top padding. Padding rather than margin: wkhtmltopdf drops a margin at a page break. When the block fits on page 1 it only widens the gap after the totals a little. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01KYcAAeTw22GE9QPzDM8yc4 --- internal/erpsetup/branding.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/erpsetup/branding.go b/internal/erpsetup/branding.go index 44901d2..6942ab7 100644 --- a/internal/erpsetup/branding.go +++ b/internal/erpsetup/branding.go @@ -288,7 +288,9 @@ var documentHTML = brand.Replace(`{%- set is_inv = doc.doctype == "Sales Invoice document discount. -#} {%- set line_discount = 0 - (doc.items | selectattr("rate", "lt", 0) | sum(attribute="amount")) if doc.items else 0 -%} {%- set total_discount = net_discount + line_discount -%} -
+{#- padding, not margin: wkhtmltopdf drops a margin at a page break, and the + block usually moves whole to page 2, which has no letter head. -#} +

Vertragsbedingungen

VertragsartMonatlich wiederkehrende SaaS- und Hosting-Leistungen (Abonnement).