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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KYcAAeTw22GE9QPzDM8yc4
This commit is contained in:
1 parent
950e81c43e
commit
212b1b30d0
1 file changed
+3
-1
@@ -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 -%}
|
||||
<div style="page-break-inside:avoid;">
|
||||
{#- 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. -#}
|
||||
<div style="page-break-inside:avoid;padding-top:28px;">
|
||||
<p class="sepa-head"><b>Vertragsbedingungen</b></p>
|
||||
<table class="meta" style="margin-top:2px;page-break-inside:avoid;">
|
||||
<tr><td class="k">Vertragsart</td><td>Monatlich wiederkehrende SaaS- und Hosting-Leistungen (Abonnement).</td></tr>
|
||||
|
||||
Reference in new issue
Block a user