feat(입출고): 대성화학·인천공장 발주 메일 표를 간단하게
공장 이름에 대성화학·인천공장이 들어가면 품목 표를 번호·제품 코드· 제품명·수량·박스당 수량·박스 수·비고로 만들고, 요약 표와 글 본문에서도 금액·무게·PP·은을 뺀다. 박스 값은 메일을 만들 때의 상품 정보로 계산한다. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -709,6 +709,10 @@ def _mail_order(request: Request, order_id: int) -> tuple[Any, dict[str, Any], d
|
||||
order = _order_or_404(st, order_id)
|
||||
if order["cancelled_at"]:
|
||||
raise HTTPException(status_code=400, detail="취소된 발주서는 메일로 보낼 수 없습니다.")
|
||||
if store.is_simple_mail_factory(order["factory_name"]) and st.boxes_ready(): # 박스 칸 — 발주 품목에 없어 지금 상품 정보 값
|
||||
found = st.catalog_lookup([x["item_code"] for x in order["lines"]])
|
||||
for x in order["lines"]:
|
||||
x.update(store.box_info(found.get(x["item_code"]) or {}))
|
||||
return st, user, order
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user