diff --git a/conservancy_beancount/reports/core.py b/conservancy_beancount/reports/core.py index 21ed4fa..985c85f 100644 --- a/conservancy_beancount/reports/core.py +++ b/conservancy_beancount/reports/core.py @@ -755,13 +755,6 @@ class BaseODS(BaseSpreadsheet[RT, ST], metaclass=abc.ABCMeta): grouping = pattern.grouping[0] else: grouping = pattern.grouping[fmt_index] - zero_s = babel.numbers.format_currency(0, code, '##0.0', locale) - try: - decimal_index = zero_s.rindex('.') + 1 - except ValueError: - decimalplaces = 0 - else: - decimalplaces = len(zero_s) - decimal_index style = self.replace_child( root, odf.number.CurrencyStyle, @@ -775,7 +768,7 @@ class BaseODS(BaseSpreadsheet[RT, ST], metaclass=abc.ABCMeta): pass elif not part.strip('#0,.'): style.addElement(odf.number.Number( - decimalplaces=str(decimalplaces), + decimalplaces=str(pattern.frac_prec[0]), grouping='true' if grouping else 'false', minintegerdigits=str(minintegerdigits), ))