Merge branch 'chrisjrn/20160913_bugs'

This commit is contained in:
Christopher Neugebauer 2016-09-14 15:08:19 +10:00
commit 796c8cca18
12 changed files with 108 additions and 53 deletions

View file

@ -0,0 +1,9 @@
import models
from django.contrib import admin
from django.utils.translation import ugettext_lazy as _
@admin.register(models.AttendeeProfile)
class UserProfileAdmin(admin.ModelAdmin):
model = models.AttendeeProfile
list_display = ("name", "company", "name_per_invoice")

View file

@ -109,7 +109,7 @@
{% items_pending as pending %} {% items_pending as pending %}
{% if pending %} {% if pending %}
<a href="{% url "checkout" %}" class="btn btn-xs btn-default"> <a href="{% url "checkout" %}" class="btn btn-xs btn-default">
<i class="fa fa-credit-card"></i> Pay your registration <i class="fa fa-credit-card"></i> Check out and pay
</a> </a>
{% endif %} {% endif %}
{% endif %} {% endif %}
@ -129,18 +129,19 @@
{% items_pending as pending %} {% items_pending as pending %}
{% if pending %} {% if pending %}
<h5>Items pending payment</h5> <h5>Items pending payment</h5>
{% include "registrasion/items_list.html" with items=pending %} {% include "registrasion/_items_list.html" with items=pending %}
<p><a href="{% url "checkout" %}" class="btn btn-xs btn-default">
<i class="fa fa-credit-card"></i>
Check out and pay for these items.</a></p>
{% endif %} {% endif %}
{% items_purchased as purchased %} {% items_purchased as purchased %}
{% if purchased %} {% if purchased %}
<h5>Paid items</h5> <h5>Paid items</h5>
{% include "registrasion/items_list.html" with items=purchased %} {% include "registrasion/_items_list.html" with items=purchased %}
{% endif %} {% endif %}
<h5>Add/Update items</h5> <h5>Add/Update items</h5>
{% available_categories as categories %} {% available_categories as categories %}
{% for category in categories %} {% include "registrasion/_category_list.html" with categories=categories %}
<li><a href="{% url "product_category" category.id %}">{{ category.name }}</a></li>
{% endfor %}
</ul> </ul>
{% invoices as invoices %} {% invoices as invoices %}

View file

@ -0,0 +1,7 @@
<ul>
{% for category in categories %}
{% if not category in exclude %}
<li><a href="{% url "product_category" category.id %}">{{ category.name }}</a></li>
{% endif %}
{% endfor %}
</ul>

View file

@ -10,7 +10,7 @@
{% if not invoice.is_void %} {% if not invoice.is_void %}
<li><strong>Due:</strong> {{ invoice.due_time|date:"DATETIME_FORMAT"}}</li> <li><strong>Due:</strong> {{ invoice.due_time|date:"DATETIME_FORMAT"}}</li>
{% endif %} {% endif %}
<li><strong>Recipient:</strong> {{ invoice_user.attendee.attendeeprofilebase.invoice_recipient|linebreaksbr}}</li> <li><strong>Recipient:</strong> {{ invoice.recipient|linebreaksbr}}</li>
</ul> </ul>
{% endwith %} {% endwith %}

View file

@ -1,7 +1,7 @@
{% if items %} {% if items %}
<ul> <ul>
{% for item in items %} {% for item in items %}
<li>{{ item.quantity }} &times; {{ item.product }}</li> <li>{{ item.quantity }} &times; {{ item.product }} {{ suffix }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endif %} {% endif %}

View file

@ -13,11 +13,11 @@
cancel the invoice that added those items. You will need to re-add the items cancel the invoice that added those items. You will need to re-add the items
from that invoice for the user to have them available again.</p> from that invoice for the user to have them available again.</p>
{% include "registrasion/items_list.html" with items=paid %} {% include "registrasion/_items_list.html" with items=paid %}
<h3>Cancelled Items</h3> <h3>Cancelled Items</h3>
{% include "registrasion/items_list.html" with items=cancelled %} {% include "registrasion/_items_list.html" with items=cancelled %}
<h3>Amend pending items</h3> <h3>Amend pending items</h3>

View file

@ -8,7 +8,7 @@
{% 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.user.attendee.attendeeprofilebase.invoice_recipient }}</li> <li><strong>Attention:</strong> {{ credit_note.invoice.recipient }}</li>
<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>

View file

@ -1,7 +1,7 @@
{% if discounts %} {% if discounts %}
<ul> <ul>
{% for discount in discounts %} {% for discount in discounts %}
<li>{{ discount.quantity }} &times; {{ discount.clause }}</li> <li>{{ discount.discount.description }}: {{ discount.quantity }} &times; {{ discount.clause }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endif %} {% endif %}

View file

@ -1,35 +0,0 @@
{% extends "registrasion/base.html" %}
{% load bootstrap %}
{% load registrasion_tags %}
{% block body %}
<h1>Conference Registration Review</h1>
{% items_pending as pending %}
{% if pending %}
<p><em>Step 4 of 4</em></p>
<p>You're almost done! You've selected the following items:<p>
{% include "registrasion/items_list.html" with items=pending %}
<p>You can either generate an invoice and pay for your registration, or return to
the dashboard to make amendments.</p>
<div class="form-actions">
<a class="btn btn-default" href="{% url "checkout" %}">Check out and pay</a>
<a class="btn btn-default" href="{% url "dashboard" %}">Return to dashboard</a>
</div>
{% else %}
<p>You have no items that need to be paid.</p>
<div class="form-actions">
<a class="btn btn-default" href="{% url "dashboard" %}">Return to dashboard</a>
</div>
{% endif %}
{% endblock %}

View file

@ -20,7 +20,7 @@
{% if items %} {% if items %}
<h3>Paid items</h3> <h3>Paid items</h3>
<p>You have already paid for the following items:</p> <p>You have already paid for the following items:</p>
{% include "registrasion/items_list.html" with items=items %} {% include "registrasion/_items_list.html" with items=items %}
{% endif %} {% endif %}
@ -37,8 +37,10 @@
<div class="form-actions"> <div class="form-actions">
<input class="btn btn-primary" type="submit" value="Add to cart" /> <input class="btn btn-primary" type="submit" value="Add to cart" />
<a href="{% url "dashboard" %}" class="btn btn-default">Return to dashboard</a>
</div> </div>
</form> </form>

View file

@ -23,14 +23,11 @@
<th>{{ heading }}</th> <th>{{ heading }}</th>
{% endfor %} {% endfor %}
</tr> </tr>
{% for line in report.data %} {% for line in report.rows %}
<tr> <tr>
{% for item in line %} {% for item in line %}
<td> <td>
{% if report.link_view and forloop.counter0 == 0 %} {{ item|safe }}
<a href="{% url report.link_view item %}">
{% endif %}
{{ item }}
</td> </td>
{% endfor %} {% endfor %}
</tr> </tr>

View file

@ -0,0 +1,74 @@
{% extends "registrasion/base.html" %}
{% load bootstrap %}
{% load registrasion_tags %}
{% block body %}
<h1>Review your selection</h1>
{% items_pending as pending %}
{% if pending %}
<h3>Current selection</h3>
<p>You've selected the following items, which will be in your invoice when
you check out:<p>
{% include "registrasion/_items_list.html" with items=pending %}
{% items_purchased as purchased %}
{% if purchased %}
<p>You've already paid for the following items:</p>
{% include "registrasion/_items_list.html" with items=purchased suffix="(PAID)" %}
{% endif %}
{% missing_categories as missing %}
<h3>Add to your selection</h3>
<p>You can add these items now, or you can come back and add them in a
later purchase.</p>
{% if missing %}
<p>
<strong>You have <em>not</em> selected any items from the following
categories. Even if your ticket includes complimentary tickets to social
events, or t-shirts, you must still add them to your selection.
</strong>
</p>
{% include "registrasion/_category_list.html" with categories=missing %}
{% endif %}
<p>
<strong>You can also change your selection from these categories:</strong>
</p>
{% available_categories as available %}
{% include "registrasion/_category_list.html" with categories=available exclude=missing %}
<h3>What next?</h3>
<p>You can either generate an invoice and pay for your selections, or return to
the dashboard.</p>
<div class="form-actions">
<a class="btn btn-primary" href="{% url "checkout" %}">
<i class="fa fa-credit-card"></i> Check out and pay
</a>
<a class="btn btn-default" href="{% url "dashboard" %}">Return to dashboard</a>
</div>
{% else %}
<p>You have no items that need to be paid.</p>
<div class="form-actions">
<a class="btn btn-default" href="{% url "dashboard" %}">Return to dashboard</a>
</div>
{% endif %}
{% endblock %}