fix pos_price in Orderview

This commit is contained in:
Ivan Hörler 2018-02-28 21:40:17 +01:00
parent 3a8a5ea1da
commit 404941b235
2 changed files with 5 additions and 4 deletions

View File

@ -1,5 +1,4 @@
{% extends "webshop/base.html" %}
{% load customfilters %}
{% block section_title %}Order{% endblock %}
{% block content %}
{% if order %}
@ -26,7 +25,7 @@
<th scope="col" class="price-label">PRICE p.pce.</th>
<th scope="col" class="price-label">POSITION PRICE</th>
</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">
<td scope="col">{{ order_position.id }}</td>
<td scope="col">{{ order_position.article.id }}</td>
@ -42,7 +41,7 @@
{{ currency_name }}
</td>
<td scope="col" class="price-value">
{{ price }} {{ currency_name }}
{{ pos_price }} {{ currency_name }}
</td>
</tr>
{% endfor %}

View File

@ -477,7 +477,9 @@ def order(request, order_id):
price_list.append(price)
totalprice_list.append(position_price)
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', {
'order': order,
'order_position_list_zip': order_position_list_zip,