diff --git a/hosting/templates/hosting/order_detail.html b/hosting/templates/hosting/order_detail.html index e2e38c35..0cbe103e 100644 --- a/hosting/templates/hosting/order_detail.html +++ b/hosting/templates/hosting/order_detail.html @@ -39,7 +39,7 @@ {% endif %}
- {% if order %} + {% if order and vm %}
{% trans "Status" %}:
@@ -93,77 +93,97 @@
- {% trans "Product" %}:
- {% if vm.name %}
- {{ vm.name }}
- {% else %}
- {{ request.session.template.name }}
- {% endif %}
-
- {% trans "Period" %}:
-
- {{ vm.created_at|date:'Y-m-d h:i a' }} - {{ subscription_end_date|date:'Y-m-d h:i a' }}
-
-
+ {% trans "Product" %}:
+ {% if vm.name %}
+ {{ vm.name }}
+ {% else %}
+ {{ request.session.template.name }}
{% endif %}
-
- {% trans "Cores" %}:
- {% if vm.cores %}
- {{vm.cores|floatformat}}
- {% else %}
- {{vm.cpu|floatformat}}
- {% endif %}
-
- {% trans "Memory" %}:
- {{vm.memory}} GB
-
- {% trans "Disk space" %}:
- {{vm.disk_size}} GB
-
- {% trans "Subtotal" %}
- {{vm.price|floatformat:2|intcomma}} CHF
-
- {% trans "VAT" %} ({{ vm.vat_percent|floatformat:2|intcomma }}%)
- {{vm.vat|floatformat:2|intcomma}} CHF
-
+ {% trans "Period" %}:
+
+ {{ vm.created_at|date:'Y-m-d h:i a' }} - {{ subscription_end_date|date:'Y-m-d h:i a' }}
+
+
+ {% trans "Cores" %}:
+ {% if vm.cores %}
+ {{vm.cores|floatformat}}
+ {% else %}
+ {{vm.cpu|floatformat}}
{% endif %}
- {% if vm.discount.amount > 0 %}
-
- {%trans "Discount" as discount_name %}
- {{ vm.discount.name|default:discount_name }}
- - {{ vm.discount.amount }} CHF
-
+ {% trans "Memory" %}:
+ {{vm.memory}} GB
+
+ {% trans "Disk space" %}:
+ {{vm.disk_size}} GB
+
- {% trans "Total" %}
- {% if vm.total_price %}{{vm.total_price|floatformat:2|intcomma}}{% else %}{{vm.price|floatformat:2|intcomma}}{% endif %} CHF
-
+ {% trans "Subtotal" %}
+ {{vm.price|floatformat:2|intcomma}} CHF
+
+ {% trans "VAT" %} ({{ vm.vat_percent|floatformat:2|intcomma }}%)
+ {{vm.vat|floatformat:2|intcomma}} CHF
+
+ {%trans "Discount" as discount_name %}
+ {{ vm.discount.name|default:discount_name }}
+ - {{ vm.discount.amount }} CHF
+
+ {% trans "Total" %}
+ {% if vm.total_price %}{{vm.total_price|floatformat:2|intcomma}}{% else %}{{vm.price|floatformat:2|intcomma}}{% endif %} CHF
+
+ {% trans "Amount" %}:
+ {{order.price|floatformat:2|intcomma}} CHF
+
+ {% trans "Recurring" %}:
+ {{order.created_at|date:'d'|ordinal}} {% trans "of every month" %}
+
{% trans "Order summary" %}
-
-
+
+