{% extends "base.html" %} {% from "manufacturing/_macros.html" import mo_badge, qty with context %} {% block title %}{{ t('Production Schedule') }}{% endblock %} {% block content %}

{{ t('Production Schedule') }}

{{ t('Open production orders over the next eight weeks, and the hours each work centre still has to work.') }}

{% for w in weeks %}{% endfor %}{% for r in rows %} {% for c in r.cells %}{% endfor %} {% else %}{% endfor %}
{{ t('Order') }}{{ t('Product') }}{{ t('Qty') }}{{ w.strftime('%d %b') }}{{ t('Status') }}
{{ r.number }}{% if r.pcode %}
{{ r.pcode }}{% endif %}
{{ nm(r) }}{{ qty(r.quantity) }}{% if c %}
{% endif %}
{{ mo_badge(r.state) }}
{{ t('Nothing scheduled.') }}

{{ t('Work centre load (hours)') }}

{% for w in weeks %}{% endfor %}{% for key, mins in grid.items() %} {% for m in mins %}{% set h = m / 60 %}{% set cap = (key[3] or 8) * 5 %}{% endfor %} {% else %}{% endfor %}
{{ t('Work centre') }}{{ w.strftime('%d %b') }}
{{ key[0] }} · {{ nm({'name_en': key[1], 'name_ar': key[2]}) }}{{ '%.0f' % h if m else '·' }}
{{ t('No open operations.') }}

{{ t('Red: more than the work centre can do in a five-day week. Work still to do on orders already late is counted in the first week.') }}

{% endblock %}