From bf6c331ac4ad801613978a202849b89554873c45 Mon Sep 17 00:00:00 2001 From: khushi8112 Date: Tue, 30 Sep 2025 10:52:25 +0530 Subject: [PATCH] fix: show tax breakup in print format --- .../print_format_sales_invoice.html | 4 +- .../sales_invoice_print_format.html | 79 +++++++++++-------- 2 files changed, 48 insertions(+), 35 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 0d04bd9be34..3716b816085 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 @@ -285,8 +285,8 @@ print_heading_template=None) -%} -
- +
+
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 b77aff84ed7..9bdcde2c18a 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 @@ -118,6 +118,9 @@ print_heading_template=None) -%} .pb-8 { padding-bottom: 8px; } + .amount-width { + width: 110px; + } .totals-table { border-radius: 5px; @@ -216,8 +219,8 @@ print_heading_template=None) -%} - - + + @@ -246,47 +249,57 @@ print_heading_template=None) -%}
-
-
-
-

{{ _("Total in words") }}

-
{{ doc.in_words }}
-
-
-
+ + + +
+

{{ _("Total in words") }}

+
{{ doc.in_words }}
+
- + - - - - - {% set tax_rate = doc.taxes | selectattr("tax_amount") | sum(attribute="rate") %} {% if - tax_rate > 0 %} - - - - - {% endif %} + {%- if doc.apply_discount_on == "Net Total" -%} + + + + + {%- endif -%} + {%- for tax in doc.taxes -%} + {%- if (tax.tax_amount or print_settings.print_taxes_with_zero_amount) and (not tax.included_in_print_rate or doc.flags.show_inclusive_tax_in_print) -%} + + + + + {%- endif -%} + {%- endfor -%} + {%- if doc.apply_discount_on == "Grand Total" -%} + + + + + {%- endif -%} - +
{{ _("Sub Total:") }}{{ doc.get_formatted("total", doc) }}{{ doc.get_formatted("total", doc) }}
- {{ _("Discount") }} ({{ doc.additional_discount_percentage }}%): - {{ doc.get_formatted("discount_amount", doc) }}
{{ _("Tax") }} ({{ tax_rate }}%):{{ doc.get_formatted("total_taxes_and_charges", doc) }}
+ {{ _("Discount") }} ({{ doc.additional_discount_percentage }}%): + {{ doc.get_formatted("discount_amount", doc) }}
{{ tax.get_formatted("description") }} ({{ tax.get_formatted("rate") }}%):{{ tax.get_formatted("tax_amount") }}
+ {{ _("Discount") }} ({{ doc.additional_discount_percentage }}%): + {{ doc.get_formatted("discount_amount", doc) }}
{{ _("Grand Total:") }}{{ doc.get_formatted("grand_total", doc) }}{{ doc.get_formatted("grand_total", doc) }}
- - +
- {% if doc.terms %} -
-
{{ _("Terms and Conditions") }}
- {{ doc.terms}} -
- {% endif %} +
+ {% if doc.terms %} +
+
{{ _("Terms and Conditions") }}
+ {{ doc.terms}} +
+ {% endif %}
{% endfor %}