{% if gift is not empty %} {% set inv_accepted_count = 0 %} {% for inv in gift.invitation %} {% if inv.vUser.id == vUser.id and inv.confirmedAt is not empty %} {% set inv_accepted_count = inv_accepted_count+1 %} {% endif %} {% endfor %} {% include 'partials/_subheader.html.twig' with { giftId: gift.id } %} {% include 'partials/_steps.html.twig' with { giftId: gift.id, vUser: vUser } %}
{% include 'partials/_alert.html.twig' %} {% if inv_accepted_count > 0 %} {% set interval = date().diff(gift.validUntil) %} {% if is_granted("IS_AUTHENTICATED_REMEMBERED") %} {% if interval.invert %} {% if payments is empty %}

No Payments

{% else %} {% for payment in payments %} {% if payment.balance != 0 %} {% endif %} {% endfor %}
{% set arrow_right = '' %} {% if payment.balance < 0 %} {{ app.user.username }} {{ arrow_right|raw }} {{ payment.username }} {% else %} {{ payment.username }} {{ arrow_right|raw }} {{ app.user.username }} {% endif %} {{ payment.balance|price_format }}
{% endif %}
{{ render(controller('AppBundle:ImnuuPayment:openGiftFormPartial', { giftId: gift.id })) }}
{% else %}
{{ render(controller('AppBundle:ImnuuPayment:closeGiftFormPartial', { giftId: gift.id })) }}
{% endif %} {% else %} {% endif %} {% endif %}
{% else %}
{% include 'partials/_alert.html.twig' %}
{% endif %}