fix(performance): 카페24 매출 대조 채널 표를 market_id × 주문경로로 — self 를 "PC"로 잘못 표시하던 문제

실데이터 확인: market_id "self" 는 PC 전용이 아니라 자체몰 전체이고, 그 안에 주문경로 "PC쇼핑몰"·"모바일웹"이
섞여 있다. 구분을 "자체몰"로 고치고, (market_id, 주문경로) 한 쌍을 한 줄로 나눠 표시.
환불도 원 주문의 주문경로로 같은 줄에 붙인다.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-29 17:11:27 +09:00
parent ef12a34600
commit fb7c29833e
5 changed files with 29 additions and 16 deletions
+4 -2
View File
@@ -529,7 +529,8 @@
const col = MARKET_NAMES[b.target] || b.target;
const kind = b.kind === "self" ? "자체몰 채널" + (b.label ? "(" + b.label + ")" : "")
: b.kind === "market" ? "외부 마켓" : '<span class="perf-err" style="display:inline">알 수 없는 채널</span>';
return '<tr><td class="perf-td-label">' + esc(b.market_id) + "</td><td>" + esc((b.names || []).join(", ")) +
return '<tr><td class="perf-td-label">' + esc(b.market_id) + "</td><td>" + esc(b.place || "–") +
(b.place_id && b.place_id !== b.place ? ' <span class="perf-muted">' + esc(b.place_id) + "</span>" : "") +
"</td><td>" + (b.kind === "unknown" ? kind : esc(kind)) + "</td><td>" + esc(col) +
'</td><td class="perf-num">' + fmt(b.orders) + '</td><td class="perf-num">' + won(b.total) +
'</td><td class="perf-num">' + dev(b.pc_orders, b.pc_total) + '</td><td class="perf-num">' + dev(b.mobile_orders, b.mobile_total) +
@@ -547,7 +548,8 @@
'</td><td class="perf-num">' + dev(t.mo, t.mt) + '</td><td class="perf-num">' + won(-t.ra) +
'</td><td class="perf-num">' + won(t.t - t.ra) + "</td></tr></tfoot>";
})() + "</table>" +
'<p class="perf-foot perf-muted">PC/모바일은 주문의 모바일 주문 여부(order_from_mobile) 기준입니다 — 채널이 PC(self)여도 휴대폰에서 주문하면 모바일로 셉니다.</p>'
'<p class="perf-foot perf-muted">한 줄 = market_id × 주문경로. market_id "self"는 PC 전용이 아니라 자체몰 전체이며, 그 안에 PC쇼핑몰·모바일웹 경로가 섞여 있습니다. ' +
'PC/모바일 주문은 카페24가 주문마다 주는 모바일 주문 여부(order_from_mobile) 기준입니다.</p>'
: "") +
((r.by_payment || []).length
? '<h4 class="perf-h" style="margin:14px 0 6px">결제수단별 (카페24 열)</h4>' +