{% extends "django_program/manage/base.html" %} {% block title %}Bulk Deal #{{ purchase.pk }}{% endblock %} {% block breadcrumb %} {% endblock %} {% block page_title %}

Bulk Deal #{{ purchase.pk }}

{% if purchase.product_description %}{{ purchase.product_description }}{% endif %}

{% endblock %} {% block content %}
Sponsor
{% if purchase.sponsor %}{{ purchase.sponsor.name }}{% else %}--{% endif %}
{% if purchase.ticket_type %}
Ticket Type
{{ purchase.ticket_type.name }}
{% endif %} {% if purchase.addon %}
Add-on
{{ purchase.addon.name }}
{% endif %} {% if purchase.product_description %}
Deal Name
{{ purchase.product_description }}
{% endif %}
Number of Codes
{{ purchase.quantity }}
Price per Unit
${{ purchase.unit_price }}
Total Amount
${{ purchase.total_amount }}
Payment Status
{% if purchase.payment_status == "paid" %} Paid {% elif purchase.payment_status == "approved" %} Approved {% elif purchase.payment_status == "pending" %} Pending {% elif purchase.payment_status == "processing" %} Processing {% elif purchase.payment_status == "failed" %} Failed {% elif purchase.payment_status == "refunded" %} Refunded {% endif %}
Fulfilled
{% if purchase.is_fulfilled %} Yes {% else %} {{ purchase.vouchers_generated }} / {{ purchase.quantity }} {% endif %}
Requested By
{% if purchase.requested_by %}{{ purchase.requested_by.get_full_name|default:purchase.requested_by.username }}{% else %}--{% endif %}
Approved By
{% if purchase.approved_by %}{{ purchase.approved_by.get_full_name|default:purchase.approved_by.username }}{% else %}--{% endif %}
Created
{{ purchase.created_at|date:"N j, Y, P" }}
Updated
{{ purchase.updated_at|date:"N j, Y, P" }}
{% if purchase.voucher_config %}

Voucher Configuration

{% with vc=purchase.voucher_config %}
Discount Type
{% if vc.voucher_type == "comp" %}Complimentary (100% off) {% elif vc.voucher_type == "percentage" %}Percentage discount {% elif vc.voucher_type == "fixed_amount" %}Fixed amount off {% else %}{{ vc.voucher_type|default:"--" }} {% endif %}
{% if vc.voucher_type != "comp" %}
Discount Amount
{% if vc.voucher_type == "percentage" %}{{ vc.discount_value }}% {% elif vc.voucher_type == "fixed_amount" %}${{ vc.discount_value }} {% else %}{{ vc.discount_value|default:"0" }} {% endif %}
{% endif %}
Uses per Code
{{ vc.max_uses|default:"1" }}
{% if vc.valid_from %}
Valid From
{{ vc.valid_from }}
{% endif %} {% if vc.valid_until %}
Valid Until
{{ vc.valid_until }}
{% endif %} {% endwith %}
{% endif %}
{% if purchase.payment_status == "pending" %}
{% csrf_token %}
Approving marks this deal as ready. You can then mark it paid and generate voucher codes. {% endif %} {% if purchase.payment_status == "approved" and not purchase.is_fulfilled %}
{% csrf_token %}
This will create {{ purchase.quantity }} unique voucher codes using the configuration above. {% endif %} {% if purchase.payment_status == "paid" and not purchase.is_fulfilled %}
{% csrf_token %}
This will create {{ purchase.quantity }} unique voucher codes using the configuration above. {% endif %} Back to List
{% if voucher_links %}

Generated Voucher Codes

{% for link in voucher_links %} {% endfor %}
Code Type Discount Uses Status Generated
{{ link.voucher.code }} {{ link.voucher.get_voucher_type_display }} {% if link.voucher.voucher_type == "comp" %} 100% off {% elif link.voucher.voucher_type == "percentage" %} {{ link.voucher.discount_value }}% off {% elif link.voucher.voucher_type == "fixed_amount" %} ${{ link.voucher.discount_value }} off {% endif %} {{ link.voucher.times_used }} / {{ link.voucher.max_uses }} {% if link.voucher.is_active %} Active {% else %} Inactive {% endif %} {{ link.created_at|date:"M j, Y g:i A" }}
{% endif %} {% endblock %}