Round total_price also to 2 decimal places

This commit is contained in:
PCoder 2018-10-18 06:58:18 +02:00
parent 270c610111
commit c36554b4d1
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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
}