feat(cupang): shipment box list shows weights in kg with a totals row
Box weights on the shipment detail screen are now shown in kg, rounded half-up to one decimal. A footer row sums quantity and weight (marks "일부 미입력" when some product weights are missing). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -167,3 +167,14 @@ def test_box_list_workbook_weight_column():
|
||||
assert ws.cell(row=6, column=5).value is None
|
||||
ws2 = build_box_list_workbook({"ship_date": "2026-10-02"}, _boxes()).active # 예전처럼 4열
|
||||
assert ws2.cell(row=2, column=5).value is None and ws2.cell(row=2, column=4).value == "수량"
|
||||
|
||||
|
||||
def test_g_to_kg_rounds_half_up_to_one_decimal():
|
||||
"""출고 상세 상자 목록 무게(kg) — 소수 둘째 자리에서 반올림해 첫째 자리까지."""
|
||||
from app.modules.cupang.router import _g_to_kg
|
||||
|
||||
assert _g_to_kg(3000) == "3.0"
|
||||
assert _g_to_kg(1250) == "1.3" # 1.25 → 1.3 (사사오입)
|
||||
assert _g_to_kg(1249) == "1.2"
|
||||
assert _g_to_kg(1234567) == "1,234.6"
|
||||
assert _g_to_kg(None) is None
|
||||
|
||||
Reference in New Issue
Block a user