From db4ba39824dd0a188c743aadfdc9404a26a80a31 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Fri, 18 Jul 2014 18:20:44 +0530 Subject: [PATCH] Better handling of ignore zero values --- erpnext/accounts/report/financial_statements.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py index 3490146eec..59b28da779 100644 --- a/erpnext/accounts/report/financial_statements.py +++ b/erpnext/accounts/report/financial_statements.py @@ -134,10 +134,13 @@ def prepare_data(accounts, balance_must_be, period_list): if d.get(period.key): # change sign based on Debit or Credit, since calculation is done using (debit - credit) d[period.key] *= (1 if balance_must_be=="Debit" else -1) - has_value = True row[period.key] = flt(d.get(period.key, 0.0), 3) + if abs(row[period.key]) >= 0.005: + # ignore zero values + has_value = True + if has_value: out.append(row)