{% 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 can_edit %}
{% csrf_token %}
{% endif %}
{% translate "Payout Information" %}
{% csrf_token %}
{% translate "Payout Name" %}: {% if can_edit %} {% else %} {{ fleet.name }} {% endif %}
{% translate "Date" %}: {% if can_edit %} {% else %} {{ fleet.fleet_time|date:"Y-m-d H:i" }} {% endif %}
{% translate "Battle Report" %}: {% if can_edit %} {% else %} {% if fleet.battle_report %} {{ fleet.battle_report }} {% else %} {% endif %} {% endif %}
{% translate "Status" %}: {% 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 %}
{% translate "Participants" %}: {{ participants.count }}
{% translate "Total Loot Value" %}: {{ fleet.get_total_loot_value|isk_format_full }}
{% translate "Created" %}: {{ fleet.created_at|date:"Y-m-d H:i" }}
{% translate "Notes" %}: {% if can_edit %} {% else %} {% if fleet.notes %}

{{ fleet.notes|linebreaks }}

{% else %}

{% endif %} {% endif %}
{% if can_edit %}
{% endif %}
{% translate "Loot" %}
{% if loot_pools %} {% with loot_pool=loot_pools.first %}

{{ loot_pool.items.count }} {% translate "items" %} {% translate "valued at" %} {{ loot_pool.total_value|isk_format_full }}

{% if can_edit %}
0% 50% 100%
{% translate "Adjust scout bonus percentage - payouts will update automatically" %}
{% endif %}
{% if can_edit %} {% translate "Edit Loot" %} {% translate "Reappraise" %} {% if loot_pool.payouts.exists %}
{% csrf_token %}
{% if not fleet.finalized %}
{% csrf_token %}
{% csrf_token %}
{% endif %} {% endif %} {% if fleet.finalized %} {% translate "Finalized" %} {% endif %} {% endif %}
{% endwith %} {% else %}

{% translate "No loot added yet" %}

{% if can_edit %} {% if participants.count == 0 %} {% translate "Tip: Payouts will be calculated automatically whether you add participants before or after loot" %} {% endif %} {% endif %} {% endif %}
{% if payout_summary %}
{% translate "Payout Summary" %}
{% translate "Participant Pool" %}: {{ payout_summary.total_payouts|isk_format_full }}
{% translate "Corp Share" %}: {{ payout_summary.corp_final|isk_format_full }}
{% translate "Total" %}: {{ payout_summary.total_loot|isk_format_full }}
{% 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 "This payout was finalized by" %} {{ fleet.finalized_by.username }} {% translate "on" %} {{ fleet.finalized_at|date:"Y-m-d H:i" }}.

{% translate "Wallet verification has been run to automatically verify payments. Check the 'Verified' badges in the Participants table below to see verification status." %}

{% elif loot_pool.payouts.count > 0 %}
{% translate "Paying Out ISK" %}

{% translate "To pay participants, use the action buttons in the Participants table below:" %}

  • {% translate "Copy Name" %}: {% translate "Copy character name to clipboard" %}
  • {% translate "Copy Amount" %}: {% translate "Copy ISK amount (whole number, no decimals)" %}
  • {% translate "Open Window" %}: {% translate "Open character window in EVE client (requires ESI)" %}

{% translate "Note:" %} {% translate "Payouts are automatically recalculated when you add, remove, or change participants." %}

{% translate "Finalize Payout:" %} {% translate "When you're done making payments in EVE, click 'Finalize Payout' above to automatically verify all payments via ESI wallet journal." %}

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

{% translate "The loot value results in individual shares below 100M ISK per participant. As per payout policy, all ISK from this payout will go to the corporation. No participant payouts will be distributed." %}

{% elif loot_pool.payouts.count == 0 and participants.count == 0 %}
{% translate "No Payouts Generated" %}

{% translate "Add participants below to generate payouts. Payouts will be calculated automatically." %}

{% endif %} {% endwith %} {% endif %}
{% translate "Participants" %}
{% if can_edit %}
{% if esi_status.enabled %} {% if not esi_status.fc_character_id %} {# No FC character selected #} {% elif not esi_status.has_scope %} {# FC character selected but no ESI token #} {% translate "Add ESI Token" %} {% elif esi_status.can_import %} {# Everything ready - show enabled import button #}
{% csrf_token %}
{% else %} {# Fallback - show disabled button #} {% endif %} {% endif %}
{% endif %}
{% if can_edit and esi_status.enabled %} {# Show helpful hints based on current state #} {% 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. When prompted, make sure to grant the" %} esi-fleets.read_fleet.v1 {% translate "scope for" %} {{ esi_status.fc_character_name }} {% elif esi_status.can_import %} {% translate "Join a fleet in EVE Online, then click 'Import ESI Fleet' 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 "Main Character" %} {% translate "Characters" %} {% translate "Status" %}{% translate "Payout Amount" %} {% translate "Scout" %} {% translate "Exclude" %} {% translate "Actions" %}
{{ main_char.name }} {% if group.participants|length > 1 %} {{ group.participants|length }} {% translate "characters" %} {% 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 %} {% translate "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 %} {% translate "Verified" %} {% else %} {% translate "Pending" %} {% endif %}
{% endwith %} {% else %}
{% csrf_token %}
{% endif %}
{% else %}

{% translate "No participants added yet" %}

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