feat(입출고): 봉투·백 표에서 단가·무게·은 열 제거
봉투·백에는 단가·무게·은이 없어 표에서 네 열을 뺀다. 전에 넣은 값은 숨은 칸으로 저장 때 그대로 보내 지우지 않는다. 새 발주서·발주서 화면·발주 메일의 단가 미입력 안내에서도 봉투·백을 뺀다. 은 칸이 없는 줄에서 그룹을 바꿔도 색상 표시가 덮이지 않게 고친다. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -547,7 +547,8 @@ def order_totals(lines: list[dict[str, Any]]) -> dict[str, Any]:
|
||||
q = int(x["qty"])
|
||||
a = line_amount(q, x.get("unit_price"))
|
||||
if a is None:
|
||||
missing += 1
|
||||
if not is_bag(x.get("item_name")): # 봉투·백은 단가가 원래 없음 — "단가 미입력" 안내에서 뺀다
|
||||
missing += 1
|
||||
else:
|
||||
amount = (amount or Decimal(0)) + a
|
||||
w = to_dec(x.get("weight_g"))
|
||||
@@ -557,7 +558,7 @@ def order_totals(lines: list[dict[str, Any]]) -> dict[str, Any]:
|
||||
if w is not None and p is not None: # 개당 은 g 를 반올림하기 전 값으로 곱한다(합계 오차 방지)
|
||||
ag = (ag or Decimal(0)) + w * p / Decimal(100) * q
|
||||
use = (use or Decimal(0)) + w * q * (Decimal(100) - p) / Decimal(100000)
|
||||
return {"amount": amount, "missing_price": missing if amount is not None else len(lines), "pp_kg": pp, "silver_g": ag,
|
||||
return {"amount": amount, "missing_price": missing, "pp_kg": pp, "silver_g": ag,
|
||||
"pp_use_kg": use}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user