mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-05-06 13:01:50 +02:00
parent
f389c56259
commit
317a8ffaa6
2 changed files with 3 additions and 3 deletions
|
@ -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):
|
||||||
|
|
|
@ -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") }})
|
||||||
|
|
Loading…
Reference in a new issue