{% extends "hosting/base_short.html" %} {% load staticfiles bootstrap3 %} {% load i18n %} {% load custom_tags %} {% block content %}
{% if messages %}
{% for message in messages %} {{ message }} {% endfor %}
{% endif %} {% if not error %}

{% blocktrans with page_header_text=page_header_text|default:"Invoice" %}{{page_header_text}}{% endblocktrans %}

{% if order %}
{% endif %}
{% if order %}

{% trans "Order #" %} {{order.id}}

{% endif %}

{% trans "Invoice Date" %}: {% if order %} {{order.created_at|date:'Y-m-d H:i'}} {% else %} {% now "Y-m-d H:i" %} {% endif %}

{% if order %}

{% trans "Status" %}: {% if order.status == 'Approved' %} {% trans "Approved" %} {% else %} {% trans "Declined" %} {% endif %}

{% endif %}

{% trans "Billed to" %}:

{% if order %} {{user.name}}
{{order.billing_address.street_address}}, {{order.billing_address.postal_code}}
{{order.billing_address.city}}, {{order.billing_address.country}} {% else %} {% with request.session.billing_address_data as billing_address %} {{billing_address.cardholder_name}}
{{billing_address.street_address}}, {{billing_address.postal_code}}
{{billing_address.city}}, {{billing_address.country}} {% endwith %} {% endif %}


{% trans "Payment method" %}:

{% if order %} {{order.cc_brand}} {% trans "ending in" %} **** {{order.last4}}
{{user.email}} {% else %} {{cc_brand|default:'Card'}} {% trans "ending in" %} **** {{cc_last4}}
{% if request.user.is_authenticated %} {{request.user.email}} {% else %} {{request.session.user.email}} {% endif %} {% endif %}


{% trans "Order summary" %}

{% trans "Product" %}: {{vm.name}}

{% comment %}

{% trans "Period" %} {{}}

{% endcomment %}

{% 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 "Total" %} {{vm.price}} CHF

{% if not order %}
{% endif %}
{% if not order %}
{% csrf_token %}
{% blocktrans with vm_price=request.session.specs.price %}By clicking "Place order" this plan will charge your credit card account with the fee of {{ vm_price }}CHF/month{% endblocktrans %}.
{% endif %} {% endif %}
{% if order %}
{% trans "BACK TO LIST" %}
{% endif %} {% if not order %} {% endif %} {%endblock%} {% block js_extra %} {% if order %} {% endif %} {% endblock js_extra %}