feat(malaysia): 재고현황 조사수량·차이 표기, 확정 관리자 제한, 슈퍼관리자 조사삭제

- 재고현황 헤더 "전산 재고 현황", Last Stocktake 옆 조사수량+차이(±) 표기
  (차이 = 마지막 재고조사 낱개 total − 전산재고)
- 재고조사 확정(전산 반영)은 관리자(is_admin)만 가능, 비관리자 안내
- 슈퍼관리자만 재고조사 완전 삭제(목록/상세 버튼 + /delete 라우트)
- "◀◀ 조사 목록" 버튼 검정 바탕(primary)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-11 16:38:38 +09:00
parent 3d85ccf43e
commit c07d3301e4
5 changed files with 102 additions and 16 deletions
@@ -19,13 +19,19 @@
<!-- 좌: 낱개로 분리된 전체 재고 -->
<div class="erp-card">
<div class="cpg-card-head" style="display:flex;justify-content:space-between;align-items:center;">
<h2>재고 현황 — 낱개 기준 ({{ rows|length }})</h2>
<h2>전산 재고 현황 — 낱개 기준 ({{ rows|length }})</h2>
<span class="erp-muted">현재고 = 입고 − 출고 + 조정 + 재고조사반영 (콤보는 낱개로 분해 반영됨)</span>
</div>
<div class="erp-table-wrap">
<table class="erp-table">
<thead>
<tr><th class="ccol">Item Code</th><th>Product Name</th><th style="text-align:right">Current Qty</th><th>Last Stocktake</th></tr>
<tr>
<th class="ccol">Item Code</th><th>Product Name</th>
<th style="text-align:right">전산재고</th>
<th>Last Stocktake</th>
<th style="text-align:right">조사수량</th>
<th style="text-align:right">차이</th>
</tr>
</thead>
<tbody>
{% for r in rows %}
@@ -34,10 +40,14 @@
<td class="nm">{{ r.item_name }}</td>
<td style="text-align:right;font-weight:600;">{{ r.current_qty }}</td>
<td>{{ r.last_stocktake_date or '—' }}</td>
<td style="text-align:right">{{ r.last_qty if r.last_qty is not none else '—' }}</td>
<td style="text-align:right;font-weight:600;{% if r.diff %}color:#b91c1c;{% endif %}">
{% if r.diff is not none %}{{ '%+d'|format(r.diff) }}{% else %}—{% endif %}
</td>
</tr>
{% endfor %}
{% if not rows %}
<tr><td colspan="4" class="erp-muted">표시할 재고가 없습니다.</td></tr>
<tr><td colspan="6" class="erp-muted">표시할 재고가 없습니다.</td></tr>
{% endif %}
</tbody>
</table>