Format amount in GiroCode/EPC-QR with dot instead of locale

This commit is contained in:
Martin Gross
2019-04-29 13:54:53 +02:00
parent cc8e5a7f83
commit f0128429e4
3 changed files with 11 additions and 2 deletions

View File

@@ -19,7 +19,7 @@ class BankTransferApp(AppConfig):
def ready(self):
from . import signals # NOQA
from . import tasks # NOQA
from .templatetags import commadecimal # NOQA
from .templatetags import commadecimal, dotdecimal # NOQA
@cached_property
def compatibility_warnings(self):

View File

@@ -1,6 +1,7 @@
{% load i18n %}
{% load l10n %}
{% load commadecimal %}
{% load dotdecimal %}
{% load ibanformat %}
{% load money %}
@@ -44,7 +45,7 @@ SCT
{{ settings.bank_details_sepa_bic }}
{{ settings.bank_details_sepa_name }}
{{ settings.bank_details_sepa_iban }}
{{ event.currency }}{{ amount|floatformat:2 }}
{{ event.currency }}{{ amount|dotdecimal }}
{{ code }}

View File

@@ -0,0 +1,8 @@
from django import template
register = template.Library()
@register.filter
def dotdecimal(value):
return str(value).replace(",", ".")