fix(cupang): 순번 없는 매출 행이 누락되던 문제 — 시트 데이터 22건 추가
- 시트 마지막 부분(2026-09 등)에 순번(B열)이 비어 있는 발주 라인이 있어 파서가 건너뛰었다. 판정 기준을 "발주번호가 숫자 + SKU/품목 존재"로 변경 - seed 재생성: 2,218 → 2,240행. 2026년 9월계(1,447개 / 11,035,564원)가 시트와 정확히 일치 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -74,10 +74,17 @@ def parse_rows(rows: list[list[Any]]) -> dict[str, Any]:
|
||||
seq = _cell(row, "seq")
|
||||
po_no = _cell(row, "po_no")
|
||||
|
||||
if seq.replace(".0", "").isdigit() and po_no and po_no not in BAD:
|
||||
# 데이터 행 판정 — 순번이 비어 있는 행도 시트에 있으므로 발주번호+품목으로 본다.
|
||||
sku = _cell(row, "sku_id")
|
||||
item = _cell(row, "item_name")
|
||||
po_is_num = po_no.replace(".0", "").replace("-", "").isdigit()
|
||||
if po_no not in BAD and po_is_num and (sku not in BAD or item not in BAD):
|
||||
if week:
|
||||
week_label = week
|
||||
line = {"week_label": week_label, "seq": seq.replace(".0", "")}
|
||||
line = {
|
||||
"week_label": week_label,
|
||||
"seq": seq.replace(".0", "") if seq.replace(".0", "").isdigit() else "",
|
||||
}
|
||||
for field in (
|
||||
"po_no", "po_type", "order_date", "ship_date", "center_arrival_date",
|
||||
"sku_id", "barcode", "item_name", "quantity", "center_name",
|
||||
|
||||
Reference in New Issue
Block a user