{% load i18n humanize %}{% comment %} Material status of an accepted / in-production order. Param: material_view (utils.material_needs.order_material_view). {% endcomment %}{% with mv=material_view %}

{% trans "Material Status" %}

{% blocktrans with time=mv.calculated_at|date:"H:i" %}Calculated at {{ time }}{% endblocktrans %}
{% blocktrans count n=mv.missing|length %}{{ n }} material short{% plural %}{{ n }} materials short{% endblocktrans %} {% blocktrans count n=mv.blocked_tasks|length %}{{ n }} task waiting{% plural %}{{ n }} tasks waiting{% endblocktrans %} {% blocktrans count n=mv.ready_tasks %}{{ n }} task can start{% plural %}{{ n }} tasks can start{% endblocktrans %}

{% trans "Only work that is not done yet counts: completed tasks and tasks running in an EVE job need nothing more. Corp stock goes to the active orders in order of acceptance, so stock an earlier order needs is not counted here." %}

{% if mv.blocked_tasks %}
{% for b in mv.blocked_tasks %} {% endfor %}
{% trans "Task" %} {% trans "Missing materials" %} {% trans "Waiting on" %}
{{ b.item_name }} {% if b.status == "IN_PRODUCTION" %}{% trans "Claimed" %}{% else %}{% trans "Unclaimed" %}{% endif %} {% for m in b.short %}
{{ m.name }}: {{ m.quantity|intcomma }}
{% empty %}-{% endfor %}
{% for w in b.waiting %}
{{ w.name }}: {{ w.built|intcomma }}/{{ w.quantity|intcomma }} {% if "IN_PRODUCTION" in w.statuses %}{% trans "in production" %}{% if w.builders %} ยท {{ w.builders|join:", " }}{% endif %}{% elif "UNCLAIMED" in w.statuses %}{% trans "unclaimed" %}{% endif %}
{% empty %}-{% endfor %}
{% endif %}
{% endwith %}