Skip to content

Commit

Permalink
refs #370 Fix bug with international system not supported in UDD
Browse files Browse the repository at this point in the history
  • Loading branch information
vtexier committed Feb 11, 2016
1 parent a320db3 commit caa1023
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/sakia/core/money/dividend_per_day.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,7 @@ async def differential(self):
async def localized(self, units=False, international_system=False):
value = await self.value()
prefix = ""
if international_system:
localized_value, prefix = DividendPerDay.to_si(value, self.app.preferences['digits_after_comma'])
else:
localized_value = QLocale().toString(float(value), 'f', self.app.preferences['digits_after_comma'])
localized_value = QLocale().toString(float(value), 'f', self.app.preferences['digits_after_comma'])

if units or international_system:
return QCoreApplication.translate("Relative", DividendPerDay._REF_STR_) \
Expand All @@ -98,10 +95,7 @@ async def localized(self, units=False, international_system=False):
async def diff_localized(self, units=False, international_system=False):
value = await self.differential()
prefix = ""
if international_system and value != 0:
localized_value, prefix = DividendPerDay.to_si(value, self.app.preferences['digits_after_comma'])
else:
localized_value = QLocale().toString(float(value), 'f', self.app.preferences['digits_after_comma'])
localized_value = QLocale().toString(float(value), 'f', self.app.preferences['digits_after_comma'])

if units or international_system:
return QCoreApplication.translate("Relative", DividendPerDay._REF_STR_) \
Expand Down

0 comments on commit caa1023

Please sign in to comment.