fix: Decimal point issue for e-invoice
This commit is contained in:
@@ -1,5 +1,11 @@
|
|||||||
{%- macro format_float(value, precision=2) -%}
|
{%- 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 -%}
|
{%- endmacro -%}
|
||||||
|
|
||||||
{%- macro render_address(address) %}
|
{%- macro render_address(address) %}
|
||||||
|
|||||||
Reference in New Issue
Block a user