Changeset - 964fe380da09
[Not reviewed]
0 1 0
Christopher Neugebauer - 8 years ago 2016-09-02 05:57:44
chrisjrn@gmail.com
Attendee manifest page now reports the items a user has pending and purchased.
1 file changed with 16 insertions and 1 deletions:
0 comments (0 inline, 0 general)
registrasion/reporting/views.py
Show inline comments
...
 
@@ -8,6 +8,7 @@ from django.db.models import Count, Sum
 
from django.db.models import Case, When, Value
 
from django.shortcuts import render
 

	
 
from registrasion.controllers.item import ItemController
 
from registrasion.models import commerce
 
from registrasion.models import people
 
from registrasion import views
...
 
@@ -215,15 +216,29 @@ def attendee(request, form, attendee_id=None):
 

	
 
    # TODO: METADATA.
 

	
 

	
 
    ic = ItemController(attendee.user)
 
    # Paid products
 
    headings = ["Product", "Quantity"]
 
    data = []
 

	
 
    for pq in ic.items_purchased():
 
        data.append([
 
            pq.product,
 
            pq.quantity,
 
        ])
 

	
 
    reports.append(Report("Paid Products", headings, data))
 

	
 
    # Unpaid products
 
    headings = ["Product", "Quantity"]
 
    data = []
 

	
 
    for pq in ic.items_pending():
 
        data.append([
 
            pq.product,
 
            pq.quantity,
 
        ])
 

	
 
    reports.append( Report("Unpaid Products", headings, data))
 

	
 
    # Invoices
0 comments (0 inline, 0 general)