From d62986c91f472368e9ad9a34bfdbaa00e11ef0c6 Mon Sep 17 00:00:00 2001 From: PCoder Date: Thu, 26 Dec 2019 20:05:55 +0530 Subject: [PATCH] Bugfix: use correct total price after discount --- datacenterlight/views.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/datacenterlight/views.py b/datacenterlight/views.py index bd940c5f..8d371c97 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -662,14 +662,13 @@ class OrderConfirmationView(DetailView, FormView): request.session["vat_validation_status"] == "verified"): vm_specs["vat_percent"] = 0 vm_specs["vat"] = 0 - vm_specs["total_price"] = price vm_specs["vat_validation_status"] = "verified" else: vm_specs["vat"] = vat vm_specs["vat_percent"] = vat_percent - vm_specs["total_price"] = round(price + vat - discount['amount'], 2) vm_specs["vat_validation_status"] = request.session["vat_validation_status"] if "vat_validation_status" in request.session else "" - + vm_specs["total_price"] = round(price + vat - discount['amount'], + 2) vm_specs["vat_country"] = user_vat_country vm_specs["discount"] = discount request.session['specs'] = vm_specs