Dont round_up discount (is obtained from subtraction)
This commit is contained in:
parent
c43afb7c59
commit
b103cff0a6
1 changed files with 2 additions and 1 deletions
|
@ -681,9 +681,10 @@ class OrderConfirmationView(DetailView, FormView):
|
|||
vm_specs["price_with_vat"] = round_up(price * (1 + vm_specs["vat_percent"] * 0.01), 2)
|
||||
vm_specs["price_after_discount"] = round_up(price - discount['amount'], 2)
|
||||
vm_specs["price_after_discount_with_vat"] = round_up((price - discount['amount']) * (1 + vm_specs["vat_percent"] * 0.01), 2)
|
||||
discount["amount_with_vat"] = round_up(vm_specs["price_with_vat"] - vm_specs["price_after_discount_with_vat"], 2)
|
||||
discount["amount_with_vat"] = round(vm_specs["price_with_vat"] - vm_specs["price_after_discount_with_vat"], 2)
|
||||
vm_specs["total_price"] = vm_specs["price_after_discount_with_vat"]
|
||||
vm_specs["discount"] = discount
|
||||
logger.debug(vm_specs)
|
||||
request.session['specs'] = vm_specs
|
||||
|
||||
context.update({
|
||||
|
|
Loading…
Reference in a new issue