fix pos_price in Orderview
This commit is contained in:
parent
3a8a5ea1da
commit
404941b235
|
@ -1,5 +1,4 @@
|
||||||
{% extends "webshop/base.html" %}
|
{% extends "webshop/base.html" %}
|
||||||
{% load customfilters %}
|
|
||||||
{% block section_title %}Order{% endblock %}
|
{% block section_title %}Order{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if order %}
|
{% if order %}
|
||||||
|
@ -26,7 +25,7 @@
|
||||||
<th scope="col" class="price-label">PRICE p.pce.</th>
|
<th scope="col" class="price-label">PRICE p.pce.</th>
|
||||||
<th scope="col" class="price-label">POSITION PRICE</th>
|
<th scope="col" class="price-label">POSITION PRICE</th>
|
||||||
</tr>
|
</tr>
|
||||||
{% for order_position, price in order_position_list_zip %}
|
{% for order_position, price, pos_price in order_position_list_zip %}
|
||||||
<tr class="table_content">
|
<tr class="table_content">
|
||||||
<td scope="col">{{ order_position.id }}</td>
|
<td scope="col">{{ order_position.id }}</td>
|
||||||
<td scope="col">{{ order_position.article.id }}</td>
|
<td scope="col">{{ order_position.article.id }}</td>
|
||||||
|
@ -42,7 +41,7 @@
|
||||||
{{ currency_name }}
|
{{ currency_name }}
|
||||||
</td>
|
</td>
|
||||||
<td scope="col" class="price-value">
|
<td scope="col" class="price-value">
|
||||||
{{ price }} {{ currency_name }}
|
{{ pos_price }} {{ currency_name }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -477,7 +477,9 @@ def order(request, order_id):
|
||||||
price_list.append(price)
|
price_list.append(price)
|
||||||
totalprice_list.append(position_price)
|
totalprice_list.append(position_price)
|
||||||
total = sum(totalprice_list)
|
total = sum(totalprice_list)
|
||||||
order_position_list_zip = zip(order_position_list, price_list)
|
order_position_list_zip = zip(order_position_list,
|
||||||
|
price_list,
|
||||||
|
totalprice_list)
|
||||||
return render(request, 'webshop/order.html', {
|
return render(request, 'webshop/order.html', {
|
||||||
'order': order,
|
'order': order,
|
||||||
'order_position_list_zip': order_position_list_zip,
|
'order_position_list_zip': order_position_list_zip,
|
||||||
|
|
Loading…
Reference in New Issue