Merge pull request #19067 from rohitwaghchaure/fixed_decimal_point_issue_for_e_invoice

fix: Decimal point issue for e-invoice
This commit is contained in:
rohitwaghchaure
2019-09-16 14:51:50 +05:30
committed by GitHub

View File

@@ -1,5 +1,11 @@
{%- macro format_float(value, precision=2) -%}
{{ value|round(frappe.utils.cint(precision)) }}
{%- if frappe.utils.cint(precision) == 3 %}
{{ "%.3f" % value|abs }}
{%- elif frappe.utils.cint(precision) == 4 -%}
{{ "%.4f" % value|abs }}
{%- else -%}
{{ "%.2f" % value|abs }}
{%- endif %}
{%- endmacro -%}
{%- macro render_address(address) %}