feat(performance): 카페24 매출 대조에 다른 마켓 연동 주문을 마켓별(market_id·주문경로)로 표시

9/28 대조 결과 자체몰 + 다른 마켓 연동 합계가 카페24 일별 매출내역과 모든 줄에서 일치(공식 확인).
어느 마켓 주문인지 확인할 수 있게 market_id 별 주문수·결제합계·환불·순매출 표를 추가.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-29 16:46:28 +09:00
parent 27ee92c0a6
commit 4cb37688ed
5 changed files with 34 additions and 3 deletions
+10
View File
@@ -517,6 +517,16 @@
return "<tr" + cls + '><th class="perf-td-label' + (x[3] === "sub" ? " perf-muted" : "") + '">' + esc(x[0]) +
'</th><td class="perf-num">' + f(x[1]) + '</td><td class="perf-num">' + f(x[2]) + "</td></tr>";
}).join("") + "</tbody></table>" +
((r.by_market || []).length
? '<h4 class="perf-h" style="margin:14px 0 6px">다른 마켓 연동 주문 — 마켓별</h4>' +
'<table class="perf-table"><thead><tr><th class="perf-th-label">market_id</th><th class="perf-th-label">주문경로</th>' +
"<th>주문수</th><th>결제합계</th><th>환불</th><th>순매출</th></tr></thead><tbody>" +
r.by_market.map(function (b) {
return '<tr><td class="perf-td-label">' + esc(b.market_id) + "</td><td>" + esc((b.names || []).join(", ")) +
'</td><td class="perf-num">' + fmt(b.orders) + '</td><td class="perf-num">' + won(b.total) +
'</td><td class="perf-num">' + won(-b.refund_amount) + '</td><td class="perf-num">' + won(b.total - b.refund_amount) + "</td></tr>";
}).join("") + "</tbody></table>"
: "") +
'<p class="perf-foot perf-muted">' + esc(r.formula) + ". 미결제 주문 " + fmt(r.unpaid_orders) +
"건 제외. 카페24 화면과 다른 줄이 있으면 알려 주세요 — 규칙을 맞추겠습니다.</p>";
} catch (err) {