fix(erpsetup): visible footer line in PDFs, tighter totals #81

Merged
sharang merged 1 commits from fix/print-footer-line into main 2026-10-19 21:38:29 +00:00
+7 -6
View File
@@ -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; }