Browse Source

Merge pull request #330 from luc-demeyer/patch-8

[8.0][FIX] mis_builder rounding error
pull/259/merge
Eric @ Elico Corp 8 years ago
committed by GitHub
parent
commit
ea3461e746
  1. 2
      mis_builder/models/mis_builder.py

2
mis_builder/models/mis_builder.py

@ -187,7 +187,7 @@ class MisReportKpi(models.Model):
elif self.compare_method == 'pct': elif self.compare_method == 'pct':
if base_value and round(base_value, self.dp) != 0: if base_value and round(base_value, self.dp) != 0:
delta = (value - base_value) / abs(base_value) delta = (value - base_value) / abs(base_value)
if delta and round(delta, self.dp) != 0:
if delta and round(delta * 100, self.dp) != 0:
return self._render_num( return self._render_num(
lang_id, lang_id,
delta, delta,

Loading…
Cancel
Save