{# fortunaisk/templates/fortunaisk/lottery_detail.html #} {% extends "fortunaisk/base.html" %} {% load i18n humanize fortunaisk_tags static %} {% block page_title %} {% trans "Lottery Detail" %} {% endblock page_title %} {% block details %}

{% trans "Lottery Detail" %}: {{ lottery.lottery_reference }}

{% trans "Review the details and manage the lottery settings." %}

{% if perms.fortunaisk.can_admin_app and lottery.status == 'active' %}
{% csrf_token %}
{% endif %} {% trans "View Participants" %}
{% trans "Lottery Information" %}
  • {% trans "Status" %} {% if lottery.status == "active" %} {% trans "Active" %} {% elif lottery.status == "completed" %} {% trans "Completed" %} {% elif lottery.status == "pending" %} {% trans "Pending" %} {% elif lottery.status == "cancelled" %} {% trans "Cancelled" %} {% endif %}
  • {% trans "Ticket Price (ISK)" %} {{ lottery.ticket_price|intcomma }}
  • {% trans "Tax (%)" %} {{ lottery.tax|floatformat:2 }} %
  • {% trans "Total Pot (ISK)" %} {{ lottery.total_pot|intcomma }}
  • {% trans "Tax Collected (ISK)" %} {{ tax_collected|intcomma }}
  • {% trans "Winner Count" %} {{ lottery.winner_count }}
  • {% trans "Max Tickets per User" %} {% if lottery.max_tickets_per_user %} {{ lottery.max_tickets_per_user }} {% else %} {% trans "Unlimited" %} {% endif %}
  • {% trans "Start Date" %} {{ lottery.start_date|date:"Y-m-d H:i" }}
  • {% trans "End Date" %} {{ lottery.end_date|date:"Y-m-d H:i" }}
{% trans "Additional Information" %}
  • {% trans "Payment Receiver" %} {% if lottery.payment_receiver %} {{ lottery.payment_receiver }} {% else %} {% trans "Unknown" %} {% endif %}
  • {% trans "Duration" %} {{ lottery.duration_value }} {{ lottery.get_duration_unit_display }}
  • {% trans "Winners Distribution" %}:
      {% for dist in distributions %}
    • {% trans "Winner" %} {{ dist.winner_rank }}: {{ dist.winner_prize_distribution }}%
    • {% empty %}
    • {% trans "No distribution defined." %}
    • {% endfor %}
  • {% trans "Participants" %} {{ participant_count }}
  • {% trans "Tickets Sold" %} {{ tickets_sold }}

{% trans "Winners" %}

{% if winners %}
{% for winner in winners %} {% endfor %}
{% trans "Reference" %} {% trans "User" %} {% trans "Character" %} {% trans "Prize (ISK)" %} {% trans "Won At" %} {% trans "Distributed" %} {% trans "Actions" %}
{{ winner.ticket.lottery.lottery_reference }} {{ winner.ticket.user.username }} {% if winner.character %} {{ winner.character }} {% else %} {% trans "N/A" %} {% endif %} {{ winner.prize_amount|floatformat:2|intcomma }} {{ winner.won_at|date:"Y-m-d H:i" }} {% if winner.distributed %} {% trans "Yes" %} {% else %} {% trans "No" %} {% endif %} {% if perms.fortunaisk.can_admin_app and not winner.distributed %}
{% csrf_token %}
{% endif %}
{% else %}
{% trans "No winners recorded yet." %}
{% endif %}
{% endblock details %}