{%- macro render_discount_amount(doc) -%}
{%- if doc.discount_amount -%}
- {{ doc.get_formatted("discount_amount", doc) }}
{%- endif -%}
{%- endmacro -%}
{%- if doc.apply_discount_on == "Net Total" -%}
{{ render_discount_amount(doc) }}
{%- endif -%}
{%- for charge in data -%}
{%- if charge.tax_amount and not charge.included_in_print_rate -%}