fix(malaysia): 랙보기를 '최근 저장' 재고조사 기준으로

기존 랙보기는 latest_stocktake(조사 날짜 DESC) 기준이라, 방금 저장한
조사라도 날짜가 더 늦은 다른 조사가 있으면 안 보였다. 랙을 마지막으로
저장한 조사를 보여주도록 latest_rack_stocktake 추가 — daily_stocktake_rack
.created_at MAX 기준(replace_rack 이 매 저장마다 delete+insert 하므로
랙 저장 시각과 일치). 재고현황 index 의 날짜 기준 latest_stocktake 는 유지.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-15 14:49:30 +09:00
parent b970542482
commit c91059b415
2 changed files with 21 additions and 1 deletions
+2 -1
View File
@@ -187,7 +187,8 @@ async def rack_view(request: Request) -> HTMLResponse:
return guard
st, user = guard
wh = _selected_wh(request, st)
latest = st.latest_stocktake(warehouse_code=wh)
# 랙보기는 '랙을 가장 최근에 저장한' 조사 기준(조사 날짜 아님).
latest = st.latest_rack_stocktake(warehouse_code=wh)
rack_by_cell: dict[str, list[dict[str, Any]]] = {}
names = st.item_name_map()
if latest: