From a6d92e5ec719e665710b256c36ddf9f38cedee98 Mon Sep 17 00:00:00 2001 From: khushi8112 Date: Mon, 22 Sep 2025 14:57:45 +0530 Subject: [PATCH] refactor: small changes for better readability --- .../print_format_sales_invoice.html | 1 + .../sales_invoice_print_format.html | 30 ++++++++++++------- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/erpnext/accounts/print_format/print_format_sales_invoice/print_format_sales_invoice.html b/erpnext/accounts/print_format/print_format_sales_invoice/print_format_sales_invoice.html index 2042b4271ba..f034271f505 100644 --- a/erpnext/accounts/print_format/print_format_sales_invoice/print_format_sales_invoice.html +++ b/erpnext/accounts/print_format/print_format_sales_invoice/print_format_sales_invoice.html @@ -230,6 +230,7 @@ print_heading_template=None) -%} max-width: 24px; min-width: 24px; margin-right: 8px; + vertical-align: middle; " /> diff --git a/erpnext/accounts/print_format/sales_invoice_print_format/sales_invoice_print_format.html b/erpnext/accounts/print_format/sales_invoice_print_format/sales_invoice_print_format.html index 4457b2ac7a6..d98c30700a9 100644 --- a/erpnext/accounts/print_format/sales_invoice_print_format/sales_invoice_print_format.html +++ b/erpnext/accounts/print_format/sales_invoice_print_format/sales_invoice_print_format.html @@ -1,12 +1,18 @@ {%- macro add_header(page_num, max_pages, doc, letter_head, no_letterhead, footer, print_settings=None, -print_heading_template=None) -%} {% if letter_head and not no_letterhead %} +print_heading_template=None) -%} +{% if letter_head and not no_letterhead %}
{{ letter_head }}
-{% endif %} {% if print_heading_template %} {{ frappe.render_template(print_heading_template, {"doc":doc}) }} -{% else %} {% endif %} {%- if doc.meta.is_submittable and doc.docstatus==2-%} +{% endif %} +{% if print_heading_template %} + {{ frappe.render_template(print_heading_template, {"doc":doc}) }} +{% else %} +{% endif %} +{%- if doc.meta.is_submittable and doc.docstatus==2-%}

{{ _("CANCELLED") }}

-{%- endif -%} {%- endmacro -%} {% for page in layout %} +{%- endif -%} +{%- endmacro -%} {% for page in layout %}
{{ add_header(loop.index, layout|len, doc, letter_head, no_letterhead, footer, print_settings) }} @@ -174,7 +180,7 @@ print_heading_template=None) -%} {% if letter_head and not no_letterhead %} }