{% extends 'aapayout/base.html' %} {% load i18n %} {% load humanize %} {% load aapayout_filters %} {% block details %}

{{ fleet.name }}

{{ fleet.fleet_commander.username }} | {{ fleet.fleet_time|date:"Y-m-d H:i" }} {% if fleet.battle_report %} | {% translate "Battle Report" %} {% endif %}

{% if can_edit %}
{% csrf_token %}
{% endif %}
{% translate "Created" %}
{% if loot_pools %} {% else %} {% endif %}
{% translate "Loot Valued" %}
{% if payout_map %} {% else %} {% endif %}
{% translate "Payouts Ready" %}
{% if fleet.finalized %} {% else %} {% endif %}
{% translate "Finalized" %}
{% translate "Fleet Details" %}
{% csrf_token %}
{% if can_edit %} {% else %}

{{ fleet.name }}

{% endif %}
{% if can_edit %} {% else %}

{{ fleet.fleet_time|date:"Y-m-d H:i" }}

{% endif %}
{% if can_edit %} {% else %} {% if fleet.battle_report %} {{ fleet.battle_report|truncatechars:40 }} {% else %} {% endif %} {% endif %}
{% if fleet.status == 'draft' %} {{ fleet.get_status_display }} {% elif fleet.status == 'active' %} {{ fleet.get_status_display }} {% elif fleet.status == 'completed' %} {{ fleet.get_status_display }} {% elif fleet.status == 'paid' %} {{ fleet.get_status_display }} {% endif %}

{% if can_edit %} {% else %} {% if fleet.notes %}

{{ fleet.notes|linebreaks }}

{% else %}

{% translate "No notes" %}

{% endif %} {% endif %}
{% if can_edit %}
{% endif %}
{% translate "Payout Calculator" %}
{% if fleet.finalized %} {% translate "Finalized" %} {% endif %}
{% if loot_pools %} {% with loot_pool=loot_pools.first %}
{% translate "Total Loot Value" %}

{{ loot_pool.total_value|isk_format_full }}

{{ loot_pool.items.count }} {% translate "items" %}
{% translate "Participants" %}

{{ unique_player_count }} {% translate "players" %} {% if participants|length != unique_player_count %} ({{ participants|length }} {% translate "characters" %}) {% endif %}

{% if payout_summary %}
{% translate "Total Loot Value" %}: {{ payout_summary.total_loot|isk_format_full }}
{% translate "Corp Share" %} ({{ payout_summary.corp_share_pct|floatformat:0 }}%): -{{ payout_summary.corp_share|isk_format_full }}
{% translate "Participant Pool" %}: {{ payout_summary.participant_pool|isk_format_full }}
{{ payout_summary.eligible_count }} {% translate "players" %} ({{ payout_summary.scout_count }} {% translate "scouts" %}, {{ payout_summary.regular_count }} {% translate "regular" %}) × {{ payout_summary.base_share|isk_format_full }} {% translate "base" %}
{% translate "Total Distributed" %}: {{ payout_summary.total_payouts|isk_format_full }}
{% translate "Rounding Remainder" %}: +{{ payout_summary.remainder|isk_format_full }} {% translate "to corp" %}
{% translate "Final Corp Share" %}: {{ payout_summary.corp_final|isk_format_full }}
{% endif %} {% if can_edit %}
1 3 5
{% translate "Scouts receive this many shares (regular = 1 share). Payouts update automatically." %}
{% endif %}
{% if can_edit %}
{% translate "Edit Loot" %}
{% if loot_pool.payouts.exists and not fleet.finalized %}
{% csrf_token %}
{% csrf_token %}
{% endif %} {% endif %}
{% endwith %} {% else %}

{% translate "No loot added yet" %}

{% if can_edit %} {% if participants.count == 0 %}

{% translate "Tip: You can add participants before or after loot - payouts are calculated automatically either way." %}

{% endif %} {% endif %}
{% endif %}
{% if wallet_scope_status.needs_verification and not wallet_scope_status.has_wallet_scope %}
{% endif %} {% if loot_pools %} {% with loot_pool=loot_pools.first %} {% if fleet.finalized %}
{% translate "Payout Finalized" %}

{% translate "Finalized by" %} {{ fleet.finalized_by.username }} {% translate "on" %} {{ fleet.finalized_at|date:"Y-m-d H:i" }}. {% translate "Check the 'Verified' badges below to see verification status." %}

{% elif loot_pool.payouts.count > 0 %}
{% translate "Ready to Pay" %}

{% translate "Use the action buttons in the Participants table to pay each player:" %}

  • {% translate "Copy character name" %}
  • {% translate "Copy ISK amount" %}
  • {% translate "Open in EVE client" %}

{% translate "When done, click 'Finalize' to verify payments via ESI wallet." %}

{% elif loot_pool.payouts.count == 0 and participants|length > 0 %}
{% translate "Below Minimum Threshold" %}

{% translate "Individual shares are below the minimum threshold of 100M ISK per participant." %} {% translate "The full loot value of" %} {{ loot_pool.total_value|floatformat:2 }} ISK {% translate "goes to the corporation." %}

{% if can_edit and not fleet.finalized %}
{% csrf_token %}
{% endif %}
{% elif loot_pool.payouts.count == 0 and participants|length == 0 %}
{% translate "Add Participants" %}

{% translate "Loot valued! Now add participants to generate payouts." %}

{% endif %} {% endwith %} {% endif %}
{% translate "Participants" %} ({{ unique_player_count }} {% translate "players" %}{% if participants|length != unique_player_count %}, {{ participants|length }} {% translate "characters" %}{% endif %})
{% if can_edit %}
{% if esi_status.enabled %} {% if not esi_status.fc_character_id %} {% elif not esi_status.has_scope %} {% translate "Add ESI Token" %} {% elif esi_status.can_import %}
{% csrf_token %}
{% else %} {% endif %} {% endif %}
{% endif %}
{% if can_edit and esi_status.enabled %} {% if not esi_status.fc_character_id %} {% translate "Select your FC character from the dropdown in the top navigation bar to enable ESI fleet import" %} {% elif not esi_status.has_scope %} {% translate "Click 'Add ESI Token' above to add your character with" %} esi-fleets.read_fleet.v1 {% translate "scope" %} {% elif esi_status.can_import %} {% translate "Join a fleet in EVE Online, then click 'Import ESI' to automatically add all members" %} {% endif %} {% endif %}
{% if participants %}
{% if payout_map %} {% endif %} {% if can_edit %} {% endif %} {% for group in participant_groups.values %} {% with main_char=group.main_character main_char_id=group.main_character.id first_participant=group.participants.0 %} {% if payout_map %} {% endif %} {% if can_edit %} {% endif %} {% endwith %} {% endfor %}
{% translate "Player" %} {% translate "Characters" %} {% translate "Status" %}{% translate "Payout" %} {% translate "Scout" %} {% translate "Exclude" %} {% translate "Actions" %}
{{ main_char.name }} {% if group.participants|length > 1 %} {{ group.participants|length }} {% for p in group.participants %}{{ p.character.name }}{% if not forloop.last %}, {% endif %}{% endfor %} {% else %} {{ first_participant.character.name }} {% endif %} {% if first_participant.is_active %} {% translate "Active" %} {% else %} {% translate "Left" %} {% endif %} {% if main_char_id in payout_map %} {{ payout_map|get_item:main_char_id|isk_format_full }} {% if group.is_scout %} {% endif %} {% else %} {% endif %} {% if main_char_id in existing_payouts %} {% with payout_obj=existing_payouts|get_item:main_char_id %}
{% if not payout_obj.verified and not fleet.finalized %} {% endif %}
{% if payout_obj.verified %} {% else %} {% endif %}
{% endwith %} {% else %}
{% csrf_token %}
{% endif %}
{% else %}

{% translate "No participants added yet" %}

{% if can_edit %}

{% translate "Click 'Add Manual' or 'Import ESI' above to add participants" %}

{% endif %}
{% endif %}
{% if can_edit %} {% endif %} {% if can_edit and not loot_pools %} {% endif %}
{% endblock %}