Browse Source

fix: Changes in print format due to attribute name changes in frappe (#18639)

develop
Deepesh Garg 5 years ago
committed by Nabin Hait
parent
commit
065e8f3650
  1. 8
      erpnext/accounts/print_format/sales_invoice_return/sales_invoice_return.html
  2. 4
      erpnext/templates/print_formats/includes/taxes.html
  3. 4
      erpnext/templates/print_formats/includes/total.html

8
erpnext/accounts/print_format/sales_invoice_return/sales_invoice_return.html

@ -4,7 +4,7 @@
{%- macro render_currency(df, doc) -%}
<div class="row {% if df.bold %}important{% endif %} data-field">
<div class="col-xs-{{ "9" if df.fieldtype=="Check" else "5" }}
{%- if doc._align_labels_right %} text-right{%- endif -%}">
{%- if doc.align_labels_right %} text-right{%- endif -%}">
<label>{{ _(df.label) }}</label>
</div>
<div class="col-xs-{{ "3" if df.fieldtype=="Check" else "7" }} value">
@ -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) -%}
<div class="row">
<div class="col-xs-5 {%- if doc._align_labels_right %} text-right{%- endif -%}">
<div class="col-xs-5 {%- if doc.align_labels_right %} text-right{%- endif -%}">
<label>{{ charge.get_formatted("description") }}</label></div>
<div class="col-xs-7 text-right">
{{ frappe.utils.fmt_money((charge.tax_amount)|int|abs, currency=doc.currency) }}
@ -103,8 +103,8 @@
{% for section in page %}
<div class="row section-break">
{% if section.columns.fields %}
{%- if doc._line_breaks and loop.index != 1 -%}<hr>{%- endif -%}
{%- if doc._show_section_headings and section.label and section.has_data -%}
{%- if doc.print_line_breaks and loop.index != 1 -%}<hr>{%- endif -%}
{%- if doc.print_section_headings and section.label and section.has_data -%}
<h4 class='col-sm-12'>{{ _(section.label) }}</h4>
{% endif %}
{%- endif -%}

4
erpnext/templates/print_formats/includes/taxes.html

@ -1,7 +1,7 @@
{%- macro render_discount_amount(doc) -%}
{%- if doc.discount_amount -%}
<div class="row">
<div class="col-xs-5 {%- if doc._align_labels_right %} text-right{%- endif -%}">
<div class="col-xs-5 {%- if doc.align_labels_right %} text-right{%- endif -%}">
<label>{{ _(doc.meta.get_label('discount_amount')) }}</label></div>
<div class="col-xs-7 text-right">
- {{ 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) -%}
<div class="row">
<div class="col-xs-5 {%- if doc._align_labels_right %} text-right{%- endif -%}">
<div class="col-xs-5 {%- if doc.align_labels_right %} text-right{%- endif -%}">
<label>{{ charge.get_formatted("description") }}</label></div>
<div class="col-xs-7 text-right">
{{ frappe.format_value(frappe.utils.flt(charge.tax_amount),

4
erpnext/templates/print_formats/includes/total.html

@ -1,12 +1,12 @@
<div class="row">
{% if doc.flags.show_inclusive_tax_in_print %}
<div class="col-xs-5 {%- if doc._align_labels_right %} text-right{%- endif -%}">
<div class="col-xs-5 {%- if doc.align_labels_right %} text-right{%- endif -%}">
<label>{{ _("Total (Without Tax)") }}</label></div>
<div class="col-xs-7 text-right">
{{ doc.get_formatted("net_total", doc) }}
</div>
{% else %}
<div class="col-xs-5 {%- if doc._align_labels_right %} text-right{%- endif -%}">
<div class="col-xs-5 {%- if doc.align_labels_right %} text-right{%- endif -%}">
<label>{{ _(doc.meta.get_label('total')) }}</label></div>
<div class="col-xs-7 text-right">
{{ doc.get_formatted("total", doc) }}

Loading…
Cancel
Save