2016-04-27 01:54:15 -05:00
{% extends "hosting/base_short.html" %}
2018-03-27 19:38:09 +05:30
{% load staticfiles bootstrap3 humanize i18n custom_tags %}
2017-09-09 13:27:17 +02:00
2017-09-02 03:09:02 +05:30
{% block content %}
2017-09-21 15:03:00 +05:30
< div id = "order-detail{{order.pk}}" class = "order-detail-container" >
2017-09-15 18:11:22 +02:00
{% if messages %}
2017-09-19 15:03:06 +05:30
< div class = "alert alert-warning" >
{% for message in messages %}
2017-09-20 23:06:51 +05:30
< span > {{ message }}< / span >
2017-09-19 15:03:06 +05:30
{% endfor %}
2017-06-15 07:30:47 +05:30
< / div >
{% endif %}
{% if not error %}
2017-09-21 01:19:38 +05:30
< 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 >
2017-09-26 01:04:38 +05:30
{% if order %}
< div class = "dashboard-container-options" >
< button type = "button" class = "btn-plain btn-pdf" data-target = "#order-detail{{order.pk}}" > < img src = "{% static 'hosting/img/icon-pdf.svg' %}" class = "svg-img" > < / button >
< button type = "button" class = "btn-plain btn-print" > < img src = "{% static 'hosting/img/icon-print.svg' %}" class = "svg-img" > < / button >
< / div >
{% endif %}
2017-09-21 01:19:38 +05:30
< / div >
2017-09-21 02:50:07 +05:30
< div class = "order-details" >
{% if order %}
2017-09-21 15:03:00 +05:30
< p >
< strong > {% trans "Order #" %} {{order.id}}< / strong >
< / p >
2017-09-21 17:22:02 +05:30
{% endif %}
2017-09-21 15:03:00 +05:30
< p >
2017-09-26 03:42:10 +05:30
< strong > {% trans "Date" %}:< / strong >
2017-10-06 04:11:40 +05:30
< span class = "locale_date" >
2017-09-20 23:06:51 +05:30
{% if order %}
2017-10-06 04:11:40 +05:30
{{order.created_at|date:'Y-m-d h:i a'}}
2017-09-20 23:06:51 +05:30
{% else %}
2017-10-06 04:11:40 +05:30
{% now "Y-m-d h:i a" %}
2017-09-20 23:06:51 +05:30
{% endif %}
2017-09-21 02:50:07 +05:30
< / span >
2017-09-21 15:03:00 +05:30
< / p >
2017-09-21 02:50:07 +05:30
{% if order %}
2017-09-21 17:22:02 +05:30
< p >
< strong > {% trans "Status" %}: < / strong >
< strong >
2017-09-25 02:04:40 +05:30
{% if vm.terminated_at %}
< span class = "vm-color-failed" > {% trans "Terminated" %}< / span >
{% elif order.status == 'Approved' %}
2017-09-21 17:22:02 +05:30
< span class = "vm-color-online" > {% trans "Approved" %}< / span >
{% else %}
< span class = "vm-status-failed" > {% trans "Declined" %}< / span >
{% endif %}
< / strong >
< / p >
2017-09-21 02:50:07 +05:30
{% endif %}
< hr >
< div >
2017-09-20 23:06:51 +05:30
< address >
2017-09-21 02:50:07 +05:30
< h4 > {% trans "Billed to" %}:< / h4 >
2017-09-21 15:03:00 +05:30
< p >
2017-09-21 02:50:07 +05:30
{% if order %}
{{user.name}}< br >
2017-09-21 15:03:00 +05:30
{{order.billing_address.street_address}}, {{order.billing_address.postal_code}}< br >
{{order.billing_address.city}}, {{order.billing_address.country}}
2017-09-21 02:50:07 +05:30
{% else %}
{% with request.session.billing_address_data as billing_address %}
2017-09-21 15:03:00 +05:30
{{billing_address.cardholder_name}}< br >
{{billing_address.street_address}}, {{billing_address.postal_code}}< br >
{{billing_address.city}}, {{billing_address.country}}
2017-09-21 02:50:07 +05:30
{% endwith %}
{% endif %}
2017-09-21 15:03:00 +05:30
< / p >
2017-09-21 02:50:07 +05:30
< / address >
< / div >
< hr >
< div >
< h4 > {% trans "Payment method" %}:< / h4 >
2017-09-21 15:03:00 +05:30
< p >
2017-09-20 23:06:51 +05:30
{% if order %}
2017-09-21 02:50:07 +05:30
{{order.cc_brand}} {% trans "ending in" %} ****
{{order.last4}}< br >
{{user.email}}
2017-09-19 15:03:06 +05:30
{% else %}
2017-09-28 03:05:47 +05:30
{{cc_brand|default:_('Credit Card')}} {% trans "ending in" %} ****{{cc_last4}}< br >
2017-09-21 19:17:10 +05:30
{% if request.user.is_authenticated %}
{{request.user.email}}
{% else %}
{{request.session.user.email}}
{% endif %}
2017-09-19 15:03:06 +05:30
{% endif %}
2017-09-21 15:03:00 +05:30
< / p >
2016-04-27 01:54:15 -05:00
< / div >
2017-09-21 15:03:00 +05:30
< hr >
2017-09-21 02:50:07 +05:30
< div >
2017-09-21 15:03:00 +05:30
< h4 > {% trans "Order summary" %}< / h4 >
< p >
2017-09-26 03:57:07 +05:30
< strong > {% trans "Product" %}:< / strong >
{% if vm.name %}
{{ vm.name }}
{% else %}
{{ request.session.template.name }}
{% endif %}
2017-09-21 15:03:00 +05:30
< / p >
< div class = "row" >
< div class = "col-sm-6" >
2017-09-28 02:47:58 +05:30
{% if vm.created_at %}
< p >
< span > {% trans "Period" %}: < / span >
2017-10-06 04:11:40 +05:30
< span >
2017-10-06 04:20:38 +05:30
< span class = "locale_date" data-format = "YYYY/MM/DD" > {{ vm.created_at|date:'Y-m-d h:i a' }}< / span > - < span class = "locale_date" data-format = "YYYY/MM/DD" > {{ subscription_end_date|date:'Y-m-d h:i a' }}< / span >
2017-10-06 04:11:40 +05:30
< / span >
2017-09-28 02:47:58 +05:30
< / p >
{% endif %}
2017-09-21 15:03:00 +05:30
< p >
2017-09-28 02:39:55 +05:30
< span > {% trans "Cores" %}: < / span >
2017-09-21 19:32:22 +05:30
{% if vm.cores %}
< span class = "pull-right" > {{vm.cores|floatformat}}< / span >
{% else %}
< span class = "pull-right" > {{vm.cpu|floatformat}}< / span >
{% endif %}
2017-09-21 15:03:00 +05:30
< / p >
< p >
2017-09-28 02:39:55 +05:30
< span > {% trans "Memory" %}: < / span >
2017-09-21 15:03:00 +05:30
< span class = "pull-right" > {{vm.memory}} GB< / span >
< / p >
< p >
2017-09-28 02:39:55 +05:30
< span > {% trans "Disk space" %}: < / span >
2017-09-21 15:03:00 +05:30
< span class = "pull-right" > {{vm.disk_size}} GB< / span >
< / p >
2018-05-07 05:07:58 +05:30
< hr >
2018-04-16 04:39:21 +02:00
{% if vm.vat > 0 %}
< p >
2018-04-18 21:37:12 +02:00
< strong > {% trans "Subtotal" %}: < / strong >
2018-04-17 22:20:36 +02:00
< span class = "pull-right" > {{vm.price|floatformat:2|intcomma}} CHF< / span >
< / p >
< p >
< span > {% trans "VAT" %} ({{ vm.vat_percent|floatformat:2|intcomma }}%): < / span >
2018-04-16 04:39:21 +02:00
< span class = "pull-right" > {{vm.vat|floatformat:2|intcomma}} CHF< / span >
< / p >
{% endif %}
2018-05-07 05:07:58 +05:30
{% if vm_pricing.discount_amount %}
< p class = "text-primary" >
{%trans "Discount" as discount_name %}
< span > {{ vm_pricing.discount_name|default:discount_name }}: < / span >
< span class = "pull-right" > - {{ vm_pricing.discount_amount }} CHF< / span >
< / p >
{% endif %}
2017-09-21 15:03:00 +05:30
< p >
2018-04-18 21:37:12 +02:00
< strong > {% trans "Total" %}< / strong >
2018-04-17 22:20:36 +02:00
< span class = "pull-right" > {% if vm.total_price %}{{vm.total_price|floatformat:2|intcomma}}{% else %}{{vm.price|floatformat:2|intcomma}}{% endif %} CHF< / span >
2017-09-21 15:03:00 +05:30
< / p >
< / div >
2017-09-21 02:50:07 +05:30
< / div >
< / div >
2017-12-11 00:47:55 +05:30
< hr >
2017-09-20 23:06:51 +05:30
< / div >
{% if not order %}
2017-09-26 03:29:38 +05:30
{% block submit_btn %}
< form method = "post" id = "virtual_machine_create_form" >
{% csrf_token %}
< div class = "row" >
< div class = "col-sm-8" >
2018-03-27 19:38:09 +05:30
< div class = "dcl-place-order-text" > {% 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|intcomma }}CHF/month{% endblocktrans %}.< / div >
2017-09-26 03:29:38 +05:30
< / div >
< div class = "col-sm-4 order-confirm-btn text-right" >
2017-09-26 03:18:19 +05:30
< button class = "btn choice-btn" id = "btn-create-vm" data-href = "{% url 'hosting:order-confirmation' %}" data-toggle = "modal" data-target = "#createvm-modal" >
{% trans "Place order" %}
< / button >
2017-09-26 03:29:38 +05:30
< / div >
2017-09-20 23:06:51 +05:30
< / div >
2017-09-26 03:29:38 +05:30
< / form >
{% endblock submit_btn %}
2017-12-11 00:47:55 +05:30
{% else %}
< div class = "order_detail_footer" >
2017-12-27 23:44:27 +01:00
< strong > ungleich glarus ag< / strong > Bahnhofstrasse 1, 8783 Linthal, Switzerland< br >
2018-03-09 03:47:18 +05:30
www.datacenterlight.ch | info@datacenterlight.ch | < small > CHE-156.970.649 MWST< / small >
2017-12-11 00:47:55 +05:30
< / div >
2017-09-20 23:06:51 +05:30
{% endif %}
2017-06-15 07:30:47 +05:30
{% endif %}
2016-04-27 01:54:15 -05:00
< / div >
2017-09-21 15:03:00 +05:30
2017-09-21 19:17:10 +05:30
{% if order %}
2017-09-21 15:03:00 +05:30
< div class = "text-center" style = "margin-bottom: 50px;" >
< a class = "btn btn-vm-back" href = "{% url 'hosting:orders' %}" > {% trans "BACK TO LIST" %}< / a >
< / div >
{% endif %}
{% if not order %}
<!-- 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" >
2017-09-15 12:45:11 +05:30
< / div >
2017-09-21 15:03:00 +05:30
< 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 >
2017-09-26 02:38:31 +05:30
< h4 class = "modal-title" id = "createvm-modal-title" > < / h4 >
2017-09-21 15:03:00 +05:30
< div class = "modal-text" id = "createvm-modal-body" >
{% trans "Hold tight, we are processing your request" %}
< / div >
< div class = "modal-footer" >
2017-09-28 02:09:03 +05:30
< a id = "createvm-modal-done-btn" class = "btn btn-success btn-ok btn-wide hide" href = "{% url 'hosting:virtual_machines' %}" > {% trans "OK" %}< / a >
2017-09-26 02:38:31 +05:30
< 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 >
2017-09-21 15:03:00 +05:30
< / div >
2017-09-15 12:45:11 +05:30
< / div >
< / div >
< / div >
< / div >
2017-09-21 15:03:00 +05:30
<!-- / Create VM Modal -->
{% endif %}
2017-09-02 03:09:02 +05:30
< script type = "text/javascript" >
2017-09-16 15:35:31 +05:30
{% trans "Some problem encountered. Please try again later." as err_msg %}
2017-09-21 02:50:07 +05:30
var create_vm_error_message = '{{err_msg|safe}}';
2017-06-21 13:24:38 -05:00
window.onload = function () {
2017-10-06 04:11:40 +05:30
var locale_dates = document.getElementsByClassName("locale_date");
2017-10-06 04:20:38 +05:30
var formats = ['YYYY-MM-DD hh:mm a']
2017-10-06 04:11:40 +05:30
var i;
for (i = 0; i < locale_dates.length ; i + + ) {
var oldDate = moment.utc(locale_dates[i].textContent, formats);
var outputFormat = locale_dates[i].getAttribute('data-format') || oldDate._f;
locale_dates[i].innerHTML = oldDate.local().format(outputFormat);
locale_dates[i].className += ' done';
}
2017-06-21 13:24:38 -05:00
};
2017-09-21 01:19:38 +05:30
< / script >
2016-04-27 01:54:15 -05:00
{%endblock%}
2017-06-21 13:24:38 -05:00
2017-09-21 15:03:00 +05:30
{% block js_extra %}
2017-09-26 01:04:38 +05:30
{% if order %}
< script src = "https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.5/jspdf.min.js" > < / script >
2018-02-07 02:23:23 +05:30
< script src = "{% static 'hosting/js/html2canvas.min.js' %}" > < / script >
2018-02-07 19:30:53 +05:30
< script src = "{% static 'hosting/js/html2pdf.min.js' %}" > < / script >
2017-09-26 01:04:38 +05:30
< script src = "{% static 'hosting/js/order.js' %}" > < / script >
{% endif %}
2017-09-25 02:04:40 +05:30
{% endblock js_extra %}