{% extends "Global/layout.html.twig" %} {% set pagetitle = 'Order details'|trans %} {% if is_granted('ROLE_ADMINISTRATOR') %} {% set parentpagetitle = 'Manage orders'|trans %} {% set parentpagelink = path('dashboard_administrator_orders') %} {% elseif is_granted('ROLE_ORGANIZER') %} {% set parentpagetitle = 'Recent orders'|trans %} {% set parentpagelink = path('dashboard_organizer_orders') %} {% elseif is_granted('ROLE_ATTENDEE') %} {% set parentpagetitle = 'My tickets'|trans %} {% set parentpagelink = path('dashboard_attendee_orders') %} {% elseif is_granted('ROLE_POINTOFSALE') %} {% set parentpagetitle = 'My orders'|trans %} {% set parentpagelink = path('dashboard_pointOfSale_orders') %} {% endif %} {% block title %}{{pagetitle}}{% endblock %} {% block content %} {% set navigation = [{"dashboard_index": ("Dashboard"|trans), (parentpagelink):parentpagetitle}, {"current":(pagetitle)}] %} {% include "Global/navigation.html.twig" with navigation %}

{{ order.stringifyStatus|trans }} {{ "Order"|trans ~ " #" ~ order.reference ~ " " ~ ("placed on"|trans) ~ " " ~ order.createdAt|display_date }}

{% if order.note %} {% include "Global/message.html.twig" with { type: 'info', icon: 'fas fa-info', message: order.note } %} {% endif %} {% if order.paymentGateway and order.paymentGateway.instructions %} {% include "Global/message.html.twig" with { type: "info", message: (order.paymentGateway.instructions|raw), icon: "fas fa-info-circle" } %} {% endif %}
{% if not is_granted('ROLE_ORGANIZER') and order.payment and order.status == 1 and order.getOrderElementsPriceSum(true) > 0 %}
{{ "Payment"|trans }}
{{ order.stringifyStatus()|trans }} {% if order.status == 1 %} {{ order.payment.paidAt|display_date }} {% endif %}
{% if order.paymentGateway %}
{{ "Payment method"|trans }}
{{ order.paymentGateway.name }}
{% endif %}
{% endif %}
{{ "Attendee"|trans }} / {{ "Point of sale"|trans }}
{% include "Global/user-avatar.html.twig" with { user: order.user } %} {{ order.user.getCrossRoleName }} {% if is_granted('ROLE_ADMINISTRATOR') %} {% endif %} {% if order.payment and order.payment.hasBillingInformation %}
{% if order.payment.firstName and order.payment.lastName %}
{{ "Full name"|trans }}
{{ order.payment.firstName ~ " " ~ order.payment.lastName }}
{% endif %} {% if order.payment.clientEmail %}
{{ "Email"|trans }}
{{ order.payment.clientEmail }}
{% endif %} {% if order.payment.stringifyAddress %}
{{ "Address"|trans }}
{{ order.payment.stringifyAddress }}
{% endif %}
{% endif %}
{% for orderElement in order.orderElements %} {% if is_granted('ROLE_ATTENDEE') or is_granted('ROLE_ADMINISTRATOR') or (is_granted('ROLE_ORGANIZER') and orderElement.belongsToOrganizer(app.user.organizer.slug)) or (is_granted("ROLE_POINTOFSALE") and order.user == app.user) %} {% endif %} {% if is_granted('ROLE_ATTENDEE') %} {% endif %} {% endfor %} {% if is_granted("ROLE_ADMNISTRATOR") or is_granted("ROLE_ATTENDEE") %} {% endif %}
{{ "Event / Ticket"|trans }} {{ "Price"|trans }} {{ "Quantity"|trans }} {{ "Subtotal"|trans }}
{% include "Global/event-preview-horizontal.html.twig" with { eventTicket: orderElement.eventTicket } %} {% if orderElement.reservedSeats and orderElement.reservedSeats|length > 0 %}
{{ "Reserved seats"|trans }}
    {% for reservedSeat in orderElement.reservedSeats %}
  • {{ utils.stringifySeatLabel(reservedSeat) }}
  • {% endfor %}
{% endif %}
{{ orderElement.eventTicket.free ? "Free"|trans : orderElement.unitPrice|format_amount }}
{{ orderElement.quantity }}
{{ orderElement.getPrice()|format_amount }}
{{ "Buy more tickets"|trans }} {{ "Leave a review"|trans }} {{ "Organizer"|trans }}
{{ "Tickets"|trans }}: {{ order.getOrderElementsPriceSum()|format_amount }} {{ "ticket(s)"|trans }})
{{ "Fees"|trans }}: {{ order.getTotalFees()|format_amount }}
{{ "Total"|trans }}: {{ order.getOrderElementsPriceSum(true)|format_amount }}
{% if is_granted('ROLE_ADMINISTRATOR') %} {% if order.status == 0 or order.status == 1 %} {% endif %} {% if order.status == 1 %} {% endif %} {% if order.status == 0 and order.paymentGateway and order.paymentGateway.type == "offline" %} {{ "Validate"|trans }} {% endif %} {% endif %} {% if is_granted('ROLE_ATTENDEE') %} {% endif %} {% if is_granted('ROLE_ORGANIZER') %} {% endif %} {% if order.status == -2 or order.status == 1 %} {% endif %} {% if order.status == 1 %} {{ "Print tickets"|trans }} {% endif %}
{% if order.status == -2 or order.status == 1 %} {% endif %} {% if is_granted('ROLE_ATTENDEE') %} {% endif %} {% if is_granted('ROLE_ORGANIZER') %} {% endif %}
{% endblock %}