Show VAT details in hosting/order_details if it is set
This commit is contained in:
parent
6cc40cb67f
commit
731fef8ad9
2 changed files with 7 additions and 0 deletions
|
@ -127,6 +127,12 @@
|
||||||
<span>{% trans "Disk space" %}: </span>
|
<span>{% trans "Disk space" %}: </span>
|
||||||
<span class="pull-right">{{vm.disk_size}} GB</span>
|
<span class="pull-right">{{vm.disk_size}} GB</span>
|
||||||
</p>
|
</p>
|
||||||
|
{% if vm.vat > 0 %}
|
||||||
|
<p>
|
||||||
|
<span>{% trans "VAT" %}: </span>
|
||||||
|
<span class="pull-right">{{vm.vat|floatformat:2|intcomma}} CHF</span>
|
||||||
|
</p>
|
||||||
|
{% endif %}
|
||||||
<p>
|
<p>
|
||||||
<span>{% trans "Total" %}</span>
|
<span>{% trans "Total" %}</span>
|
||||||
<span class="pull-right">{{vm.price|intcomma}} CHF</span>
|
<span class="pull-right">{{vm.price|intcomma}} CHF</span>
|
||||||
|
|
|
@ -756,6 +756,7 @@ class OrdersHostingDetailView(LoginRequiredMixin, DetailView):
|
||||||
pricing_name=(obj.vm_pricing.name
|
pricing_name=(obj.vm_pricing.name
|
||||||
if obj.vm_pricing else 'default')
|
if obj.vm_pricing else 'default')
|
||||||
)
|
)
|
||||||
|
context['vm']['vat'] = vat
|
||||||
context['vm']['price'] = price + vat
|
context['vm']['price'] = price + vat
|
||||||
context['subscription_end_date'] = vm_detail.end_date()
|
context['subscription_end_date'] = vm_detail.end_date()
|
||||||
except VMDetail.DoesNotExist:
|
except VMDetail.DoesNotExist:
|
||||||
|
|
Loading…
Reference in a new issue