2015-02-22 19:36:00 +00:00
|
|
|
{%- macro render_discount_amount(doc) -%}
|
|
|
|
{%- if doc.discount_amount -%}
|
|
|
|
<div class="row">
|
2017-06-20 08:41:50 +00:00
|
|
|
<div class="col-xs-5 {%- if not doc._align_labels_left %} text-right{%- endif -%}">
|
2016-02-17 13:45:45 +00:00
|
|
|
<label>{{ _("Discount Amount") }}</label></div>
|
2015-02-22 19:36:00 +00:00
|
|
|
<div class="col-xs-7 text-right">
|
2016-02-19 05:44:29 +00:00
|
|
|
- {{ doc.get_formatted("discount_amount", doc) }}
|
2015-02-22 19:36:00 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{%- endif -%}
|
|
|
|
{%- endmacro -%}
|
|
|
|
|
2014-07-16 12:48:34 +00:00
|
|
|
<div class="row">
|
2014-07-28 12:07:52 +00:00
|
|
|
<div class="col-xs-6"></div>
|
|
|
|
<div class="col-xs-6">
|
2015-02-22 19:36:00 +00:00
|
|
|
{%- if doc.apply_discount_on == "Net Total" -%}
|
|
|
|
{{ render_discount_amount(doc) }}
|
|
|
|
{%- endif -%}
|
2014-07-16 12:48:34 +00:00
|
|
|
{%- for charge in data -%}
|
2017-07-12 10:15:32 +00:00
|
|
|
{%- if charge.tax_amount and not charge.included_in_print_rate -%}
|
2014-07-16 12:48:34 +00:00
|
|
|
<div class="row">
|
2017-06-20 08:41:50 +00:00
|
|
|
<div class="col-xs-5 {%- if not doc._align_labels_left %} text-right{%- endif -%}">
|
2014-08-05 06:09:51 +00:00
|
|
|
<label>{{ charge.get_formatted("description") }}</label></div>
|
2014-07-28 12:07:52 +00:00
|
|
|
<div class="col-xs-7 text-right">
|
2015-02-24 09:13:14 +00:00
|
|
|
{{ frappe.format_value(frappe.utils.flt(charge.tax_amount),
|
2014-08-04 11:31:01 +00:00
|
|
|
table_meta.get_field("tax_amount"), doc, currency=doc.currency) }}
|
2014-07-16 12:48:34 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{%- endif -%}
|
|
|
|
{%- endfor -%}
|
2015-02-22 19:36:00 +00:00
|
|
|
{%- if doc.apply_discount_on == "Grand Total" -%}
|
|
|
|
{{ render_discount_amount(doc) }}
|
|
|
|
{%- endif -%}
|
2014-07-16 12:48:34 +00:00
|
|
|
</div>
|
|
|
|
</div>
|