{% load i18n %}
<html>
<body>
    <h1>{% trans "ShopSite" %}</h1>
    <p>
        {% trans "Invoice no" %}. {{ order.id }}<br>
        <span class="secondary">
            {{ order.created|date:"M d, Y" }}
        </span>
    </p>
    <h3>{% trans "Bill to" %}</h3>
    <p>
        {% trans "Name" %}: {{ order.order_receiver_name }}<br>
        {% trans "Email" %}: {{ order.order_email }}<br>
        {% trans "Telephone" %}: {{ order.order_telephone }}<br>
        {% trans "Postal" %}: {{ order.order_receiver_address_postal }}<br>
        {% trans "Address" %}: {{ order.order_receiver_address }}<br>
    </p>
    <h3>{% trans "Item Bought" %}</h3>
    <table class="text-left">
        <thead>
            <tr>
                <th>{% trans "Products" %}</th>
                <th>{% trans "Price" %}</th>
                <th>{% trans "Quantity" %}</th>
                <th>{% trans "Total" %}</th>
            </tr>
        </thead>
        <tbody>
        {% for item in order.orderitems.all %}
        <tr>
<!--            class="row{% cycle "1" "2" %}"-->
            <td>{{ item.product.name }}</td>
            <td>{{ item.price }}</td>
            <td>{{ item.quantity }}</td>
            <td>{{ item.get_cost }}</td>
        </tr>
        {% endfor %}
        <tr class="total">
            <td colspan="3">{% trans "Total" %}</td>
            <td>${{ order.get_total_cost }}</td>
        </tr>
        </tbody>
    </table>
<span class="{% if order.status_order == 'paid' %}paid{% elif order.status_order == 'unpaid' %}pending
{% elif order.status_order == 'cancel' %}cancel{% else %}delete{% endif %}">
    {% if order.status_order == 'paid' %}{% trans "Paid" %}
    {% elif order.status_order == 'unpaid' %}{% trans "Pending Payment" %}
    {% elif order.status_order == 'cancel' %}{% trans "Cancel" %}
    {% elif order.status_order == 'delete' %}{% trans "Delete" %}
    {% endif %}
</span>

</body>
</html>