Loading poolpay/admin/money.py +6 −1 Changes for poolpay/admin/money.py: 6 added lines, 1 removed line. Original line number Diff line number Diff line import re from decimal import Decimal from babel.numbers import NumberFormatError, parse_decimal from babel.numbers import NumberFormatError, format_currency, parse_decimal from rich.text import Text def format_euros(cents: int) -> str: return format_currency(Decimal(cents) / 100, "EUR", locale="de_DE") def to_decimal_if_numeric(thing: str | Text) -> str | Decimal: str_value = thing.plain if isinstance(thing, Text) else thing str_value_no_currency_symbol = re.sub(r"\s*€$", "", str_value) Loading Loading
poolpay/admin/money.py +6 −1 Changes for poolpay/admin/money.py: 6 added lines, 1 removed line. Original line number Diff line number Diff line import re from decimal import Decimal from babel.numbers import NumberFormatError, parse_decimal from babel.numbers import NumberFormatError, format_currency, parse_decimal from rich.text import Text def format_euros(cents: int) -> str: return format_currency(Decimal(cents) / 100, "EUR", locale="de_DE") def to_decimal_if_numeric(thing: str | Text) -> str | Decimal: str_value = thing.plain if isinstance(thing, Text) else thing str_value_no_currency_symbol = re.sub(r"\s*€$", "", str_value) Loading