fix: change condition
This commit is contained in:
parent
d511499c1a
commit
1d096040d8
1 changed files with 5 additions and 7 deletions
|
|
@ -385,13 +385,11 @@ def format_duration_fields(data: frappe._dict) -> None:
|
|||
|
||||
def format_currency_fields(data: frappe._dict) -> None:
|
||||
for i, col in enumerate(data.columns):
|
||||
if col.get("fieldtype") != "Currency" and col.get("precision"):
|
||||
continue
|
||||
|
||||
for row in data.result:
|
||||
index = col.get("fieldname") if isinstance(row, dict) else i
|
||||
if row[index]:
|
||||
row[index] = round(row[index], col.get("precision"))
|
||||
if col.get("fieldtype") == "Currency" and col.get("precision"):
|
||||
for row in data.result:
|
||||
index = col.get("fieldname") if isinstance(row, dict) else i
|
||||
if row[index]:
|
||||
row[index] = round(row[index], col.get("precision"))
|
||||
|
||||
|
||||
def build_xlsx_data(data, visible_idx, include_indentation, include_filters=False, ignore_visible_idx=False):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue