36 lines
1.1 KiB
HTML
36 lines
1.1 KiB
HTML
{%- macro render_discount_amount(doc) -%}
|
|
{%- if doc.discount_amount -%}
|
|
<div class="row">
|
|
<div class="col-xs-5 {%- if not doc._align_labels_left %} text-right{%- endif -%}">
|
|
<label>{{ _("Discount Amount") }}</label></div>
|
|
<div class="col-xs-7 text-right">
|
|
- {{ doc.get_formatted("discount_amount", doc) }}
|
|
</div>
|
|
</div>
|
|
{%- endif -%}
|
|
{%- endmacro -%}
|
|
|
|
<div class="row">
|
|
<div class="col-xs-6"></div>
|
|
<div class="col-xs-6">
|
|
{%- if doc.apply_discount_on == "Net Total" -%}
|
|
{{ render_discount_amount(doc) }}
|
|
{%- endif -%}
|
|
{%- for charge in data -%}
|
|
{%- if not charge.included_in_print_rate -%}
|
|
<div class="row">
|
|
<div class="col-xs-5 {%- if not doc._align_labels_left %} 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),
|
|
table_meta.get_field("tax_amount"), doc, currency=doc.currency) }}
|
|
</div>
|
|
</div>
|
|
{%- endif -%}
|
|
{%- endfor -%}
|
|
{%- if doc.apply_discount_on == "Grand Total" -%}
|
|
{{ render_discount_amount(doc) }}
|
|
{%- endif -%}
|
|
</div>
|
|
</div>
|