Fix proper VAT values
This commit is contained in:
parent
7a9b315e2e
commit
f4393426d3
1 changed files with 4 additions and 3 deletions
|
@ -680,10 +680,11 @@ class OrderConfirmationView(DetailView, FormView):
|
||||||
vm_specs["total_price"] = round(price + vm_specs["vat"] - discount['amount_with_vat'],
|
vm_specs["total_price"] = round(price + vm_specs["vat"] - discount['amount_with_vat'],
|
||||||
2)
|
2)
|
||||||
vm_specs["vat_country"] = user_vat_country
|
vm_specs["vat_country"] = user_vat_country
|
||||||
vm_specs["discount"] = discount
|
vm_specs["price_with_vat"] = round(price * (1 + vm_specs["vat_percent"]), 2)
|
||||||
vm_specs["price_with_vat"] = round(price + vm_specs["vat"], 2)
|
|
||||||
vm_specs["price_after_discount"] = round(price - discount['amount'], 2)
|
vm_specs["price_after_discount"] = round(price - discount['amount'], 2)
|
||||||
vm_specs["price_after_discount_with_vat"] = round((price - discount['amount_with_vat']) + vm_specs["vat"], 2)
|
vm_specs["price_after_discount_with_vat"] = round((price - discount['amount']) * (1 + vm_specs["vat_percent"]), 2)
|
||||||
|
discount["amount_with_vat"] = vm_specs["price_with_vat"] - vm_specs["price_after_discount_with_vat"]
|
||||||
|
vm_specs["discount"] = discount
|
||||||
request.session['specs'] = vm_specs
|
request.session['specs'] = vm_specs
|
||||||
|
|
||||||
context.update({
|
context.update({
|
||||||
|
|
Loading…
Reference in a new issue