{% load i18n humanize %}{% comment %} Director Materials tab (loaded on first open). Context from views.director.director_materials. {% endcomment %} {% if not plan %}

{% trans "Your main character has no corporation, so there is no material plan." %}

{% else %}

{% trans "What the accepted and in-production orders still need for their open tasks. Completed tasks and tasks running in an EVE job need nothing more; inputs that sub-tasks build are not counted. Corp stock goes to the orders in order of acceptance." %}

{% blocktrans with time=plan.calculated_at|date:"H:i" %}Calculated at {{ time }}{% endblocktrans %}
{% if not orders %}

{% trans "There are no accepted or in-production orders." %}

{% else %}
{% for o in orders %}
#{{ o.order_id }} {{ o.character }}
{{ o.label }}
{% blocktrans with pct=o.coverage %}{{ pct }}% covered{% endblocktrans %} {% blocktrans count n=o.short_lines %}{{ n }} material short{% plural %}{{ n }} materials short{% endblocktrans %} {% blocktrans with b=o.blocked_tasks t=o.open_tasks %}{{ b }} of {{ t }} open tasks waiting{% endblocktrans %}
{% endfor %}

{% if shortages %}{% blocktrans count n=shortages|length %}{{ n }} material short{% plural %}{{ n }} materials short{% endblocktrans %} {% else %}{% trans "Corp stock covers all active orders" %}{% endif %}

{% csrf_token %}
{% for mat in rows %} {% endfor %}
{% trans "Material" %} {% trans "Still needed" %} {% trans "Corp Stock" %} {% trans "Shortfall" %} {% trans "On buy order" %} {% trans "Per order" %}
{% if mat.short %} {% endif %}
{{ mat.name }} {{ mat.group_name }}
{{ mat.need|intcomma }} {{ mat.stock|intcomma }}{% include "industry_reforged/partials/stock_locations.html" %} {{ mat.short|intcomma }} {{ mat.on_order|intcomma }} {% for o in mat.order_list %}
#{{ o.order_id }}: {{ o.need|intcomma }}{% if o.short %} ({% blocktrans with q=o.short|intcomma %}{{ q }} short{% endblocktrans %}){% endif %}
{% endfor %}
{% if shortages %} {% trans "Manage and copy the resulting buy orders on the Procurement Buy Orders tab." %} {% endif %}
{% endif %} {% endif %}