From e553a2baed3fe2a61d4466d1e7d4dd53498f6c41 Mon Sep 17 00:00:00 2001 From: Jacques Dafflon Date: Tue, 13 Jan 2015 17:21:42 +0100 Subject: [PATCH] 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 --- .../templates/transaction_details.html | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/payment_paypal/indico_payment_paypal/templates/transaction_details.html b/payment_paypal/indico_payment_paypal/templates/transaction_details.html index 535cc67..3e55cbf 100644 --- a/payment_paypal/indico_payment_paypal/templates/transaction_details.html +++ b/payment_paypal/indico_payment_paypal/templates/transaction_details.html @@ -13,9 +13,11 @@ {% endblock %} {% block warning_box %} - {% call warning_message() %} -

{% trans %}The paid amount does not match the required amount. Please contact the registrant to solve the issue.{% endtrans %}

-

{% trans %}Paid: {% endtrans %}{{ format_currency(transaction.amount, transaction.currency, locale=session.lang) }}

-

{% trans %}Required: {% endtrans %}{{ format_currency(registrant.getTotal(), transaction.currency, locale=session.lang) }}

- {% endcall %} + {% if transaction.amount != registrant.getTotal() %} + {% call warning_message() %} +

{% trans %}The paid amount does not match the required amount. Please contact the registrant to solve the issue.{% endtrans %}

+

{% trans %}Paid: {% endtrans %}{{ format_currency(transaction.amount, transaction.currency, locale=session.lang) }}

+

{% trans %}Required: {% endtrans %}{{ format_currency(registrant.getTotal(), transaction.currency, locale=session.lang) }}

+ {% endcall %} + {% endif %} {% endblock %}