Improve credit note page
Add link back to attendee and source invoice. Add page title and spacing to page layout.
This commit is contained in:
parent
d4b0b52253
commit
fe7628b36e
1 changed files with 38 additions and 17 deletions
|
@ -1,11 +1,15 @@
|
||||||
{% extends "registrasion/base.html" %}
|
{% extends "registrasion/base.html" %}
|
||||||
{% load bootstrap %}
|
{% load bootstrap %}
|
||||||
{% load registrasion_tags %}
|
{% load registrasion_tags %}
|
||||||
|
|
||||||
|
{% block head_title %}Credit Note #{{ credit_note.id }}{% endblock %}
|
||||||
|
{% block page_title %}Credit Note #{{ credit_note.id }}{% endblock %}
|
||||||
|
|
||||||
{% block proposals_body %}
|
{% block proposals_body %}
|
||||||
|
<div class="mb-3">
|
||||||
|
<h2>Details</h2>
|
||||||
|
|
||||||
<h2>Credit Note</h2>
|
{% with note_user=credit_note.invoice.user %}
|
||||||
|
|
||||||
{% with note_user=credit_note.invoice.user %}
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><strong>Number:</strong> {{ credit_note.id }}
|
<li><strong>Number:</strong> {{ credit_note.id }}
|
||||||
<li><strong>Attention:</strong> {{ credit_note.invoice.recipient }}</li>
|
<li><strong>Attention:</strong> {{ credit_note.invoice.recipient }}</li>
|
||||||
|
@ -13,44 +17,61 @@
|
||||||
<li><strong>Value:</strong> {{ credit_note.value }}</li>
|
<li><strong>Value:</strong> {{ credit_note.value }}</li>
|
||||||
<li><strong>Status:</strong> {{ credit_note.status }}</li>
|
<li><strong>Status:</strong> {{ credit_note.status }}</li>
|
||||||
</ul>
|
</ul>
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
|
|
||||||
<p>This credit note was generated from funds excess from invoice {{ credit_note.invoice.id }}.</p>
|
<p>This credit note was generated from funds excess from invoice {{ credit_note.invoice.id }}.</p>
|
||||||
|
|
||||||
|
{% if user.is_staff %}
|
||||||
|
<div>
|
||||||
|
<a class="btn btn-info" href="{% url "attendee" credit_note.invoice.user.id %}">View attendee</a>
|
||||||
|
<a class="btn btn-light" href="{% url "invoice_update" credit_note.invoice.id %}">View source invoice</a>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
{% if credit_note.is_unclaimed %}
|
{% if credit_note.is_unclaimed %}
|
||||||
<form class="form-horizontal" method="post" action="" novalidate>
|
<form class="form-horizontal" method="post" action="" novalidate>
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<h3>Apply to invoice</h3>
|
<div class="mb-3">
|
||||||
<p>You can apply this credit note to an unpaid invoice.</p>
|
<h3>Apply to invoice</h3>
|
||||||
|
<p>You can apply this credit note to an unpaid invoice.</p>
|
||||||
|
|
||||||
<p><strong>This credit note belongs to:</strong> {{ credit_note.invoice.user.email }} ({{ credit_note.invoice.user.id}}). You can apply this credit note to any user's invoice.</p>
|
<p><strong>This credit note belongs to:</strong> {{ credit_note.invoice.user.email }} ({{ credit_note.invoice.user.id}}). You can apply this credit note to any user's invoice.</p>
|
||||||
|
|
||||||
{{ apply_form|bootstrap }}
|
{{ apply_form|bootstrap }}
|
||||||
<div class="form-actions">
|
<div class="form-actions">
|
||||||
<input class="btn btn-primary" type="submit" value="Apply to invoice" />
|
<input class="btn btn-primary" type="submit" value="Apply to invoice" />
|
||||||
</div>
|
</div>
|
||||||
<h3>Generate cancellation fee</h3>
|
</div>
|
||||||
<p>You can generate an invoice for a cancellation fee, resulting in an invoice
|
|
||||||
and a new credit note.
|
<div class="mb-3">
|
||||||
</p>
|
<h3>Generate cancellation fee</h3>
|
||||||
|
<p>You can generate an invoice for a cancellation fee, resulting in an invoice
|
||||||
|
and a new credit note.
|
||||||
|
</p>
|
||||||
|
|
||||||
{{ cancellation_fee_form|bootstrap }}
|
{{ cancellation_fee_form|bootstrap }}
|
||||||
<div class="form-actions">
|
<div class="form-actions">
|
||||||
<input class="btn btn-primary" type="submit" value="Generate fee" />
|
<input class="btn btn-primary" type="submit" value="Generate fee" />
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<h3>Stripe Refund</h3>
|
<div class="mb-3">
|
||||||
|
<h3>Stripe Refund</h3>
|
||||||
|
|
||||||
<p><a href="{% url 'registripe_refund' credit_note.id %}">View Stripe refund options</a></p>
|
<p><a href="{% url 'registripe_refund' credit_note.id %}">View Stripe refund options</a></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<h3>Manual refund</h3>
|
<div class="mb-3">
|
||||||
<p>You can mark this credit note as refunded, and handle the refund manually.
|
<h3>Manual refund</h3>
|
||||||
</p>
|
<p>You can mark this credit note as refunded, and handle the refund manually.
|
||||||
|
</p>
|
||||||
|
|
||||||
{{ refund_form|bootstrap }}
|
{{ refund_form|bootstrap }}
|
||||||
<div class="form-actions">
|
<div class="form-actions">
|
||||||
<input class="btn btn-primary" type="submit" value="Mark as refunded" />
|
<input class="btn btn-primary" type="submit" value="Mark as refunded" />
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue