Add parameters needed for displaying prices after discount, and vat

This commit is contained in:
PCoder 2020-01-29 16:03:13 +05:30
parent 24740438f7
commit 970834cc38

View file

@ -681,6 +681,9 @@ class OrderConfirmationView(DetailView, FormView):
2) 2)
vm_specs["vat_country"] = user_vat_country vm_specs["vat_country"] = user_vat_country
vm_specs["discount"] = discount vm_specs["discount"] = discount
vm_specs["price_with_vat"] = price + vat
vm_specs["price_after_discount"] = round(price - discount['amount'], 2)
vm_specs["price_after_discount_with_vat"] = round((price - discount['amount']) + vm_specs["vat"], 2)
request.session['specs'] = vm_specs request.session['specs'] = vm_specs
context.update({ context.update({