2018-01-07 19:26:54 +00:00
{% extends "datacenterlight/base_hosting.html" %}
2018-03-27 14:08:09 +00:00
{% load staticfiles bootstrap3 i18n custom_tags humanize %}
2017-08-02 21:05:44 +00:00
2018-01-17 12:02:32 +00:00
{% block content %}
< div id = "order-detail{{order.pk}}" class = "order-detail-container" >
{% if messages %}
< div class = "alert alert-warning" >
{% for message in messages %}
< span > {{ message }}< / span >
{% endfor %}
< / div >
{% endif %}
{% if not error %}
< div class = "dashboard-container-head" >
< h1 class = "dashboard-title-thin" >
< img src = "{% static 'hosting/img/billing.svg' %}" class = "un-icon" > {% blocktrans with page_header_text=page_header_text|default:"Invoice" %}{{page_header_text}}{% endblocktrans %}
< / h1 >
< / div >
< div class = "order-details" >
< p >
< strong > {% trans "Date" %}:< / strong >
< span class = "locale_date" >
{% now "Y-m-d h:i a" %}
< / span >
< / p >
< hr >
< div >
< address >
< h4 > {% trans "Billed to" %}:< / h4 >
< p >
{% with request.session.billing_address_data as billing_address %}
{{billing_address.cardholder_name}}< br >
{{billing_address.street_address}}, {{billing_address.postal_code}}< br >
{{billing_address.city}}, {{billing_address.country}}
{% endwith %}
< / p >
< / address >
< / div >
< hr >
< div >
< h4 > {% trans "Payment method" %}:< / h4 >
< p >
{{cc_brand|default:_('Credit Card')}} {% trans "ending in" %} ****{{cc_last4}}< br >
2019-07-09 13:10:41 +00:00
{% trans "Expiry" %} {{cc_exp_year}}/{{cc_exp_month}}< br / >
2018-01-17 12:02:32 +00:00
{{request.user.email}}
< / p >
< / div >
< hr >
< div >
< h4 > {% trans "Order summary" %}< / h4 >
2018-09-23 11:03:47 +00:00
{% if generic_payment_details %}
2018-09-26 07:15:49 +00:00
< p >
< strong > {% trans "Product" %}:< / strong >
{{ generic_payment_details.product_name }}
< / p >
2018-09-23 11:03:47 +00:00
< div class = "row" >
< div class = "col-sm-6" >
2019-11-15 07:41:11 +00:00
{% if generic_payment_details.vat_rate > 0 %}
< p >
< span > {% trans "Price" %}: < / span >
< strong class = "pull-right" > CHF {{generic_payment_details.amount_before_vat|floatformat:2|intcomma}}< / strong >
< / p >
< p >
< span > {% trans "VAT for" %} {{generic_payment_details.vat_country}} ({{generic_payment_details.vat_rate}}%) : < / span >
< strong class = "pull-right" > CHF {{generic_payment_details.vat_amount|floatformat:2|intcomma}}< / strong >
< / p >
< p >
< span > {% trans "Total Amount" %} : < / span >
< strong class = "pull-right" > CHF {{generic_payment_details.amount|floatformat:2|intcomma}}< / strong >
< / p >
{% else %}
2018-09-23 11:03:47 +00:00
< p >
< span > {% trans "Amount" %}: < / span >
< strong class = "pull-right" > CHF {{generic_payment_details.amount|floatformat:2|intcomma}}< / strong >
< / p >
2019-11-15 07:41:11 +00:00
{% endif %}
2018-09-26 07:15:49 +00:00
{% if generic_payment_details.description %}
< p >
< span > {% trans "Description" %}: < / span >
< strong class = "pull-right" > {{generic_payment_details.description}}< / strong >
< / p >
{% endif %}
2018-09-23 11:03:47 +00:00
{% if generic_payment_details.recurring %}
2018-05-11 21:17:27 +00:00
< p >
2018-09-23 11:03:47 +00:00
< span > {% trans "Recurring" %}: < / span >
< strong class = "pull-right" > Yes< / strong >
2018-05-11 21:17:27 +00:00
< / p >
{% endif %}
< / div >
2018-05-12 16:29:06 +00:00
< / div >
2018-09-23 11:03:47 +00:00
{% else %}
< p >
< strong > {% trans "Product" %}:< / strong >
{{ request.session.template.name }}
< / p >
< div class = "row" >
< div class = "col-sm-6" >
< p >
< span > {% trans "Cores" %}: < / span >
< strong class = "pull-right" > {{vm.cpu|floatformat}}< / strong >
< / p >
< p >
< span > {% trans "Memory" %}: < / span >
< strong class = "pull-right" > {{vm.memory|intcomma}} GB< / strong >
< / p >
< p >
< span > {% trans "Disk space" %}: < / span >
< strong class = "pull-right" > {{vm.disk_size|intcomma}} GB< / strong >
< / p >
< / div >
< div class = "col-sm-12" >
< hr class = "thin-hr" >
< / div >
{% if vm.vat > 0 or vm.discount.amount > 0 %}
< div class = "col-sm-6" >
< div class = "subtotal-price" >
{% if vm.vat > 0 %}
< p >
< strong class = "text-lg" > {% trans "Subtotal" %} < / strong >
< strong class = "pull-right" > {{vm.price|floatformat:2|intcomma}} CHF< / strong >
< / p >
< p >
< small > {% trans "VAT" %} ({{ vm.vat_percent|floatformat:2|intcomma }}%) < / small >
< strong class = "pull-right" > {{vm.vat|floatformat:2|intcomma}} CHF< / strong >
< / p >
{% endif %}
{% if vm.discount.amount > 0 %}
< p class = "text-primary" >
{%trans "Discount" as discount_name %}
< strong > {{ vm.discount.name|default:discount_name }} < / strong >
< strong class = "pull-right" > - {{ vm.discount.amount }} CHF< / strong >
< / p >
{% endif %}
< / div >
< / div >
< div class = "col-sm-12" >
< hr class = "thin-hr" >
< / div >
{% endif %}
< div class = "col-sm-6" >
< p class = "total-price" >
< strong > {% trans "Total" %} < / strong >
< strong class = "pull-right" > {{vm.total_price|floatformat:2|intcomma}} CHF< / strong >
< / p >
< / div >
2018-05-12 16:29:06 +00:00
< / div >
{% endif %}
2018-01-17 12:02:32 +00:00
< / div >
2018-05-11 21:17:27 +00:00
< hr class = "thin-hr" >
2018-01-17 12:02:32 +00:00
< / div >
< form id = "virtual_machine_create_form" action = "" method = "POST" >
{% csrf_token %}
< div class = "row" >
< div class = "col-sm-8" >
2018-09-23 11:03:47 +00:00
{% if generic_payment_details %}
{% if generic_payment_details.recurring %}
2019-11-15 14:27:53 +00:00
{% if generic_payment_details.recurring_interval == 'year' %}
< div class = "dcl-place-order-text" > {% 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 %}.< / div >
{% else %}
< div class = "dcl-place-order-text" > {% 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 %}.< / div >
{% endif %}
2018-09-23 11:03:47 +00:00
{% else %}
< div class = "dcl-place-order-text" > {% 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 %}.< / div >
{% endif %}
{% else %}
< div class = "dcl-place-order-text" > {% 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 %}.< / div >
{% endif %}
2018-01-17 12:02:32 +00:00
< / div >
< div class = "col-sm-4 order-confirm-btn text-right" >
< button class = "btn choice-btn" id = "btn-create-vm" data-toggle = "modal" data-target = "#createvm-modal" >
{% trans "Place order" %}
< / button >
< / div >
< / div >
< / form >
{% endif %}
< / div >
2017-09-25 21:48:19 +00:00
2017-06-22 07:53:13 +00:00
2018-01-17 12:02:32 +00:00
<!-- Create VM Modal -->
< div class = "modal fade" id = "createvm-modal" tabindex = "-1" role = "dialog"
aria-hidden="true" data-backdrop="static" data-keyboard="false">
< div class = "modal-dialog" >
< div class = "modal-content" >
< div class = "modal-header" >
< / div >
< div class = "modal-body" >
< div class = "modal-icon" >
< i class = "fa fa-cog fa-spin fa-3x fa-fw" > < / i >
< span class = "sr-only" > {% trans "Processing..." %}< / span >
< / div >
< h4 class = "modal-title" id = "createvm-modal-title" > < / h4 >
< div class = "modal-text" id = "createvm-modal-body" >
{% trans "Hold tight, we are processing your request" %}
< / div >
< div class = "modal-footer" >
< a id = "createvm-modal-done-btn" class = "btn btn-success btn-ok btn-wide hide" href = "{% url 'hosting:virtual_machines' %}" > {% trans "OK" %}< / a >
< button id = "createvm-modal-close-btn" type = "button" class = "btn btn-danger btn-ok btn-wide hide" data-dismiss = "modal" aria-label = "create-vm-close" > {% trans "Close" %}< / button >
< / div >
< / div >
< / div >
< / div >
< / div >
<!-- / Create VM Modal -->
< script type = "text/javascript" >
{% trans "Some problem encountered. Please try again later." as err_msg %}
var create_vm_error_message = '{{err_msg|safe}}';
< / script >
{%endblock%}