correct the order view
This commit is contained in:
parent
683fdc08a6
commit
61124c7000
|
@ -22,7 +22,6 @@
|
|||
<th scope="col">NAME</th>
|
||||
<th scope="col">STOCK</th>
|
||||
<th scope="col">AMOUNT</th>
|
||||
<th scope="col" class="price-label">PRICE p.pce.</th>
|
||||
<th scope="col" class="price-label">POSITION PRICE</th>
|
||||
</tr>
|
||||
{% for order_position, price, pos_price in order_position_list_zip %}
|
||||
|
@ -37,16 +36,12 @@
|
|||
<td scope="col">{{ order_position.article.stock }}</td>
|
||||
<td scope="col">{{ order_position.amount }}</td>
|
||||
<td scope="col" class="price-value">
|
||||
{{ price }}
|
||||
{{ currency_name }}
|
||||
</td>
|
||||
<td scope="col" class="price-value">
|
||||
{{ pos_price }} {{ currency_name }}
|
||||
{{ price }} {{ currency_name }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr>
|
||||
<td scope="col" colspan="5"class="text-right">
|
||||
<td scope="col" colspan="4"class="text-right">
|
||||
<td scope="col" class="price-value">
|
||||
<dl><dt>Total:</dl></dt></td>
|
||||
<td scope="col" class="price-value">
|
||||
|
|
|
@ -456,10 +456,9 @@ def order(request, order_id):
|
|||
else:
|
||||
currency_name = 'CHF'
|
||||
price = order_position.price_in_chf
|
||||
position_price = price * Decimal.from_float(order_position.amount)
|
||||
order_position_list[idx] = order_position
|
||||
price_list.append(price)
|
||||
totalprice_list.append(position_price)
|
||||
totalprice_list.append(price)
|
||||
total = sum(totalprice_list)
|
||||
order_position_list_zip = zip(order_position_list,
|
||||
price_list,
|
||||
|
|
Loading…
Reference in New Issue