Better handling of ignore zero values
This commit is contained in:
parent
825d014616
commit
db4ba39824
@ -134,10 +134,13 @@ def prepare_data(accounts, balance_must_be, period_list):
|
|||||||
if d.get(period.key):
|
if d.get(period.key):
|
||||||
# change sign based on Debit or Credit, since calculation is done using (debit - credit)
|
# 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)
|
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)
|
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:
|
if has_value:
|
||||||
out.append(row)
|
out.append(row)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user