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

{{ t('Manufacturing') }}

{{ t('Production, material planning and quality at a glance.') }}

{{ t('Material planning') }} {% if can_write %}+ {{ t('New production order') }}{% endif %}
{% set cur = company.currency %}
{{ t('In production') }}{{ icon('settings') }}
{{ ov.counts.get('in_progress', 0) }}
{{ ov.counts.get('confirmed', 0) }} {{ t('confirmed, waiting to start') }}
{{ t('Late orders') }}{{ icon('clock') }}
{{ ov.late }}
{{ t('past their due date') }}
{{ t('Produced this month') }}{{ icon('box') }}
{{ ov.month.value|money(cur) }}{{ cur }}
{{ qty(ov.month.qty) }} {{ t('units') }}{% if ov.month.scrap %} · {{ qty(ov.month.scrap) }} {{ t('scrapped') }}{% endif %}
{{ t('Quality pass rate') }}{{ icon('check') }}
{% set total_qc = ov.qc_pass + ov.qc_fail %}
{{ ((ov.qc_pass / total_qc * 100)|round(1)) if total_qc else '—' }}{% if total_qc %}%{% endif %}
{{ ov.qc_fail }} {{ t('failed in the last 90 days') }}

{{ t('Active production orders') }}

{{ t('View all') }} →
{% for r in active %} {% else %}{% endfor %}
{{ t('Order') }}{{ t('Product') }}{{ t('Quantity') }}{{ t('Due') }}{{ t('Status') }}
{{ r.number }}{{ nm(r) }}
{{ r.code }}
{{ qty(r.quantity) }} {{ r.uom or '' }} {{ r.due_date or r.planned_date }}{{ mo_badge(r.state) }}
{{ t('Nothing in production.') }}

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

{{ t('Planned hours not yet worked, in days of capacity.') }}

{% for w in ov.load %}{% set days = (w.minutes / 60 / (w.hours_per_day or 8)) %}
{{ w.code }} · {{ nm(w) }}{{ '%.1f' % days }} {{ t('days') }}
{% else %}

{{ t('No work centres yet.') }}

{% endfor %}

{{ t('Work in progress') }}

{{ ov.wip|money(cur) }} {{ cur }}

{{ t('Materials and labour in orders not yet finished (work in progress account).') }}

{{ t('Suggested to make') }}

{{ t('Plan') }} →
{% for m in to_make[:6] %} {% else %}{% endfor %}
{{ t('Product') }}{{ t('Demand') }}{{ t('On hand') }}{{ t('Make') }}
{{ nm(m) }}{{ qty(m.demand) }}{{ qty(m.on_hand) }}{{ qty(m.suggest) }}
{{ t('Stock and planned production cover the demand.') }}

{{ t('Components short') }}

{{ t('Buy') }} →
{% for b in to_buy[:6] %} {% else %}{% endfor %}
{{ t('Component') }}{{ t('Needed') }}{{ t('Available') }}{{ t('Short') }}
{{ nm(b) }}{{ qty(b.required) }}{{ qty(b.on_hand + b.incoming) }}{{ qty(b.short) }}
{{ t('All components are available.') }}
{% endblock %}