Hide "each" amount when there's only one recipient (#1008)

Fixes #1002
This commit is contained in:
Glandos 2022-03-24 17:31:50 +01:00 committed by GitHub
parent b89367a3b1
commit eaf059fe91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,10 @@
{% extends "sidebar_table_layout.html" %} {% extends "sidebar_table_layout.html" %}
{%- macro weighted_bill_amount(bill, weights, currency=bill.original_currency, amount=bill.amount) %} {%- macro weighted_bill_amount(bill, weights, currency=bill.original_currency, amount=bill.amount) %}
{{ amount|currency(currency) }} ({{ _("%(amount)s each", amount=(amount / weights)|currency(currency)) }}) {{ amount|currency(currency) }}
{%- if weights != 1.0 %}
({{ _("%(amount)s each", amount=(amount / weights)|currency(currency)) }})
{%- endif -%}
{% endmacro -%} {% endmacro -%}
{% block title %} - {{ g.project.name }}{% endblock %} {% block title %} - {{ g.project.name }}{% endblock %}