{% extends "erp_base.html" %} {% block content %}
◀◀ 조사 목록

재고조사 #{{ stocktake.id }} — {{ stocktake.stocktake_date }} · {{ stocktake.warehouse_code }}

{% if stocktake.status=='finalized' %}확정 ({{ stocktake.finalized_at }}) {% elif stocktake.status=='cancelled' %}취소 {% else %}작성중{% endif %}
{% if missing_bom %}

⚠ BOM 구성이 없는 세트: {{ missing_bom|join(', ') }} — itemcode_db set_components 확인 필요. 확정 불가.

{% endif %}
{% if is_draft %}

① 낱개 아이템

세트 안에 든 건 빼고, 낱개 보관분만. 빈칸=미조사, 0 입력 가능.
{% for it in individual_items %} {% endfor %}
CodeNameQty
{{ it.item_code }} {{ it.item_name }}

② 세트 아이템

미리 포장된 세트 재고. BOM(itemcode_db)으로 낱개 분해됨.
{% for it in set_items %} {% endfor %}
Set CodeSet NameQty
{{ it.item_code }} {{ it.item_name }}
{% endif %}

최종 계산 (낱개 기준)

total_qty = direct_qty(낱개 직접) + from_set_qty(세트 분해)
{% for r in result_rows %} {% endfor %} {% if not result_rows %} {% endif %}
Item CodeProduct NameDirectFrom SetTotal
{{ r.item_code }} {{ r.item_name }} {{ r.direct_qty }} {{ r.from_set_qty }} {{ r.total_qty }}
입력된 수량이 없습니다.
{% if is_draft %}
{% endif %}
{% endblock %}