{% extends "datacenterlight/base_hosting.html" %} {% load staticfiles bootstrap3 i18n custom_tags humanize %} {% 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 %}

{% trans "Date" %}: {% now "Y-m-d h:i a" %}


{% trans "Billed to" %}:

{% 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}} {% if billing_address.vat_number %}
{% trans "VAT Number" %} {{billing_address.vat_number}} {% if vm.vat_validation_status != "ch_vat" and vm.vat_validation_status != "not_needed" %} {% if vm.vat_validation_status == "verified" %} {% else %} {% endif %} {% endif %} {% endif %} {% endwith %}


{% trans "Payment method" %}:

{{cc_brand|default:_('Credit Card')}} {% trans "ending in" %} ****{{cc_last4}}
{% trans "Expiry" %} {{cc_exp_year}}/{{cc_exp_month}}
{{request.user.email}}


{% trans "Order summary" %}

{% if generic_payment_details %}

{% trans "Product" %}:  {{ generic_payment_details.product_name }}

{% if generic_payment_details.description %}

{% trans "Description" %}: {{generic_payment_details.description}}

{% endif %} {% if generic_payment_details.recurring %}

{% trans "Recurring" %}: Yes

{% endif %}

{% trans "Price Before VAT" %} {{generic_payment_details.amount_before_vat|floatformat:2|intcomma}} CHF


{% trans "Pre VAT" %}

{% trans "VAT for" %} {{generic_payment_details.vat_country}} ({{generic_payment_details.vat_rate}}%)

Price

{{generic_payment_details.amount_before_vat|floatformat:2|intcomma}} CHF

{{generic_payment_details.amount|floatformat:2|intcomma}} CHF


Total

{{generic_payment_details.amount_before_vat|floatformat:2|intcomma}} CHF

{{generic_payment_details.amount|floatformat:2|intcomma}} CHF


{% trans "Your Price in Total" %} {{generic_payment_details.amount|floatformat:2|intcomma}} CHF
{% else %}

{% trans "Product" %}:  {{ request.session.template.name }}

{% trans "Cores" %}: {{vm.cpu|floatformat}}

{% trans "Memory" %}: {{vm.memory|intcomma}} GB

{% trans "Disk space" %}: {{vm.disk_size|intcomma}} GB


{% trans "Price Before VAT" %} {{vm.price|floatformat:2|intcomma}} CHF


{% trans "Pre VAT" %}

{% trans "VAT for" %} {{vm.vat_country}} ({{vm.vat_percent}}%)

Price

{{vm.price|floatformat:2|intcomma}} CHF

{{vm.price_with_vat|floatformat:2|intcomma}} CHF

{% if vm.discount.amount > 0 %}

{{vm.discount.name}}

-{{vm.discount.amount|floatformat:2|intcomma}} CHF

-{{vm.discount.amount_with_vat|floatformat:2|intcomma}} CHF

{% endif %}

Total

{{vm.price_after_discount|floatformat:2|intcomma}} CHF

{{vm.price_after_discount_with_vat|floatformat:2|intcomma}} CHF


{% trans "Your Price in Total" %} {{vm.total_price|floatformat:2|intcomma}} CHF
{% endif %}

{% csrf_token %}
{% if generic_payment_details %} {% if generic_payment_details.recurring %} {% if generic_payment_details.recurring_interval == 'year' %}
{% blocktrans with total_price=generic_payment_details.amount|floatformat:2|intcomma %}By clicking "Place order" this plan will charge your credit card account with {{total_price}} CHF/year{% endblocktrans %}.
{% else %}
{% blocktrans with total_price=generic_payment_details.amount|floatformat:2|intcomma %}By clicking "Place order" this plan will charge your credit card account with {{total_price}} CHF/month{% endblocktrans %}.
{% endif %} {% else %}
{% blocktrans with total_price=generic_payment_details.amount|floatformat:2|intcomma %}By clicking "Place order" this payment will charge your credit card account with a one time amount of {{total_price}} CHF{% endblocktrans %}.
{% endif %} {% else %}
{% blocktrans with vm_total_price=vm.total_price|floatformat:2|intcomma %}By clicking "Place order" this plan will charge your credit card account with {{vm_total_price}} CHF/month{% endblocktrans %}.
{% endif %}
{% endif %}
{%endblock%}