Moves invoice and invoice_details to registration

This commit is contained in:
Christopher Neugebauer 2017-06-04 14:12:10 -07:00
parent c8e63f4d6b
commit fa90297a85
2 changed files with 0 additions and 97 deletions

View file

@ -1,57 +0,0 @@
{% load registrasion_tags %}
<h2>Invoice</h2>
{% with invoice_user=invoice.cart.user %}
<ul>
<li><strong>Invoice number:</strong> {{ invoice.id }}
<li><strong>Invoice status:</strong> {{ invoice.get_status_display }}</li>
<li><strong>Issue date:</strong> {{ invoice.issue_time|date:"DATE_FORMAT" }}
{% if not invoice.is_void %}
<li><strong>Due:</strong> {{ invoice.due_time|date:"DATETIME_FORMAT"}}</li>
{% endif %}
<li><strong>Recipient:</strong> {{ invoice.recipient|linebreaksbr}}</li>
</ul>
{% endwith %}
<p>This invoice has been issued as a result of an application to attend (conference name).</p>
<table class="table table-striped">
<tr>
<th>Description</th>
<th class="text-right">Quantity</th>
<th class="text-right">Price/Unit</th>
<th class="text-right">Total</th>
</tr>
{% for line_item in invoice.lineitem_set.all %}
<tr>
<td>{{ line_item.description }}</td>
<td class="text-right">{{ line_item.quantity }}</td>
<td class="text-right">${{ line_item.price }}</td>
<td class="text-right">${{ line_item.total_price }}</td>
</tr>
{% endfor %}
<tr>
<th colspan="3">TOTAL</th>
<td class="text-right">${{ invoice.value }}</td>
</tr>
</table>
<table class="table table-striped">
<tr>
<td colspan="3">Total payments:</td>
<td class="text-right">${{ invoice.total_payments }}</td>
</tr>
<tr>
<td colspan="3">Balance due:</td>
<td class="text-right">${{ invoice.balance_due }}</td>
</tr>
</table>
{% if invoice.paymentbase_set.all %}
<h4>Payments received</h4>
{% include "registrasion/payment_list.html" with payments=invoice.paymentbase_set.all %}
{% endif %}

View file

@ -1,40 +0,0 @@
{% extends "site_base.html" %}
{% load bootstrap %}
{% load registrasion_tags %}
{% block body %}
{% if invoice.is_unpaid %}
<p><strong>NOTICE:</strong> The below invoice is automatically generated, and will be voided
if you amend your registration before payment, or if discounts or products contained in the
invoice become unavailable. The items and discounts are only reserved until
the invoice due time.</p>
{% url "invoice_access" invoice.user.attendee.access_code as access_url %}
<p>Your most recent unpaid invoice will be available at
<a href="{{ access_url }}">{{ request.scheme }}://{{ request.get_host }}{{ access_url }}</a>
You can give this URL to your accounts department to pay your registration.</p>
<div>
<a class="btn btn-default" href="{% url "demopay" invoice.id invoice.user.attendee.access_code %}">Pay this invoice (dummy)</a>
<a class="btn btn-default" href='{% url "registripe_card" invoice.id invoice.user.attendee.access_code %}'>Pay this invoice with Stripe</a>
{% if user.is_staff %}
<a class="btn btn-default" href="{% url "manual_payment" invoice.id %}">Apply manual payment</a>
{% endif %}
</div>
{% elif invoice.is_paid %}
{% if user.is_staff %}
<div>
{% if user.is_staff %}
<a class="btn btn-default" href="{% url "manual_payment" invoice.id %}">Apply manual payment/refund</a>
<a class="btn btn-default" href="{% url "refund" invoice.id %}">Refund by issuing credit note</a>
{% endif %}
</div>
{% endif %}
{% endif %}
<hr />
{% include "registrasion/_invoice_details.html" %}
{% endblock %}