Skip to content
Snippets Groups Projects
Commit 3cb5a502 authored by inso's avatar inso
Browse files

Fix bugs in referentials

parent c3a9cf73
No related branches found
No related tags found
No related merge requests found
......@@ -49,9 +49,7 @@ class QuantitativeZSum:
@asyncio.coroutine
def localized(self, units=False, international_system=False):
value = yield from self.value()
if international_system:
pass
else:
localized_value = QLocale().toString(float(value), 'f', 0)
if units:
......
......@@ -41,6 +41,7 @@ class RelativeZSum:
relative_value = self.amount / float(dividend)
relative_median = median / dividend
else:
relative_value = self.amount
relative_median = 0
return relative_value - relative_median
......@@ -51,9 +52,7 @@ class RelativeZSum:
@asyncio.coroutine
def localized(self, units=False, international_system=False):
value = yield from self.value()
if international_system:
pass
else:
localized_value = QLocale().toString(float(value), 'f', self.app.preferences['digits_after_comma'])
if units:
......@@ -64,11 +63,8 @@ class RelativeZSum:
return localized_value
def diff_localized(self, units=False, international_system=False):
value = self.differential()
value = yield from self.differential()
if international_system:
pass
else:
localized_value = QLocale().toString(float(value), 'f', self.app.preferences['digits_after_comma'])
if units:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment