2016-05-06 20:33:59 +00:00
|
|
|
{% extends 'base.html' %}
|
2016-05-15 22:09:00 +00:00
|
|
|
{% load bootstrap3 %}
|
2016-05-06 20:33:59 +00:00
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
|
2016-05-15 22:09:00 +00:00
|
|
|
<h1>Order #{{ order.id }}</h1>
|
|
|
|
|
2016-05-16 13:25:12 +00:00
|
|
|
{% if not order.open == None %}
|
|
|
|
<form method="POST" class="form-inline">
|
|
|
|
{% csrf_token %}
|
|
|
|
{% endif %}
|
|
|
|
|
2016-05-15 22:09:00 +00:00
|
|
|
<table class="table table-bordered table-hover">
|
|
|
|
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>
|
|
|
|
Name
|
|
|
|
<th>
|
|
|
|
Quantity
|
|
|
|
<th>
|
|
|
|
Price
|
|
|
|
<th>
|
|
|
|
Total
|
|
|
|
|
|
|
|
<tbody>
|
|
|
|
{% for order_product in order.orderproductrelation_set.all %}
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
{{ order_product.product.name }}
|
|
|
|
<td>
|
2016-05-16 13:25:12 +00:00
|
|
|
{% if not order.open == None %}
|
|
|
|
<input type="number"
|
|
|
|
class="form-control"
|
|
|
|
style="width: 75px;"
|
|
|
|
min=1
|
|
|
|
name="{{ order_product.id }}"
|
|
|
|
value="{{ order_product.quantity }}" />
|
|
|
|
{% bootstrap_button '<i class="glyphicon glyphicon-remove"></i>' button_type="submit" button_class="btn-danger" name="remove_product" value=order_product.pk %}
|
|
|
|
</form>
|
|
|
|
{% else %}
|
2016-05-15 22:09:00 +00:00
|
|
|
{{ order_product.quantity }}
|
2016-05-16 13:25:12 +00:00
|
|
|
{% endif %}
|
2016-05-15 22:09:00 +00:00
|
|
|
<td>
|
|
|
|
{{ order_product.product.price }}
|
|
|
|
<td>
|
|
|
|
{{ order_product.total }}
|
|
|
|
|
|
|
|
{% endfor %}
|
|
|
|
|
2016-05-16 14:09:25 +00:00
|
|
|
<tr>
|
|
|
|
<td colspan="2">
|
|
|
|
<td>
|
2016-05-16 14:20:01 +00:00
|
|
|
<strong>Hereof VAT (25%)</strong>
|
2016-05-16 14:09:25 +00:00
|
|
|
<td>
|
|
|
|
{{ order.vat }}
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td colspan="2">
|
|
|
|
<td>
|
|
|
|
<strong>Total</strong>
|
|
|
|
<td>
|
|
|
|
{{ order.total }}
|
2016-05-15 22:09:00 +00:00
|
|
|
|
|
|
|
</table>
|
|
|
|
|
2016-05-16 13:25:12 +00:00
|
|
|
{% if not order.open == None %}
|
|
|
|
|
|
|
|
{% bootstrap_button "Update order" button_type="submit" button_class="btn-primary" name="update_order" %}
|
|
|
|
|
|
|
|
<hr />
|
|
|
|
<h3>Checkout</h3>
|
2016-05-15 22:09:00 +00:00
|
|
|
<form method="POST">
|
|
|
|
{% csrf_token %}
|
2016-05-16 13:25:12 +00:00
|
|
|
{% bootstrap_button "<i class='glyphicon glyphicon-credit-card'></i> Credit card" button_type="submit" button_class="btn-primary" name="payment_method" value="credit_card" %}
|
|
|
|
{% bootstrap_button "<i class='glyphicon glyphicon-bitcoin'></i> Blockchain" button_type="submit" button_class="btn-primary" name="payment_method" value="blockchain" %}
|
|
|
|
{% bootstrap_button "<i class='glyphicon glyphicon-piggy-bank'></i> Bank transfer" button_type="submit" button_class="btn-primary" name="payment_method" value="bank_transfer" %}
|
2016-05-15 22:09:00 +00:00
|
|
|
</form>
|
|
|
|
{% endif %}
|
2016-05-06 20:33:59 +00:00
|
|
|
|
|
|
|
{% endblock %}
|