From 065e8f3650baf2ed3798b8e5afd914b2d28b7943 Mon Sep 17 00:00:00 2001 From: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com> Date: Thu, 8 Aug 2019 15:51:56 +0530 Subject: [PATCH] fix: Changes in print format due to attribute name changes in frappe (#18639) --- .../sales_invoice_return/sales_invoice_return.html | 8 ++++---- erpnext/templates/print_formats/includes/taxes.html | 4 ++-- erpnext/templates/print_formats/includes/total.html | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/erpnext/accounts/print_format/sales_invoice_return/sales_invoice_return.html b/erpnext/accounts/print_format/sales_invoice_return/sales_invoice_return.html index 889b7f71aa..2c015192c4 100644 --- a/erpnext/accounts/print_format/sales_invoice_return/sales_invoice_return.html +++ b/erpnext/accounts/print_format/sales_invoice_return/sales_invoice_return.html @@ -4,7 +4,7 @@ {%- macro render_currency(df, doc) -%}
+ {%- if doc.align_labels_right %} text-right{%- endif -%}">
@@ -23,7 +23,7 @@ {%- for charge in data -%} {%- if (charge.tax_amount or doc.flags.print_taxes_with_zero_amount) and (not charge.included_in_print_rate or doc.flags.show_inclusive_tax_in_print) -%}
-
+
{{ frappe.utils.fmt_money((charge.tax_amount)|int|abs, currency=doc.currency) }} @@ -103,8 +103,8 @@ {% for section in page %}
{% if section.columns.fields %} - {%- if doc._line_breaks and loop.index != 1 -%}
{%- endif -%} - {%- if doc._show_section_headings and section.label and section.has_data -%} + {%- if doc.print_line_breaks and loop.index != 1 -%}
{%- endif -%} + {%- if doc.print_section_headings and section.label and section.has_data -%}

{{ _(section.label) }}

{% endif %} {%- endif -%} diff --git a/erpnext/templates/print_formats/includes/taxes.html b/erpnext/templates/print_formats/includes/taxes.html index 377f9a34bd..6e984f3901 100644 --- a/erpnext/templates/print_formats/includes/taxes.html +++ b/erpnext/templates/print_formats/includes/taxes.html @@ -1,7 +1,7 @@ {%- macro render_discount_amount(doc) -%} {%- if doc.discount_amount -%}
-
+
- {{ doc.get_formatted("discount_amount", doc) }} @@ -19,7 +19,7 @@ {%- for charge in data -%} {%- if (charge.tax_amount or doc.flags.print_taxes_with_zero_amount) and (not charge.included_in_print_rate or doc.flags.show_inclusive_tax_in_print) -%}
-
+
{{ frappe.format_value(frappe.utils.flt(charge.tax_amount), diff --git a/erpnext/templates/print_formats/includes/total.html b/erpnext/templates/print_formats/includes/total.html index c13bf92760..81799809ba 100644 --- a/erpnext/templates/print_formats/includes/total.html +++ b/erpnext/templates/print_formats/includes/total.html @@ -1,12 +1,12 @@
{% if doc.flags.show_inclusive_tax_in_print %} -
+
{{ doc.get_formatted("net_total", doc) }}
{% else %} -
+
{{ doc.get_formatted("total", doc) }}