diff --git a/hosting/templates/hosting/invoice_detail.html b/hosting/templates/hosting/invoice_detail.html new file mode 100644 index 00000000..ff6ec31d --- /dev/null +++ b/hosting/templates/hosting/invoice_detail.html @@ -0,0 +1,235 @@ +{% extends "hosting/base_short.html" %} +{% load staticfiles bootstrap3 humanize i18n custom_tags %} + + +{% block content %} +
+ {% trans "Invoice #" %} {{invoice.invoice_number}} +
+ {% endif %} ++ {% trans "Date" %}: + + {% if invoice %} + {{invoice.paid_at|date:'Y-m-d h:i a'}} + {% else %} + {% now "Y-m-d h:i a" %} + {% endif %} + +
+ {% if invoice and vm %} ++ {% trans "Status" %}: + + {% if vm.terminated_at %} + {% trans "Terminated" %} + {% elif invoice.order.status == 'Approved' %} + {% trans "Approved" %} + {% else %} + {% trans "Declined" %} + {% endif %} + +
+ {% endif %} +
+ {% if invoice.order %}
+ {{user.name}}
+ {{invoice.order.billing_address.street_address}},
+ {{invoice.order.billing_address.postal_code}}
+ {{invoice.order.billing_address.city}},
+ {{invoice.order.billing_address.country}}
+ {% endif %}
+
+ {% if invoice.order %}
+ {{invoice.order.cc_brand}} {% trans "ending in" %} ****
+ {{invoice.order.last4}}
+ {{user.email}}
+ {% endif %}
+
+ {% trans "Product" %}: + {% if vm.name %} + {{ vm.name }} + {% endif %} +
++ {% trans "Period" %}: + + {{ period_start|date:'Y-m-d h:i a' }} - {{ period_end|date:'Y-m-d h:i a' }} + +
+ {% 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 +
+ {% endif %} + {% if vm.discount.amount > 0 %} ++ {%trans "Discount" as discount_name %} + {{ vm.discount.name|default:discount_name + }} + - {{ vm.discount.amount + }} CHF +
+ {% endif %} ++ {% trans "Total" %} + {% if vm.total_price + %}{{vm.total_price|floatformat:2|intcomma}}{% else + %}{{vm.price|floatformat:2|intcomma}}{% endif %} + CHF +
++ {% trans "Product" %}: + {{ product_name }} +
++ {% trans "Amount" %}: + {{total_in_chf|floatformat:2|intcomma}} + CHF +
+ {% if invoice.order.generic_payment_description %} ++ {% trans "Description" %}: + {{invoice.order.generic_payment_description}} +
+ {% endif %} + {% if invoice.order.subscription_id %} ++ {% trans "Recurring" %}: + {{invoice.order.created_at|date:'d'|ordinal}} + {% trans "of every month" %} +
+ {% endif %} +