{% extends "erp_base.html" %} {% block head_extra %}{% endblock %} {% block content %}
{# 2열 — 왼쪽 화면 | 오른쪽 달력(2026-10-21) #}
{% include "inout/_nav.html" %}

{% if order %}발주서 고치기 · {{ order.order_no }}{% else %}새 발주서{% endif %}

{% if from_catalog %}제품은 옵션 → 상품 정보의 단품에서 고릅니다(단가 함께){% else %}제품은 코드표의 단품에서 고릅니다{% endif %}
{% if error %}{% endif %} {% if not items_enabled %}{% endif %}
{% if boxes_ready %}{% endif %} {% for ln in lines %} {% set received = (order.lines | selectattr('item_code', 'equalto', ln.code) | map(attribute='received') | first) if order else 0 %} {% if boxes_ready %}{% endif %} {% endfor %}
#제품(코드·이름으로 검색)발주 수량단가(원)금액(원)통·뚜껑 박스줄 메모
{% if received %}
입고 {{ '{:,}'.format(received) }}개 — 제품은 그대로, 수량만 바꿀 수 있습니다
{% endif %}
{% if boxes_ready %}{% endif %} {{ ln.price_label or '-' }} -- {% if not received %}{% endif %}
합계 0개 · 0종 · 금액 0원 {% if boxes_ready %} {# 박스·파렛트(2026-10-21) — 통·뚜껑 박스 수 합계 → 전체 파렛트(1파렛트 = {{ pallet_boxes }}박스, 올림). 화면 계산만(저장·메일 없음) #}
통 0박스뚜껑 0박스전체 0박스 → 0파렛트 {# 파렛트 그림 — 꽉 찬 파렛트 + 잔량 파렛트(실린 박스만큼 색, %·몇 박스 더) #} 1파렛트 = {{ pallet_boxes }}박스
{# 봉투·백(008) — 상품마다 1파렛트 박스 수가 달라 통·뚜껑 파렛트와 따로 셈 #} {% endif %}
취소
{% include "inout/_calendar.html" %}
{% endblock %} {% block scripts %}{% endblock %}