exclude discount from total price
This commit is contained in:
parent
144d885fbd
commit
2ff8c25034
5 changed files with 27 additions and 25 deletions
|
|
@ -158,7 +158,7 @@ class IndexView(CreateView):
|
|||
)
|
||||
return HttpResponseRedirect(referer_url + "#order_form")
|
||||
|
||||
price, vat, vat_percent = get_vm_price_with_vat(
|
||||
price, vat, vat_percent, discount = get_vm_price_with_vat(
|
||||
cpu=cores,
|
||||
memory=memory,
|
||||
ssd_size=storage,
|
||||
|
|
@ -171,7 +171,8 @@ class IndexView(CreateView):
|
|||
'price': price,
|
||||
'vat': vat,
|
||||
'vat_percent': vat_percent,
|
||||
'total_price': price + vat,
|
||||
'discount': discount,
|
||||
'total_price': price + vat - discount,
|
||||
'pricing_name': vm_pricing_name
|
||||
}
|
||||
request.session['specs'] = specs
|
||||
|
|
@ -388,9 +389,6 @@ class OrderConfirmationView(DetailView):
|
|||
request.session.get('billing_address_data')
|
||||
),
|
||||
'cms_integration': get_cms_integration('default'),
|
||||
'vm_pricing': VMPricing.get_vm_pricing_by_name(
|
||||
self.request.session['specs']['pricing_name']
|
||||
),
|
||||
}
|
||||
return render(request, self.template_name, context)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue