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 <noreply@anthropic.com>
This commit is contained in:
1 parent
b4c184c26f
commit
c8ad1337b5
1 file changed
+7
-6
@@ -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 "" -%}
|
||||
<table style="width:100%;border-collapse:collapse;border-top:0.5px solid $LINE;font-family:Arial,Helvetica,sans-serif;color:$FAINT;">
|
||||
<div style="border-top:1px solid $LINE;"></div>
|
||||
<table style="width:100%;border-collapse:collapse;font-family:Arial,Helvetica,sans-serif;color:$FAINT;">
|
||||
<tr>
|
||||
<td style="vertical-align:top;padding:5px 8px 0 0;width:21%;font-size:6.5pt;line-height:1.45;"><b style="color:$MUTED;">{{ doc.company }}</b><br>{{ bp_addr.address_line1 }}<br>{{ bp_addr.pincode }} {{ bp_addr.city }}</td>
|
||||
<td style="vertical-align:top;padding:5px 8px 0 0;width:28%;font-size:6.5pt;line-height:1.45;">$REGISTER_BR<br>USt-IdNr. {{ frappe.db.get_value("Company", doc.company, "tax_id") or "" }}</td>
|
||||
<td style="vertical-align:top;padding:5px 8px 0 0;width:24%;font-size:6.5pt;line-height:1.45;white-space:nowrap;"><b style="color:$MUTED;">{{ doc.company }}</b><br>{{ bp_addr.address_line1 }}<br>{{ bp_addr.pincode }} {{ bp_addr.city }}</td>
|
||||
<td style="vertical-align:top;padding:5px 8px 0 0;width:27%;font-size:6.5pt;line-height:1.45;">$REGISTER_BR<br>USt-IdNr. {{ frappe.db.get_value("Company", doc.company, "tax_id") or "" }}</td>
|
||||
<td style="vertical-align:top;padding:5px 8px 0 0;width:21%;font-size:6.5pt;line-height:1.45;">$DIRECTORS_BR</td>
|
||||
<td style="vertical-align:top;padding:5px 0 0 0;width:30%;font-size:6.5pt;line-height:1.45;">{% if bp_bank.iban %}{{ bp_bank.bank }}<br>IBAN {{ bp_bank.iban }}{% if bp_bic %}<br>BIC {{ bp_bic }}{% endif %}{% endif %}</td>
|
||||
<td style="vertical-align:top;padding:5px 0 0 0;width:28%;font-size:6.5pt;line-height:1.45;">{% if bp_bank.iban %}{{ bp_bank.bank }}<br>IBAN {{ bp_bank.iban }}{% if bp_bic %}<br>BIC {{ bp_bic }}{% endif %}{% endif %}</td>
|
||||
</tr>
|
||||
</table>`, "${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; }
|
||||
|
||||
Reference in new issue
Block a user