{% load i18n %}

<h2>{% trans "Your data" %}</h2>
<p>
  <strong>{% trans "Full name" %}:</strong> {{ order.full_name }} <br/>
  <strong>{% trans "Email" %}:</strong> {{ order.email }} <br/>
</p>
{% if order.processing_option.address_necessary %}
  <p><strong>{% trans "Shipping address" %}:</strong></p>

  <p>
    {{ order.shipping_full_name }} <br/>
    {{ order.second_address_row }} <br/>
    {{ order.street }} {{ order.housenumber }}<br/>
    {{ order.plz }} {{ order.place }}
  </p>
{% endif %}

<h2>{% trans "Your order" %}</h2>
<table>
  <tr class="first">
    <th>{% trans "Count" %}</th>
    <th>{% trans "Item" %}</th>
    <th>{% trans "Price" %}</th>
    <th>{% trans "Sum" %}</th>
  </tr>
  {% for item in order.items.all %}
    <tr>
      <td>{{ item.count }}</td>
      <td>{{ item.item.name }}</td>
      <td style="text-align: right;">{{ item.item.price|floatformat:"2" }} €</td>
      <td style="text-align: right;">{{ item.total|floatformat:"2" }} €</td>
    </tr>
  {% endfor %}
  <tr>
    <td></td>
    <td> + {{ order.processing_option.name }}</td>
    <td colspan="2" style="text-align: right;">
      {{ order.processing_price|floatformat:"2" }} €
    </td>
  </tr>
  <tr class="sum-row">
    <td></td>
    <th>{% trans "Total" %}</th>
    <th colspan="2" style="text-align: right;">
      {{ order.total|floatformat:"2" }} €
    </th>
  </tr>
</table>