fix discount amount
This commit is contained in:
parent
eeed9b2e72
commit
3d2ce27954
2 changed files with 4 additions and 4 deletions
|
@ -172,7 +172,7 @@ class IndexView(CreateView):
|
||||||
'vat': vat,
|
'vat': vat,
|
||||||
'vat_percent': vat_percent,
|
'vat_percent': vat_percent,
|
||||||
'discount': discount,
|
'discount': discount,
|
||||||
'total_price': price + vat - discount.amount,
|
'total_price': price + vat - discount['amount'],
|
||||||
'pricing_name': vm_pricing_name
|
'pricing_name': vm_pricing_name
|
||||||
}
|
}
|
||||||
request.session['specs'] = specs
|
request.session['specs'] = specs
|
||||||
|
|
|
@ -764,7 +764,7 @@ class OrdersHostingDetailView(LoginRequiredMixin, DetailView):
|
||||||
context['vm']['price'] = price
|
context['vm']['price'] = price
|
||||||
context['vm']['discount'] = discount
|
context['vm']['discount'] = discount
|
||||||
context['vm']['vat_percent'] = vat_percent
|
context['vm']['vat_percent'] = vat_percent
|
||||||
context['vm']['total_price'] = price + vat - discount.amount
|
context['vm']['total_price'] = price + vat - discount['amount']
|
||||||
context['subscription_end_date'] = vm_detail.end_date()
|
context['subscription_end_date'] = vm_detail.end_date()
|
||||||
except VMDetail.DoesNotExist:
|
except VMDetail.DoesNotExist:
|
||||||
try:
|
try:
|
||||||
|
@ -785,7 +785,7 @@ class OrdersHostingDetailView(LoginRequiredMixin, DetailView):
|
||||||
context['vm']['discount'] = discount
|
context['vm']['discount'] = discount
|
||||||
context['vm']['vat_percent'] = vat_percent
|
context['vm']['vat_percent'] = vat_percent
|
||||||
context['vm']['total_price'] = price + \
|
context['vm']['total_price'] = price + \
|
||||||
vat - discount.amount
|
vat - discount['amount']
|
||||||
except WrongIdError:
|
except WrongIdError:
|
||||||
messages.error(
|
messages.error(
|
||||||
self.request,
|
self.request,
|
||||||
|
@ -1085,7 +1085,7 @@ class CreateVirtualMachinesView(LoginRequiredMixin, View):
|
||||||
'price': price,
|
'price': price,
|
||||||
'vat': vat,
|
'vat': vat,
|
||||||
'vat_percent': vat_percent,
|
'vat_percent': vat_percent,
|
||||||
'total_price': price + vat - discount.amount,
|
'total_price': price + vat - discount['amount'],
|
||||||
'pricing_name': vm_pricing_name
|
'pricing_name': vm_pricing_name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue