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

{{ t('Production Orders') }}

{% if can_write %}
+ {{ t('New production order') }}
{% endif %}
{% for k, l in [('open', 'Open'), ('draft', 'Draft'), ('confirmed', 'Confirmed'), ('in_progress', 'In progress'), ('done', 'Done'), ('all', 'All')] %} {{ t(l) }}{% endfor %}
{% for r in rows %} {% else %}{% endfor %}
{{ t('Order') }}{{ t('Product') }}{{ t('Branch') }}{{ t('Quantity') }} {{ t('Planned') }}{{ t('Due') }}{{ t('Unit cost') }}{{ t('Status') }}
{{ r.number }}{{ nm(r) }}
{{ r.code }}
{{ branches[r.branch_id].code if r.branch_id in branches else '' }} {{ qty(r.qty_produced if r.state == 'done' else r.quantity) }} {{ r.uom or '' }} {{ r.planned_date }} {{ r.due_date or '—' }} {{ r.unit_cost|money if r.unit_cost else '—' }}{{ mo_badge(r.state) }}
{{ t('No production orders.') }}
{% endblock %}