fix: Changes in print format due to attribute name changes in frappe (#18641)
This commit is contained in:
parent
df7644a96d
commit
04b42600b0
@ -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 -%}
|
||||
|
@ -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),
|
||||
|
@ -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…
Reference in New Issue
Block a user