{% 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|localizeddate('none', 'none', app.request.locale, date_timezone, date_format) }}

{% 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 }}
{% if status %} {{ status.value|capitalize|trans }} {% endif %} {% if order.payment.details["TIMESTAMP"] is defined %} {{ order.payment.details["TIMESTAMP"]|localizeddate('none', 'none', app.request.locale, date_timezone, date_format) }} {% elseif order.payment.details["created"] is defined %} {{ order.payment.details["created"]|localizeddate('none', 'none', app.request.locale, date_timezone, date_format) }} {% else %} {{ order.payment.updatedAt|localizeddate('none', 'none', app.request.locale, date_timezone, date_format) }} {% endif %}
{% if order.paymentgateway %}
{{ "Payment method"|trans }}
{{ order.paymentgateway.name }}
{% endif %} {% if order.paymentgateway.factoryName == "paypal_express_checkout" %} {% if order.payment.details["DESC"] is defined %}
{{ "Description"|trans }}
{{ order.payment.details["DESC"] }}
{% endif %} {% if order.payment.details["AMT"] is defined %}
{{ "Amount"|trans }}
{{ order.payment.details["AMT"]|number_format(2, '.', ',') }}
{% endif %} {% if order.payment.details["CURRENCYCODE"] is defined %}
{{ "Currency"|trans }}
{{ order.payment.details["CURRENCYCODE"] }}
{% endif %} {% elseif order.paymentgateway.factoryName == "offline" %} {% if order.payment.details["description"] is defined %}
{{ "Description"|trans }}
{{ order.payment.details["description"] }}
{% endif %} {% if order.payment.details["amount"] is defined %}
{{ "Amount"|trans }}
{{ order.payment.details["amount"]|slice(0, order.payment.details["amount"]|length - 2) }}.{{ order.payment.details["amount"]|slice(order.payment.details["amount"]|length - 2, order.payment.details["amount"]|length) }}
{% endif %} {% if order.payment.details["currency"] is defined %}
{{ "Currency"|trans }}
{{ order.payment.details["currency"] }}
{% endif %} {% 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 %}
  • {{ services.stringifySeatLabel(reservedSeat) }}
  • {% endfor %}
{% endif %}
{{ orderelement.eventticket.free ? "Free"|trans : ((services.getSetting('currency_position') == 'left' ? services.getSetting('currency_symbol') : '') ~ orderelement.displayUnitPrice ~ (services.getSetting('currency_position') == 'right' ? services.getSetting('currency_symbol') : '')) }}
{{ orderelement.quantity }}
{{ services.getSetting('currency_position') == 'left' ? services.getSetting('currency_symbol') : '' }}{{ orderelement.getPrice }}{{ services.getSetting('currency_position') == 'right' ? services.getSetting('currency_symbol') : '' }}
{{ "Buy more tickets"|trans }} {{ "Leave a review"|trans }} {{ "Organizer"|trans }}
{{ "Tickets"|trans }}: {{ services.getSetting('currency_position') == 'left' ? order.currencySymbol() : '' }}{{ order.getOrderElementsPriceSum() }}{{ services.getSetting('currency_position') == 'right' ? order.currencySymbol() : '' }} ({{ order.getOrderElementsQuantitySum }} {{ "ticket(s)"|trans }})
{{ "Fees"|trans }}: {{ services.getSetting('currency_position') == 'left' ? order.currencySymbol() : '' }}{{ order.getTotalFees() }}{{ services.getSetting('currency_position') == 'right' ? order.currencySymbol() : '' }}
{{ "Total"|trans }}: {{ services.getSetting('currency_position') == 'left' ? order.currencySymbol() : '' }}{{ order.getOrderElementsPriceSum(true) }}{{ services.getSetting('currency_position') == 'right' ? order.currencySymbol() : '' }}
{% if is_granted('ROLE_ADMINISTRATOR') %} {% if order.status == 0 or order.status == 1 %} {% endif %} {% if order.deletedAt %} {{ "Restore"|trans }} {% else %} {% endif %} {% if order.status == 1 %} {% endif %} {% if order.status == 0 and not order.deletedAt and order.paymentGateway and order.paymentGateway.factoryName == "offline" %} {{ "Validate"|trans }} {% endif %} {% endif %} {% if is_granted('ROLE_ATTENDEE') and not order.deletedAt %} {% endif %} {% if is_granted('ROLE_ORGANIZER') and not order.deletedAt %} {% 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') and not order.deletedAt %} {% endif %} {% if is_granted('ROLE_ORGANIZER') and not order.deletedAt %} {% endif %}
{% endblock %}