Payment/PayPal: Fix transaction info warning box

Hide the warning box indicating mismatching amounts paid/expected in the
registrant payment details with Paypal when the amounts are correct
This commit is contained in:
Jacques Dafflon 2015-01-13 17:21:42 +01:00 committed by Adrian Moennich
parent 0a2aaf4ee3
commit e553a2baed

View File

@ -13,9 +13,11 @@
{% endblock %}
{% block warning_box %}
{% call warning_message() %}
<p>{% trans %}The paid amount does not match the required amount. Please contact the registrant to solve the issue.{% endtrans %}</p>
<p>{% trans %}Paid: {% endtrans %}{{ format_currency(transaction.amount, transaction.currency, locale=session.lang) }}</p>
<p>{% trans %}Required: {% endtrans %}{{ format_currency(registrant.getTotal(), transaction.currency, locale=session.lang) }}</p>
{% endcall %}
{% if transaction.amount != registrant.getTotal() %}
{% call warning_message() %}
<p>{% trans %}The paid amount does not match the required amount. Please contact the registrant to solve the issue.{% endtrans %}</p>
<p>{% trans %}Paid: {% endtrans %}{{ format_currency(transaction.amount, transaction.currency, locale=session.lang) }}</p>
<p>{% trans %}Required: {% endtrans %}{{ format_currency(registrant.getTotal(), transaction.currency, locale=session.lang) }}</p>
{% endcall %}
{% endif %}
{% endblock %}