diff --git a/matrixhosting/static/matrixhosting/css/theme.css b/matrixhosting/static/matrixhosting/css/theme.css index d642d70..a65e777 100644 --- a/matrixhosting/static/matrixhosting/css/theme.css +++ b/matrixhosting/static/matrixhosting/css/theme.css @@ -1325,7 +1325,7 @@ body, html { } .transaction-title { - background-color: #f1f5f6; + background-color: #d8e4e6; border-top: 1px solid #e9eff0; border-bottom: 1px solid #e9eff0; } @@ -1795,7 +1795,7 @@ body, html { position: relative; } .accordion:not(.accordion-alternate) .card-header a { - background-color: #e41d25; + background-color: #2b343c; color: #fff; } .accordion:not(.accordion-alternate) .card-header a.collapsed { @@ -1826,8 +1826,10 @@ body, html { } .accordion .card-body { line-height: 26px; - padding: 1rem 0 1rem 2.25rem; + border-left: 4px solid #2b343c; + background-color: #f9f9f9; } + .accordion.arrow-right .card-header a { padding-left: 1.25rem; } diff --git a/matrixhosting/static/matrixhosting/js/payment.js b/matrixhosting/static/matrixhosting/js/payment.js index 0e81695..3494d5e 100644 --- a/matrixhosting/static/matrixhosting/js/payment.js +++ b/matrixhosting/static/matrixhosting/js/payment.js @@ -17,7 +17,7 @@ function fetch_pricing() { if(data['total'] > balance) { $('#has-enough-balance').hide(); $('#cards-section').show(); - window.cardNumberElement = loadStripe(stripe); + window.cardNumberElement = loadStripe(window.stripe); } else { $('#cards-section').hide(); $('#has-enough-balance').show(); @@ -44,7 +44,7 @@ function incrementValue(e) { }; $(document).ready(function () { - var stripe = Stripe(window.stripeKey); + window.stripe = Stripe(window.stripeKey); if ($('#pricing_name') != undefined) { fetch_pricing(); @@ -56,7 +56,7 @@ $(document).ready(function () { var hasCreditcard = window.hasCreditcard || false; if (hasCreditcard) { - window.cardNumberElement = loadStripe(stripe); + window.cardNumberElement = loadStripe(window.stripe); } function submitBillingForm(pmId) { @@ -76,7 +76,7 @@ $(document).ready(function () { $('#id_payment_method').val(paymentMethod.id); submitBillingForm(paymentMethod.id); } - stripe.createPaymentMethod({ + window.stripe.createPaymentMethod({ type: 'card', card: window.cardNumberElement, }) diff --git a/matrixhosting/templates/matrixhosting/bills.html b/matrixhosting/templates/matrixhosting/bills.html new file mode 100644 index 0000000..f0f31ec --- /dev/null +++ b/matrixhosting/templates/matrixhosting/bills.html @@ -0,0 +1,196 @@ +{% extends "matrixhosting/base.html" %} + +{% load static i18n compress mathfilters %} + +{% block title %} Bills {% endblock %} + +{% block content %} +
Order | +Description | +Start Date | +End Date | +Subtotal | +Total | +
---|---|---|---|---|---|
#{{record.order.id}} | +{{record.description}} | +{{record.starting_date|date:"Y-m-d"}} | +{{record.ending_date|date:"Y-m-d"}} | +{{record.subtotal}} | +{{record.sum}} | +
{% trans "Subtotal" %}
+{{bill.subtotal}}
+{{bill.billing_address.get_country_display}} VAT {{ bill.vat_rate|mul:100 }}%
+{{bill.vat_amount}}
+{% trans "Total" %}
+{{bill.sum|floatformat:2}} CHF
+ {{card.card_name}}