replace "No currency" with its code "XXX"

fix #601
This commit is contained in:
Adrien CLERC 2020-05-02 11:41:03 +02:00
parent f389c56259
commit 317a8ffaa6
2 changed files with 3 additions and 3 deletions

View file

@ -13,7 +13,7 @@ class Singleton(type):
class CurrencyConverter(object, metaclass=Singleton): class CurrencyConverter(object, metaclass=Singleton):
# Get exchange rates # Get exchange rates
default = "No Currency" default = "XXX"
api_url = "https://api.exchangeratesapi.io/latest?base=USD" api_url = "https://api.exchangeratesapi.io/latest?base=USD"
def __init__(self): def __init__(self):

View file

@ -117,7 +117,7 @@
</th><th>{{ _("For what?") }} </th><th>{{ _("For what?") }}
</th><th>{{ _("For whom?") }} </th><th>{{ _("For whom?") }}
</th><th>{{ _("How much?") }} </th><th>{{ _("How much?") }}
{% if g.project.default_currency != "No Currency" %} {% if g.project.default_currency != "XXX" %}
</th><th>{{ _("Amount in %(currency)s", currency=g.project.default_currency) }} </th><th>{{ _("Amount in %(currency)s", currency=g.project.default_currency) }}
{%- else -%} {%- else -%}
</th><th>{{ _("Amount") }} </th><th>{{ _("Amount") }}
@ -143,7 +143,7 @@
{{ bill.owers|join(', ', 'name') }} {{ bill.owers|join(', ', 'name') }}
{%- endif %}</td> {%- endif %}</td>
<td> <td>
{% if bill.original_currency != "No Currency" %} {% if bill.original_currency != "XXX" %}
{{ "%0.2f"|format(bill.amount) }} {{bill.original_currency}} ({{ "%0.2f"|format(bill.pay_each_default(bill.amount)) }} {{bill.original_currency}} {{ _(" each") }}) {{ "%0.2f"|format(bill.amount) }} {{bill.original_currency}} ({{ "%0.2f"|format(bill.pay_each_default(bill.amount)) }} {{bill.original_currency}} {{ _(" each") }})
{%- else -%} {%- else -%}
{{ "%0.2f"|format(bill.amount) }} ({{ "%0.2f"|format(bill.pay_each_default(bill.amount)) }} {{ _(" each") }}) {{ "%0.2f"|format(bill.amount) }} ({{ "%0.2f"|format(bill.pay_each_default(bill.amount)) }} {{ _(" each") }})