From c36554b4d16ecb3fb30e2d2e86c2544954f37cbf Mon Sep 17 00:00:00 2001
From: PCoder <purple.coder@yahoo.co.uk>
Date: Thu, 18 Oct 2018 06:58:18 +0200
Subject: [PATCH] Round total_price also to 2 decimal places

---
 datacenterlight/views.py | 2 +-
 hosting/views.py         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/datacenterlight/views.py b/datacenterlight/views.py
index af19b244..445ff7cf 100644
--- a/datacenterlight/views.py
+++ b/datacenterlight/views.py
@@ -197,7 +197,7 @@ class IndexView(CreateView):
             'vat': vat,
             'vat_percent': vat_percent,
             'discount': discount,
-            'total_price': price + vat - discount['amount'],
+            'total_price': round(price + vat - discount['amount'], 2),
             'pricing_name': vm_pricing_name
         }
         request.session['specs'] = specs
diff --git a/hosting/views.py b/hosting/views.py
index c2eef1bd..32de4e54 100644
--- a/hosting/views.py
+++ b/hosting/views.py
@@ -1305,7 +1305,7 @@ class CreateVirtualMachinesView(LoginRequiredMixin, View):
             'price': price,
             'vat': vat,
             'vat_percent': vat_percent,
-            'total_price': price + vat - discount['amount'],
+            'total_price': round(price + vat - discount['amount'], 2),
             'pricing_name': vm_pricing_name
         }