{% extends "base.html" %} {% from "manufacturing/_macros.html" import qty as fq with context %} {% block title %}{{ t('Bill of materials') }} · {{ nm(b) }}{% endblock %} {% block content %} {% set cur = company.currency %}
{{ t('Bills of Materials') }}

{{ nm(b) }} {{ b.code or b.pcode }}

{% if can_write %}{{ t('Edit') }}
+ {{ t('Production order') }}{% endif %}
{{ t('Materials') }}
{{ est.material|money(cur) }}{{ cur }}
{{ t('Labour & machine time') }}
{{ est.conversion|money(cur) }}{{ cur }}
{{ fq(est.minutes) }} {{ t('minutes') }}
{{ t('Total cost') }}
{{ est.total|money(cur) }}{{ cur }}
{{ t('Cost per unit') }}
{{ (est.unit|round|int)|money(cur) }}{{ cur }}

{{ t('Components') }}

{% for ln in lines %} {% endfor %}
{{ t('Component') }}{{ t('Per batch of') }} {{ fq(b.quantity) }}{{ t('Scrap %') }}{{ t('For') }} {{ fq(qty) }}{{ t('Unit cost') }}{{ t('Cost') }}
{{ nm(ln) }} {% if ln.product_id in sub_boms %}{{ t('Sub-assembly') }}{% endif %}
{{ ln.code }}
{{ fq(ln.quantity) }} {{ ln.uom or '' }}{{ fq(ln.scrap_pct) }} {{ fq(comps.get(ln.product_id, 0)) }}{{ (costs[ln.product_id]|round|int)|money(cur) }} {{ ((costs[ln.product_id] * comps.get(ln.product_id, 0))|round|int)|money(cur) }}

{{ t('Operations') }}

{% for op in ops %}{% set m = op_minutes[loop.index0] %} {% else %}{% endfor %}
{{ t('Operation') }}{{ t('Work centre') }}{{ t('Minutes per batch') }}{{ t('For') }} {{ fq(qty) }}{{ t('Rate / hour') }}{{ t('Cost') }}
{{ op.name }}{{ op.wc_code }} · {{ nm({'name_en': op.wc_name_en, 'name_ar': op.wc_name_ar}) }}{{ fq(op.minutes) }}{{ fq(m) }} {{ op.cost_per_hour|money(cur) }}{{ ((m / 60 * op.cost_per_hour)|round|int)|money(cur) }}
{{ t('No operations.') }}
{% if can_write %}

{{ t('Price a quotation') }}

{{ t('Cost per unit') }} {{ (est.unit|round|int)|money(cur) }} · {{ t('Margin') }} % → {{ t('Price per unit') }} {{ (price|round|int)|money(cur) }}

{{ t('Price = cost ÷ (1 − margin). Cost is the bill of materials at today\'s component costs and work-centre rates.') }}

{% endif %} {% if b.notes %}

{{ b.notes }}

{% endif %} {% endblock %}