Files
dbx-main/app/modules/inout/templates/inout/order_detail.html
T
king cfb6878bea feat(입출고): 봉투·백 표에서 단가·무게·은 열 제거
봉투·백에는 단가·무게·은이 없어 표에서 네 열을 뺀다. 전에 넣은 값은
숨은 칸으로 저장 때 그대로 보내 지우지 않는다.
새 발주서·발주서 화면·발주 메일의 단가 미입력 안내에서도 봉투·백을 뺀다.
은 칸이 없는 줄에서 그룹을 바꿔도 색상 표시가 덮이지 않게 고친다.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 15:29:20 +09:00

266 lines
22 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends "erp_base.html" %}
{% from "inout/_macros.html" import status_badge, order_badge, progress, due, n, ymd, ymdhm %}
{#- 메일 창(발주 메일 · 입고 요청 메일 같은 모양) — 열면 미리보기 GET, [메일 발송]을 눌러야 보낸다(inout.js initMail) -#}
{%- macro mail_dialog(id, title, open_url='', open_title='') -%}
<dialog class="io-dlg io-mail-dlg" id="{{ id }}" aria-labelledby="{{ id }}-title" tabindex="-1"
{%- if open_url %} data-open-url="{{ open_url }}" data-open-title="{{ open_title }}"{% endif %}>
<header class="io-dlg-head">
<h2 id="{{ id }}-title" data-mail-title>{{ title }}</h2>
<button type="button" class="io-dlg-x" data-close aria-label="닫기" title="닫기">
<svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M6 6l12 12M18 6L6 18"/></svg>
</button>
</header>
<p class="io-dlg-msg" role="status" hidden></p>
<div class="io-dlg-body" data-mail-body><p class="erp-muted">불러오는 중…</p></div>
<footer class="io-dlg-footbar" data-mail-foot hidden>
<button type="button" class="io-link-btn" data-gmail-disconnect>Gmail 연결 끊기</button>
<span class="io-nav-gap"></span>
<button type="button" class="erp-btn erp-btn-outline" data-close>취소</button>
<button type="button" class="erp-btn erp-btn-primary" data-mail-send>메일 발송</button>
</footer>
</dialog>
{%- endmacro -%}
{% block head_extra %}<link rel="stylesheet" href="/static/inout.css?v=20261104b" />{% endblock %}
{% block content %}
{% set active = order.status in ('open', 'partial') %}
{% set receiving = perms.can_receive and can_receive_now %}
{# 전체 입고 완료(모든 품목 입고완료·초과) — 입고 칸·[입고 저장]을 흐리게 막는다(서버도 거절, 2026-10-19). 입고 기록을 지우면 다시 열림 #}
{% set recv_done = order.status in ('done', 'over') %}
{% set dis = ' disabled' if recv_done else '' %}
{% set photo_admin = perms.can_receive and not order.cancelled_at %}
<div class="io-split">{# 2열 — 왼쪽 화면 | 오른쪽 달력(2026-10-21) #}
<section class="io">
{% include "inout/_nav.html" %}
<div class="erp-card-block io-head">
<div class="io-head-main">
<div class="io-head-title">
<h2>{{ order.order_no }}</h2>{{ order_badge(order.status, order.status_label) }}
</div>
<dl class="io-head-meta">
<div><dt>공장</dt><dd>{{ order.factory_name }}{% if order.factory_manager or order.factory_contact %}<span class="io-factory-who">{{ order.factory_manager }}{% if order.factory_manager and order.factory_contact %} · {% endif %}{{ order.factory_contact }}</span>{% endif %}</dd></div>
<div><dt>발주일</dt><dd>{{ ymd(order.order_date) }}</dd></div>
<div><dt>입고 예정일</dt><dd>{{ due(order.due_date, today, active) }}</dd></div>
<div><dt>진행</dt><dd>{{ progress(order.summary) }}</dd></div>
<div><dt>발주 메일</dt><dd>{% if order.mails %}{% set last = order.mails[-1] %}<span class="io-mail-sent">보냄 {{ ymdhm(last.sent_at) }}</span><span class="io-factory-who">{{ last.sent_by }} → {{ last.to_addrs }}{% if order.mails|length > 1 %} · 모두 {{ order.mails|length }}번{% endif %}</span>{% else %}<span class="erp-muted">아직 안 보냄</span>{% endif %}</dd></div>
{% if order.memo %}<div class="io-wide"><dt>메모</dt><dd>{{ order.memo }}</dd></div>{% endif %}
{% if order.closed_at %}<div class="io-wide"><dt>종결</dt><dd>{{ ymd(order.closed_at) }} · {{ order.closed_by }}{% if order.close_reason %} — {{ order.close_reason }}{% endif %}</dd></div>{% endif %}
{% if order.cancelled_at %}<div class="io-wide"><dt>취소</dt><dd>{{ ymd(order.cancelled_at) }} · {{ order.cancelled_by }}</dd></div>{% endif %}
</dl>
</div>
<div class="io-kpis io-kpis-head">
<div class="erp-summary-card erp-summary-card--mini"><div class="erp-summary-label">발주</div><div class="erp-summary-value">{{ n(order.summary.ordered) }}</div></div>
<div class="erp-summary-card erp-summary-card--mini"><div class="erp-summary-label">입고</div><div class="erp-summary-value">{{ n(order.summary.received) }}</div></div>
<div class="erp-summary-card erp-summary-card--mini{% if order.summary.remaining and active %} io-kpi-remaining{% endif %}"><div class="erp-summary-label">미입고</div><div class="erp-summary-value">{{ n(order.summary.remaining) }}</div></div>
{% if order.summary.over %}<div class="erp-summary-card erp-summary-card--mini io-kpi-over"><div class="erp-summary-label">초과</div><div class="erp-summary-value">+{{ n(order.summary.over) }}</div></div>{% endif %}
</div>
{% if perms.can_order and not order.cancelled_at %}
<div class="io-head-actions">
<button type="button" class="erp-btn erp-btn-primary erp-btn-sm io-mail-btn" id="io-mail-btn" data-order="{{ order.id }}"
{% if open_mail %}data-open="1"{% endif %} aria-haspopup="dialog">
<svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="5" width="18" height="14" rx="2"/><path d="m3 7 9 6 9-6"/></svg>
{% if order.mails %}발주 메일 다시 보내기{% else %}발주 메일 보내기{% endif %}</button>
<a class="erp-btn erp-btn-outline erp-btn-sm" href="/inout/orders/{{ order.id }}/edit">발주서 고치기</a>
{% if order.closed_at %}
<form method="post" action="/inout/orders/{{ order.id }}/reopen"><button class="erp-btn erp-btn-outline erp-btn-sm" type="submit">종결 풀기</button></form>
{% elif order.summary.remaining %}
<form method="post" action="/inout/orders/{{ order.id }}/close" class="io-close-form" data-erp-confirm="남은 미입고 {{ n(order.summary.remaining) }}개를 더 기다리지 않고 종결할까요? 미입고 현황에서 빠집니다.">
<input class="erp-input io-close-reason" type="text" name="reason" maxlength="500" placeholder="종결 사유(선택)" />
<button class="erp-btn erp-btn-outline erp-btn-sm" type="submit">잔량 종결</button>
</form>
{% endif %}
{% if not order.receipts %}
<form method="post" action="/inout/orders/{{ order.id }}/cancel" data-erp-confirm="이 발주서를 취소할까요? (입고 기록이 없을 때만)">
<button class="erp-btn erp-btn-danger erp-btn-sm" type="submit">발주 취소</button>
</form>
{% endif %}
</div>
{% endif %}
</div>
{% if error %}<div class="io-error" role="alert">{% for line in error.split('\n') %}<div>{{ line }}</div>{% endfor %}</div>{% endif %}
<form method="post" action="/inout/orders/{{ order.id }}/receipts" class="erp-card-block io-block" id="io-receipt-form" enctype="multipart/form-data">
{# Enter 키 = 이 버튼(일반 저장). 없으면 폼의 첫 제출 버튼인 [초과 입고로 저장]이 눌려 확인 없이 초과가 저장된다 #}
{% if receiving %}<button type="submit" class="io-default-submit" tabindex="-1" aria-hidden="true"{{ dis }}>입고 저장</button>{% endif %}
<input type="hidden" name="confirm_over" value="" id="io-confirm-over" />
<div class="erp-card-block-head">
<h2>품목</h2>
{% if receiving and recv_done %}<span class="erp-muted io-recv-done-note">✓ 전체 입고 완료 — 더 입고할 수 없습니다(잘못 넣은 입고는 아래 입고 기록에서 지운 뒤 다시 넣으세요)</span>
{% elif receiving %}<span class="erp-muted">물류에 들어온 수량을 [이번 입고]에 넣고 저장 — 여러 번 나눠 넣어도 됩니다</span>
{% elif perms.can_receive and order.closed_at %}<span class="erp-muted">종결된 발주서 — 입고하려면 발주 담당이 종결을 풀어야 합니다</span>{% endif %}
</div>
{% if over %}
<div class="io-over-box" role="alert">
<b>발주보다 많이 입고하려고 합니다.</b> 맞으면 [초과 입고로 저장]을 누르세요.
<ul>{% for o in over %}<li>{% if not items_limited %}<span class="io-code">{{ o.item_code }}</span> {% endif %}{{ o.item_name }} — 발주 {{ n(o.ordered) }}개, 입고 후 {{ n(o.after) }}개 (<b>+{{ n(o.over) }}</b>)</li>{% endfor %}</ul>
{% if photos_lost %}<p class="io-photo-lost">고른 입고증 사진은 다시 첨부해야 합니다(화면이 다시 열리면서 빠졌습니다).</p>{% endif %}
<button type="submit" class="io-btn-over" name="confirm_over" value="1">초과 입고로 저장</button>
<span class="erp-muted">숫자를 고치려면 아래 칸을 고친 뒤 [입고 저장]</span>
</div>
{% elif photos_lost %}
<p class="io-error">고른 입고증 사진은 다시 첨부해야 합니다(화면이 다시 열리면서 빠졌습니다).</p>
{% endif %}
<div class="erp-table-wrap">
<table class="erp-table io-table io-items-table">
{# 입고 담당(발주 담당 아님) = 제품 이름·발주 수량(+ 이번 입고)만, 발주 담당 = 단가·금액·PP·은 함께 #}
<thead><tr><th class="io-col-no">#</th>{% if not items_limited %}<th>제품 코드</th>{% endif %}<th>제품</th><th class="io-num">발주</th>
{% if show_prices %}<th class="io-num io-col-money">단가(원)</th><th class="io-num io-col-money">금액(원)</th><th class="io-num io-col-spec" title="발주 수량 전체 PP 사용량 = 전체 무게 − 은 무게(아래 작은 글씨 = 개당 무게)">PP 사용량</th><th class="io-num io-col-spec" title="발주 수량 전체 은 무게(아래 작은 글씨 = 함유량 %·개당 은)">은(Ag) 함유량</th>{% endif %}
{% if not items_limited %}<th class="io-num">입고</th><th class="io-num">미입고</th><th>상태</th>{% endif %}
{% if receiving %}<th class="io-col-recv">이번 입고</th>{% endif %}</tr></thead>
<tbody>
{% for ln in order.lines %}
<tr>
<td class="io-col-no">{{ loop.index }}</td>
{% if not items_limited %}<td class="io-code">{{ ln.item_code }}</td>{% endif %}
<td>{{ ln.item_name }}{% if ln.memo %}<div class="erp-row-sub">{{ ln.memo }}</div>{% endif %}</td>
<td class="io-num">{{ n(ln.qty) }}</td>
{% if show_prices %}
{% set amt = line_amount(ln.qty, ln.unit_price) %}{% set ag = silver_g(ln.weight_g, ln.silver_pct) %}{% set use = line_usage(ln) %}
<td class="io-num io-col-money">{{ fmt_num(ln.unit_price) if ln.unit_price is not none else '-' }}</td>
<td class="io-num io-col-money">{{ fmt_num(amt) if amt is not none else '-' }}</td>
{# 발주 수량 전체 사용량(2026-10-21) — PP 사용량·은 함유량 kg(메일 표와 같은 값), 아래 작은 글씨 = 개당 값 #}
<td class="io-num io-col-spec">{% if use.pp_use_kg is not none %}{{ fmt_num(use.pp_use_kg, 3) }}kg{% else %}-{% endif %}{% if ln.weight_g is not none %}<div class="erp-row-sub">{{ fmt_num(ln.weight_g) }}g/개</div>{% endif %}</td>
<td class="io-num io-col-spec">{% if use.ag_kg is not none %}{{ fmt_num(use.ag_kg, 3) }}kg{% else %}-{% endif %}{% if ln.silver_pct is not none %}<div class="erp-row-sub">{{ fmt_num(ln.silver_pct, 4) }}%{% if ag is not none %} · {{ fmt_num(ag, 4) }}g/개{% endif %}</div>{% endif %}</td>
{% endif %}
{% if not items_limited %}
<td class="io-num">{{ n(ln.received) }}</td>
<td class="io-num{% if ln.remaining and active %} io-remaining{% endif %}">{{ n(ln.remaining) }}{% if ln.over %}<div class="io-over-sub">초과 +{{ n(ln.over) }}</div>{% endif %}</td>
<td>{{ status_badge(ln.status, ln.status_label) }}</td>
{% endif %}
{% if receiving %}<td class="io-col-recv"><input class="erp-input io-qty io-recv" type="text" inputmode="numeric" name="qty_{{ ln.id }}"
value="{{ receipt_form.qty.get(ln.id, '') }}" data-remaining="{{ ln.remaining }}" data-ordered="{{ ln.qty }}" data-received="{{ ln.received }}"
data-code="{{ ln.item_code }}" data-name="{{ ln.item_name }}" placeholder="{{ ln.remaining if ln.remaining and not items_limited else '' }}"
aria-label="{{ ln.item_name }} 이번 입고 수량"{{ dis }} /></td>{% endif %}
</tr>
{% endfor %}
</tbody>
{% if show_prices and order.lines %}
<tfoot><tr class="io-total-row">
<td colspan="3" class="io-total-label">합계</td>
<td class="io-num">{{ n(order.summary.ordered) }}</td>
<td class="io-num io-col-money"></td>
<td class="io-num io-col-money"><b>{{ fmt_num(totals.amount) ~ ' 원' if totals.amount is not none else '-' }}</b>{% if totals.missing_price %}<div class="erp-row-sub">단가 미입력 {{ totals.missing_price }}종 제외</div>{% endif %}</td>
{# 합계 무게 = 소수 첫째 자리에서 반올림(정수 kg) #}
<td class="io-num io-col-spec">{% if totals.pp_use_kg is not none %}{{ fmt_num(totals.pp_use_kg, 0) }} kg{% else %}-{% endif %}</td>
<td class="io-num io-col-spec">{% if totals.silver_g is not none %}{{ fmt_num(totals.silver_g / 1000, 0) }} kg{% else %}-{% endif %}</td>
{% if not items_limited %}<td colspan="3"></td>{% endif %}
{% if receiving %}<td></td>{% endif %}
</tr></tfoot>
{% endif %}
</table>
</div>
{% if receiving %}
<div class="io-receipt-bar{% if recv_done %} is-locked{% endif %}"{% if recv_done %} aria-disabled="true" title="전체 입고 완료 — 더 입고할 수 없습니다"{% endif %}>
<label class="erp-field"><span>입고일 *</span><input type="date" name="receipt_date" value="{{ receipt_form.receipt_date }}" required{{ dis }} /></label>
<label class="erp-field io-grow"><span>메모</span><input type="text" name="memo" value="{{ receipt_form.memo }}" maxlength="500" placeholder="차량·박스 수·검수 메모 등"{{ dis }} /></label>
<div class="erp-field io-photo-field">
<span>입고증 사진 <small>(최대 {{ max_photos }}장)</small></span>
<label class="io-photo-pick">
<input type="file" name="photos" accept="image/*" multiple id="io-photo-input" class="io-photo-input" data-max="{{ max_photos }}"{{ dis }} />
<svg class="io-photo-pick-icon" viewBox="0 0 24 24" width="28" height="28" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 8h3l2-3h6l2 3h3v11H4z"/><circle cx="12" cy="13" r="3.5"/></svg>
입고증 업로드
</label>
</div>
<button type="button" class="erp-btn erp-btn-outline" id="io-fill-remaining"{{ dis }}>남은 수량 모두 채우기</button>
<button type="submit" class="erp-btn erp-btn-primary io-recv-save"{{ dis }}>입고 저장 <span id="io-recv-total"></span></button>
<div class="io-photo-previews" id="io-photo-previews" aria-live="polite"></div>
</div>
{% endif %}
</form>
<div class="erp-card-block io-block">
<div class="erp-card-block-head"><h2>입고 기록</h2><span class="erp-muted">{{ order.receipts|length }}회</span></div>
{% if order.receipts %}
<div class="erp-table-wrap">
<table class="erp-table io-table">
<thead><tr><th>입고일</th><th>품목별 수량</th><th class="io-num">합계</th><th>입고증</th><th>입력</th><th>입고 요청 메일 · 사방넷</th>{% if photo_admin %}<th></th>{% endif %}</tr></thead>
<tbody>
{% for r in order.receipts %}
<tr>
<td>{{ ymd(r.receipt_date) }}{% if r.memo %}<div class="erp-row-sub">{{ r.memo }}</div>{% endif %}</td>
<td>{% for x in r.lines %}<span class="io-chip">{% if items_limited %}{{ x.item_name }}{% else %}<span class="io-code">{{ x.item_code }}</span>{% endif %} {{ n(x.qty) }}</span>{% endfor %}</td>
<td class="io-num">{{ n(r.total) }}</td>
<td class="io-photos-cell">
{% for ph in r.photos %}
<button type="button" class="io-thumb" data-photo="{{ ph.id }}" data-receipt="{{ r.id }}" data-type="{{ ph.content_type }}"
data-name="{{ ph.filename }}" title="{{ ph.filename }} — 크게 보기" aria-label="입고증 사진 크게 보기 {{ loop.index }}">
{% if ph.content_type == 'image/heic' %}<span class="io-thumb-heic">HEIC</span>{% else %}<img src="/inout/photos/{{ ph.id }}" alt="" loading="lazy" />{% endif %}
</button>
{% endfor %}
{% if photo_admin and r.photos|length < max_photos %}
<form method="post" action="/inout/orders/{{ order.id }}/receipts/{{ r.id }}/photos" enctype="multipart/form-data" class="io-add-photo-form">
<label class="io-thumb io-thumb-add" title="입고증 사진 더하기">
<input type="file" name="photos" accept="image/*" multiple class="io-photo-input io-photo-auto" data-max="{{ max_photos - r.photos|length }}" aria-label="입고증 사진 더하기" />
<span aria-hidden="true">+</span>
</label>
</form>
{% elif not r.photos %}<span class="erp-muted">-</span>{% endif %}
</td>
<td class="erp-muted">{{ r.created_by }}<div class="erp-row-sub">{{ ymdhm(r.created_at) }}</div></td>
<td class="io-rmail-cell">
{% if r.mails %}{% set lm = r.mails[-1] %}<span class="io-mail-sent">보냄 {{ ymdhm(lm.sent_at) }}</span>
<div class="erp-row-sub">{{ lm.sent_by }}{% if r.mails|length > 1 %} · 모두 {{ r.mails|length }}번{% endif %}</div>{% endif %}
{% if perms.can_receive %}<button type="button" class="erp-btn erp-btn-outline erp-btn-sm io-rmail-btn" aria-haspopup="dialog"
data-url="/inout/orders/{{ order.id }}/receipts/{{ r.id }}/mail" data-title="입고 요청 메일 · {{ ymd(r.receipt_date) }} 입고 {{ n(r.total) }}개">
{% if r.mails %}다시 보내기{% else %}보내기{% endif %}</button>
{% elif not r.mails %}<span class="erp-muted">-</span>{% endif %}
{% if perms.can_order or perms.can_receive %}
<a class="erp-btn erp-btn-outline erp-btn-sm io-sabang-btn" href="/inout/orders/{{ order.id }}/receipts/{{ r.id }}/sabangnet.xlsx"
title="사방넷 입고 엑셀 — 상품코드(사방넷 코드)·가용수량(입고 수량)·불용수량(상품 이름)" download>사방넷 입고 파일</a>
{% endif %}
</td>
{% if photo_admin %}
<td><form method="post" action="/inout/orders/{{ order.id }}/receipts/{{ r.id }}/delete"
data-erp-confirm="{{ ymd(r.receipt_date) }} 입고 {{ n(r.total) }}개 기록을 지울까요? 그만큼 다시 미입고가 되고 입고증 사진도 지워집니다.">
<button type="submit" class="erp-btn erp-btn-outline erp-btn-sm">지우기</button></form></td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% else %}
<p class="erp-empty">아직 입고된 것이 없습니다.</p>
{% endif %}
</div>
{# 입고증 사진 크게 보기 — 앞뒤 넘기기(←/→), 원본 열기, 지우기(입고 담당) #}
<dialog class="io-viewer" id="io-viewer" tabindex="-1" aria-label="입고증 사진" data-order="{{ order.id }}" data-can-delete="{{ '1' if photo_admin else '' }}">
<div class="io-viewer-bar">
<span class="io-viewer-title" id="io-viewer-title"></span>
{% if photo_admin %}
<button type="button" class="io-viewer-btn io-viewer-rot" data-rotate="270" title="왼쪽으로 돌리기" aria-label="왼쪽으로 돌리기"><svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 4v6h6"/><path d="M3.5 15a9 9 0 1 0 2.1-9.4L3 10"/></svg></button>
<button type="button" class="io-viewer-btn io-viewer-rot" data-rotate="90" title="오른쪽으로 돌리기" aria-label="오른쪽으로 돌리기"><svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 4v6h-6"/><path d="M20.5 15a9 9 0 1 1-2.1-9.4L21 10"/></svg></button>
{% endif %}
<a class="io-viewer-btn" id="io-viewer-open" href="#" target="_blank" rel="noopener">원본</a>
{% if photo_admin %}<form method="post" id="io-viewer-del" data-erp-confirm="이 입고증 사진을 지울까요?"><button type="submit" class="io-viewer-btn">지우기</button></form>{% endif %}
<button type="button" class="io-viewer-btn" data-close aria-label="닫기">✕</button>
</div>
<button type="button" class="io-viewer-nav is-prev" data-step="-1" aria-label="이전 사진">‹</button>
<img class="io-viewer-img" id="io-viewer-img" alt="입고증 사진" />
<p class="io-viewer-heic" id="io-viewer-heic" hidden>HEIC 사진은 이 브라우저에서 미리 볼 수 없습니다 — [원본]으로 내려받으세요.</p>
<button type="button" class="io-viewer-nav is-next" data-step="1" aria-label="다음 사진">›</button>
</dialog>
{% if perms.can_order and not order.cancelled_at %}
{# 발주 메일 — 열면 GET /inout/orders/{id}/mail 로 미리보기, [메일 발송]을 눌러야 보낸다(발주 담당 본인 Gmail) #}
{{ mail_dialog('io-mail', '발주 메일 보내기 · ' ~ order.order_no) }}
{% endif %}
{% if perms.can_receive and order.receipts %}
{# 입고 요청 메일(005) — 물류센터 입고 담당자에게 전산 등록 부탁(입고 담당 본인 Gmail). 입고 저장 뒤 ?rmail={입고 id} 면 바로 연다 #}
{% set open_r = order.receipts | selectattr('id', 'equalto', open_rmail) | list if open_rmail else [] %}
{% if open_r %}
{{ mail_dialog('io-rmail', '입고 요청 메일', '/inout/orders/' ~ order.id ~ '/receipts/' ~ open_r[0].id ~ '/mail',
'입고 요청 메일 · ' ~ ymd(open_r[0].receipt_date) ~ ' 입고 ' ~ n(open_r[0].total) ~ '개') }}
{% else %}{{ mail_dialog('io-rmail', '입고 요청 메일') }}{% endif %}
{% endif %}
</section>
{% include "inout/_calendar.html" %}
</div>
{% endblock %}
{% block scripts %}<script src="/static/inout.js?v=20261104b" defer></script>{% endblock %}