Fix >= for first_vm_id_after_eu_vat
This commit is contained in:
parent
a6695a103f
commit
fcc671a707
1 changed files with 6 additions and 9 deletions
|
@ -864,7 +864,7 @@ class OrdersHostingDetailView(LoginRequiredMixin, DetailView, FormView):
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
context['vm']["after_eu_vat_intro"] = (
|
context['vm']["after_eu_vat_intro"] = (
|
||||||
True if obj.vm_id > settings.FIRST_VM_ID_AFTER_EU_VAT
|
True if obj.vm_id >= settings.FIRST_VM_ID_AFTER_EU_VAT
|
||||||
else False
|
else False
|
||||||
)
|
)
|
||||||
context['vm']["price"] = price
|
context['vm']["price"] = price
|
||||||
|
@ -898,7 +898,7 @@ class OrdersHostingDetailView(LoginRequiredMixin, DetailView, FormView):
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
context['vm']["after_eu_vat_intro"] = (
|
context['vm']["after_eu_vat_intro"] = (
|
||||||
True if obj.vm_id > settings.FIRST_VM_ID_AFTER_EU_VAT
|
True if obj.vm_id >= settings.FIRST_VM_ID_AFTER_EU_VAT
|
||||||
else False
|
else False
|
||||||
)
|
)
|
||||||
context['vm']["price"] = price
|
context['vm']["price"] = price
|
||||||
|
@ -1298,7 +1298,7 @@ class InvoiceDetailView(LoginRequiredMixin, DetailView):
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
context['vm']["after_eu_vat_intro"] = (
|
context['vm']["after_eu_vat_intro"] = (
|
||||||
True if obj.order.vm_id > settings.FIRST_VM_ID_AFTER_EU_VAT
|
True if obj.order.vm_id >= settings.FIRST_VM_ID_AFTER_EU_VAT
|
||||||
else False
|
else False
|
||||||
)
|
)
|
||||||
context['vm']["price"] = price
|
context['vm']["price"] = price
|
||||||
|
@ -1329,12 +1329,9 @@ class InvoiceDetailView(LoginRequiredMixin, DetailView):
|
||||||
else settings.PRE_EU_VAT_RATE
|
else settings.PRE_EU_VAT_RATE
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
context['vm']['vat'] = vat
|
context['vm']["after_eu_vat_intro"] = (
|
||||||
context['vm']['price'] = price
|
True if obj.order.vm_id >= settings.FIRST_VM_ID_AFTER_EU_VAT
|
||||||
context['vm']['discount'] = discount
|
else False
|
||||||
context['vm']['vat_percent'] = vat_percent
|
|
||||||
context['vm']['total_price'] = (
|
|
||||||
price + vat - discount['amount']
|
|
||||||
)
|
)
|
||||||
except TypeError:
|
except TypeError:
|
||||||
logger.error("Type error. Probably we "
|
logger.error("Type error. Probably we "
|
||||||
|
|
Loading…
Reference in a new issue