diff --git a/apps/common/receipt.py b/apps/common/receipt.py index c6b2be005..eaad5a63f 100644 --- a/apps/common/receipt.py +++ b/apps/common/receipt.py @@ -28,9 +28,8 @@ def render_receipt(user, png=False, pdf=False): admissions = purchases.filter(ProductGroup.type == "admissions").all() - vehicle_tickets = purchases.filter( - ProductGroup.type.in_(["parking", "campervan"]) - ).all() + parking_tickets = purchases.filter(ProductGroup.type == "parking").all() + campervan_tickets = purchases.filter(ProductGroup.type == "campervan").all() tees = purchases.filter(ProductGroup.type == "tees").all() hires = purchases.filter(ProductGroup.type == "hire").all() @@ -49,7 +48,8 @@ def render_receipt(user, png=False, pdf=False): format_inline_qr=format_inline_qr, format_inline_barcode=format_inline_barcode, admissions=admissions, - vehicle_tickets=vehicle_tickets, + parking_tickets=parking_tickets, + campervan_tickets=campervan_tickets, transferred_tickets=transferred_tickets, tees=tees, hires=hires, diff --git a/templates/receipt-campervan.html b/templates/receipt-campervan.html new file mode 100644 index 000000000..8c1ca349a --- /dev/null +++ b/templates/receipt-campervan.html @@ -0,0 +1,40 @@ +{% from '_receipthelpers.html' import render_header, render_barcode with context %} + + {% for ticket in campervan_tickets %} + {{ render_header(ticket.owner) }} +

Live-in vehicle ticket {{ loop.index }}

+
+{# TODO: This wording needs amending! https://github.com/emfcamp/Website/issues/1193 #} +

Please put this on your dashboard before arriving at EMF. + Volunteers at the main access gate will check it on your arrival. + They will show you where to park and unload your stuff.

+

For details on getting to the site, please visit + our wiki page.

+

If you fill in your number below we will try to contact you about + your vehicle in case of emergency.

+ +
 
+
 
+ + {{ render_barcode(ticket.owner) }} + +
 
+
 
+
 
+ +

Your ticket details

+
{{ ticket.product.display_name }}
+ +
 
+ + + + +
Phone number
+
+ + {% if not loop.last %} +
+ {% endif %} + {% endfor %} + diff --git a/templates/receipt-parking.html b/templates/receipt-parking.html index f4f27e07a..40e60f63b 100644 --- a/templates/receipt-parking.html +++ b/templates/receipt-parking.html @@ -1,6 +1,6 @@ {% from '_receipthelpers.html' import render_header, render_barcode with context %} - {% for ticket in vehicle_tickets %} + {% for ticket in parking_tickets %} {{ render_header(ticket.owner) }}

Parking ticket {{ loop.index }}

diff --git a/templates/receipt.html b/templates/receipt.html index 1ca3b661d..5241da02c 100755 --- a/templates/receipt.html +++ b/templates/receipt.html @@ -94,14 +94,22 @@

Your hired items

- {% if vehicle_tickets %} + {% if parking_tickets %}
{% endif %} {% endif %} - {% if vehicle_tickets %} + {% if parking_tickets %} {% include 'receipt-parking.html' %} + + {% if campervan_tickets %} +
+ {% endif %} + {% endif %} + + {% if campervan_tickets %} + {% include 'receipt-campervan.html' %} {% endif %} {% endblock %}