{%extends "base_print.html" %}
{% load shoppy_tags product_tags %}
{% block title %}
Bestellung {{ order.billnumber }}
{% endblock %}


{% block page_header %}
<div style="clear:both;float:left;font-size:14px;width:21cm;">
<div style="width:100%;">
<img src="{{ MEDIA_URL }}greenstyle/gfx/logo-brief.jpg" alt="ola4you" style="width:100%;"/>
</div>
<div style="clear:both;float:left;margin-top:0cm;font-size:12px;">
ola4you UG &middot;
Lange Str. 71 &middot;
27749 Delmenhorst
</div>
</div>
{% endblock %}
{% block content %}
<div style="clear:both;float:left;margin-top:0cm;font-size:14px;width:21cm;height:25cm;border:0px solid black;">
<div style="clear:both;float:left;margin-top:0cm;width:100%;">
<div style="clear:both;float:left;margin-top:0.5cm;width:8cm;">
{{ order.billing_addr.name }}<br />
{{ order.billing_addr.streetandnr }}<br />
{{ order.billing_addr.zip }} {{ order.billing_addr.city }}<br />
{{ order.billing_addr.country.description }}
</div>
<div style="font-size:24px;font-weight:normal;float:left;margin-top:1.1cm;margin-left:6cm;">
    Rechnung/Lieferschein
</div>
</div>
<div style="clear:both;float:left;margin-top:1cm;margin-left:14cm;">
<table>
    <tr>
        <td style="text-align:left;">Kundennummer:</td>
        <td style="text-align:left;">{{ order.user.username }}</td>
    </tr>
    <tr>
        <td style="text-align:left;">Auftragsnummer:</td>
        <td style="text-align:left;">{{ order.billnumber }}</td>
    </tr>
    <tr>
        <td style="text-align:left;">Auftragsdatum:</td>
        <td style="text-align:left;"> {{ order.orderdate_str }}</td>
    </tr>
</table>
</div>
{% comment %}
<!--
<div style="clear:both;float:left;margin-top:1cm;">
<table>
    <tr>
        <td>
            <div style="clear:both;float:left;">
                <strong>Bestellt von:</strong><br />
                <strong>{{ order.delivery_addr.name }}</strong><br />
                {{ order.delivery_addr.streetandnr }}<br />
                {{ order.delivery_addr.zip }} {{ order.delivery_addr.city }}<br />
                {{ order.delivery_addr.country.description}}
            </div>
        </td>
        <td>
            <div style="float:left;margin-left:3cm;">
                <strong>Empf&auml;nger:</strong><br />
                <strong>{{ order.billing_addr.name }}</strong><br />
                {{ order.billing_addr.streetandnr }}<br />
                {{ order.billing_addr.zip }} {{ order.billing_addr.city }}<br />
                {{ order.billing_addr.country.description }}
            </div>
        </td>
    </tr>
</table>
</div>
-->
{% endcomment %}
<div style="clear:both;float:left;margin-top:1cm;margin-left:0;width:100%;">
<table class="small" style="width:100%;">
    <tr class="bold">
        <td style="width:70px;text-align:left;">Bestell-Nr.</td>
        <td style="width:45px;text-align:left;">Menge</td>
        <td style="width:200px;text-align:left;">Artikelbezeichnung</td>
        <td style="width:70px;text-align:center;">Einzelpreis</td>
        <td style="width:80px;text-align:center;">Gesamtpreis</td>
        <td style="width:250px;text-align:left;">Bemerkung</td>
    </tr>
    <tr>
        <td colspan="6" style="border-top:1px solid black"></td>
    </tr>
    {% for item in order.cart.cartproduct_set.all %}
    <tr>
        <td>{{item.product.orderno}}</td>
        <td style="text-align:center;">{{ item.amount }}</td>
        {% get_product_option_desc item.product.id 1 request.LANGUAGE_CODE %}
        <td style="text-align:left;">{{ productoption1 }}</td>
        <td style="text-align:right;">{{ item.product.get_price_str }}</td>
        <td style="text-align:right;">{{ item.get_price_str }}</td>
        <td></td>
    </tr>
    {% endfor %}
    {% for mitem in order.cart.cartmixproduct_set.all %}
<tr>
	<td>{{mitem.product.get_orderno}}</td>
	<td style="text-align:center;">{{ mitem.amount }}</td>
	<td style="text-align:left;">{{ mitem.product }}</td>
	<td style="text-align:right;">{{ mitem.product.get_price_str }}</td>
	<td style="text-align:right;">{{ mitem.get_price_str }}</td>
	<td style="text-align:left;">
        {% for mpi in mitem.product.mixproducting_set.all %}
            {% if forloop.first %}
            {% else %}
            &nbsp;/&nbsp;
            {% endif %}
            {% ifequal mpi.ing.group.order 3 %}
                {{mpi.ing.size}}
            {% else %}
                {{mpi.ing.name}}
            {% endifequal %}
        {% endfor %}
    </td>
</tr>
{% endfor %}
    <tr>
    <td colspan="6" style="border-top:1px solid black"></td>
    </tr>
    {% ifnotequal order.cart.get_couponmoney_str '0,00 EUR' %}
    <tr>
        <td></td>
        <td></td>
        <td colspan="2" style="padding-top:0.5cm;text-align:right;">Gutscheine:</td>
        <td style="text-align:right;padding-top:0.5cm;">-{{order.cart.get_couponmoney_str}}</td>
        <td></td>
    </tr>
    {% endifnotequal %}
    <tr>
        <td></td>
        <td colspan="3" style="padding-top:0cm;text-align:right;">Pauschale f&uuml;r Versand:</td>
        <td style="text-align:right;padding-top:0cm;">{{ order.cart.get_shipping_fee_str }}</td>
        <td></td>
    </tr>
    <tr>
        <td colspan="6" style="border-top:1px solid black"></td>
    </tr>
    <tr>
        <td></td>
        <td colspan="3" style="text-align:right;">Summe ohne Mwst.:</td>
        <td style="text-align:right;">{{order.cart.get_total_with_fee_notax_str}}</td>
        <td></td>
    </tr>
    <tr>
        <td></td>
        <td colspan="3" style="text-align:right;">Mwst.:</td>
        <td style="text-align:right;">{{order.cart.get_tax_total_with_fee_str}}</td>
        <td></td>
    </tr>
    <tr class="bold">
        <td></td>
        <td colspan="3" style="text-align:right;font-weight:bold;">Gesamt:</td>
        <td style="text-align:right;font-weight:bold;">{{order.cart.get_total_with_fee_str}}</td>
        <td></td>
    </tr>
    <tr>
        <td colspan="6" style="border-top:1px solid black"></td>
    </tr>
</table>
</div>
<div style="clear:both;float:left;">
	Zahlungsweise: {{ order.paymenttype.get_name }}<br />
    Rechnungsstatus: {% if order.paid_date %}beglichen{%else%}offen{%endif%}
</div>
<div style="clear:both;float:left;margin-top:1cm;">
{% comment %}
<p>
Sehr geehrte{% if order.billing %}r Herr/Frau {{ order.billing_addr.name }},
</p>
{% endcomment %}
Bitte begleichen Sie offene Rechnungen innerhalb von 10 Tagen nach Rechnungseingang.
</div>
<div style="clear:both;float:left;margin-top:1.5cm;">
<p>Mit freundlichen Gr&uuml;&szlig;en</p>
<p>Ihr {% shoppy_nameshort %} - Team</p>
</div>
</div>
{% endblock %}

{% block page_foot %}
<div style="clear:both;float:left;margin-top:0cm;font-size:12px;width:21cm;color:olive;border-top:0.01cm solid olive;">
<div style="clear:both;float:left;margin-left:0.4cm;">
ola4you UG (haftungsbeschr&auml;nkt)<br />
Lange Str. 71<br />
Postfach 1234 <br />
27749 Delmenhorst
</div>
<div style="float:left;margin-left:2cm;">
 Telefon +49 4221 5842500  <br />
 E-Mail: info@ola4you.de<br />
 http://www.ola4you.de
</div>
<div style="float:left;margin-left:2cm;">
Gesch&auml;ftsf&uuml;hrer: Marc Petersen<br />
Amtsgericht Delmenhorst<br />
HRB Nr.: {% shoppy_hrb %}<br />
USt-Id: {% shoppy_umstid %}
</div>
<div style="float:left;margin-left:2cm;">
Deutsche Bank <br />
Konto 0304816<br />
BLZ 24070024
</div>
</div>
{% endblock %}
