Merge pull request #9373 from sagarvora/gh-9289

Check for align_labels_left before adding text-right class
This commit is contained in:
Makarand Bauskar 2017-06-20 14:31:22 +05:30 committed by GitHub
commit 8fac4314aa

View File

@ -1,7 +1,7 @@
{%- macro render_discount_amount(doc) -%} {%- macro render_discount_amount(doc) -%}
{%- if doc.discount_amount -%} {%- if doc.discount_amount -%}
<div class="row"> <div class="row">
<div class="col-xs-5 text-right"> <div class="col-xs-5 {%- if not doc._align_labels_left %} text-right{%- endif -%}">
<label>{{ _("Discount Amount") }}</label></div> <label>{{ _("Discount Amount") }}</label></div>
<div class="col-xs-7 text-right"> <div class="col-xs-7 text-right">
- {{ doc.get_formatted("discount_amount", doc) }} - {{ doc.get_formatted("discount_amount", doc) }}
@ -19,7 +19,7 @@
{%- for charge in data -%} {%- for charge in data -%}
{%- if not charge.included_in_print_rate -%} {%- if not charge.included_in_print_rate -%}
<div class="row"> <div class="row">
<div class="col-xs-5 text-right"> <div class="col-xs-5 {%- if not doc._align_labels_left %} text-right{%- endif -%}">
<label>{{ charge.get_formatted("description") }}</label></div> <label>{{ charge.get_formatted("description") }}</label></div>
<div class="col-xs-7 text-right"> <div class="col-xs-7 text-right">
{{ frappe.format_value(frappe.utils.flt(charge.tax_amount), {{ frappe.format_value(frappe.utils.flt(charge.tax_amount),