feat(malaysia): 재고관리 메인 화면에도 자동 비교 엑셀 버튼 노출

가장 최근 확정 재고조사 기준 export-compare 링크를 재고 현황 카드 헤더에 추가.
재고조사 상세 페이지까지 안 들어가도 메인 탭에서 바로 다운로드 가능.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-20 21:21:29 +09:00
parent 0f00529761
commit 8763b0d19f
2 changed files with 8 additions and 1 deletions
+3
View File
@@ -169,6 +169,9 @@ async def index(request: Request) -> HTMLResponse:
"rows": rows,
"set_rows": set_stock["rows"],
"set_stocktake_date": set_stock["stocktake_date"],
"latest_stocktake_id": latest["id"] if latest else None,
"latest_stocktake_date": last_date,
"latest_stocktake_finalized": bool(latest and latest.get("status") == "finalized"),
}
)
return render_template(request, "malaysia/index.html", ctx)
@@ -24,9 +24,13 @@
<!-- 좌: 낱개로 분리된 전체 재고 -->
<div class="erp-card">
<div class="cpg-card-head" style="display:flex;justify-content:space-between;align-items:center;">
<div class="cpg-card-head" style="display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;">
<h2><span class="i18n">전산 재고 현황 — 낱개 기준</span> ({{ rows|length }})</h2>
<span class="erp-muted">현재고 = 입고 − 출고 + 조정 + 재고조사반영 (콤보는 낱개로 분해 반영됨)</span>
{% if latest_stocktake_finalized %}
<a class="erp-btn erp-btn-outline" href="/malaysia/stocktakes/{{ latest_stocktake_id }}/export-compare"
title="최근 확정 재고조사 마감재고 + 이후 일자별 변동 = 오늘 전산재고 자동 비교 엑셀">자동 비교 엑셀 다운로드 ({{ latest_stocktake_date }})</a>
{% endif %}
</div>
<div class="erp-table-wrap">
<table class="erp-table">