From 970834cc38e77a2d3e3a1c9275e5cb677a157fc3 Mon Sep 17 00:00:00 2001 From: PCoder Date: Wed, 29 Jan 2020 16:03:13 +0530 Subject: [PATCH] Add parameters needed for displaying prices after discount, and vat --- datacenterlight/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/datacenterlight/views.py b/datacenterlight/views.py index 0d62cf1e..f1911cbf 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -681,6 +681,9 @@ class OrderConfirmationView(DetailView, FormView): 2) vm_specs["vat_country"] = user_vat_country 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 context.update({