save the order price in CHF
This commit is contained in:
parent
8bbe18945d
commit
9f89b2681a
|
@ -397,11 +397,13 @@ def checkout(request):
|
|||
order = Order.objects.create(user=request.user,
|
||||
status=orderstatus)
|
||||
for position in cart_positions:
|
||||
article = Article.objects.get(pk=position.article.id)
|
||||
OrderPosition.objects.create(
|
||||
article=position.article,
|
||||
order=order,
|
||||
amount=position.amount,
|
||||
price_in_chf=position.article.price_in_chf
|
||||
price_in_chf=article.price_in_chf * Decimal.from_float(
|
||||
position.amount)
|
||||
)
|
||||
return HttpResponseRedirect('/order/%s/' % order.id)
|
||||
|
||||
|
|
Loading…
Reference in New Issue