{% extends 'base.html.twig' %} {% block title %}Förskottsbetalning - {{ order.orderNr }}{% endblock %} {% block stylesheets %} {% endblock %} {% block body %}

Förskottsbetalning

Order: {{ order.orderNr }} {% if order.dateOrder %}
Datum: {{ order.dateOrder | date('Y-m-d') }}{% endif %} {% if order.totalSumInclTax %}
Att betala: {{ order.totalSumInclTax | number_format(2, ',', ' ') }} kr{% endif %}

{# TSHIRTORDER-1614 FB3 — "Kund" block moved up here, directly under the header and above "Dina Produkter". Read-only, sourced straight from the order (order.customerName/Address/...) — NOT from Svea presetValues. This block has nothing to do with which payment method is picked: it always shows, regardless of whether the Svea iframe below loads or not. Svea's own presetValues API only supports prefilling emailAddress/phoneNumber/postalCode (see "Self-review round 1" in the TSHIRTORDER-1546 doc) — it cannot prefill name/address/city, so that data is shown here on our own page instead. #}

Kund

{# TSHIRTORDER-1614 FB2 — section heading renamed "Kunduppgifter" -> "Kund", label "Namn" -> "Kund" (often a company name for B2B), and fields re-sorted into two columns: left = Kund / Adress / Postkod / Stad, right = Mobil / Email. ("Land" removed per feedback.) #}
Kund: {{ order.customerName }}
Mobil: {{ order.customerMobile }}
Adress: {{ order.customerAddress }}
Email: {{ order.customerEmail }}
Postkod: {{ order.customerPostCode }}
Stad: {{ order.customerCity }}
{# TSHIRTORDER-1614 FB5 — read-only "Leverans" card, sourced from the order. Delivery address mapping is the same as templates/pdf/order/__address.html.twig ("Leveransadress" column). "Order referens" (order.erReference — confirmed with the team, not varReference) and "Information till kund" (order.intoText — the customer-facing field, NOT order.comment which holds internal logs, see TSHIRTORDER-1546 round 5) are shown here too, per feedback. Every row is guarded — no empty labels — and the whole card only renders when at least one of these fields has a value. #} {% if order.deliveryAddress is not empty or order.name is not empty or order.erReference is not empty or order.intoText is not empty %}

Leverans

{% if order.deliveryAddress is not empty or order.name is not empty %} {# Same two-column layout as the "Kund" card above: left = Namn/Adress/Postkod/Stad, right = Mobil/Email. ("Land" removed per feedback.) #}
Namn: {{ order.name }}
Mobil: {{ order.mobileNr }}
{% if order.contactName is not empty %}
Kontakt: {{ order.contactName }}
{% endif %}
Adress: {{ order.deliveryAddress }}
Email: {{ order.contactEmail }}
{% if order.deliveryAddressOther is not empty %}
Annan adress: {{ order.deliveryAddressOther }}
{% endif %}
Postkod: {{ order.deliveryPostNr }}
Stad: {{ order.deliveryCity }}
{% endif %} {% if order.erReference is not empty or order.intoText is not empty %} {% if order.deliveryAddress is not empty or order.name is not empty %}
{% endif %} {% if order.erReference is not empty %}
Order referens: {{ order.erReference }}
{% endif %} {% if order.intoText is not empty %}
Information till kund: {{ order.intoText | raw }}
{% endif %} {% endif %}
{% endif %}

Dina Produkter

{% for item in order.items %} {% endfor %}
Produkter Antal Pris

{{ item.productName }}{{ item.productSizeText is not empty ? ' - ' ~ item.productSizeText : '' }}
Sku: {{ item.productSku }}

{{ item.quantity }} {{ (item.price * item.quantity) | number_format(2, ',', ' ') }} kr
{# Read-only order summary — this page is pay-only, nothing here is editable. Coupon/discount is shown only if the order already has one applied (order.couponCode/discount, no input to apply a new one — order total is already fixed, applying a new coupon here would mean recalculating the whole order, out of scope for this page). Shipping/tax/total are always shown so the customer sees exactly what they're paying for, matching the mockup's summary column. #}
{% if order.couponCode is not empty %}

Rabattkod ({{ order.couponCode }}): -{{ order.discount | number_format(2, ',', ' ') }} kr

{% endif %}

Frakt: {{ order.shippingFee | number_format(2, ',', ' ') }} kr

Varav moms: {{ order.totalTax | number_format(2, ',', ' ') }} kr

Att betala: {{ order.totalSumInclTax | number_format(2, ',', ' ') }} kr

Betalning

{# Only "Svea payment" today (matches the mockup — card/Swish/Trustly all live inside Svea's own iframe). Pre-selected by default since it's the only method — the Svea session is generated on page load to match (see loadSvea() call in $(document).ready() below). Structured as a radio group so a second method can be added later without restructuring. #}
{% endblock %} {% block javascripts %} {% endblock %} {% block custom_javascripts %} {% endblock %}