feat(performance): 카페24 매출 대조 — 금액이 줄어든 주문 건별 + 주문취소일 조회
결제일 기준 후보도 카페24 환불합계와 맞지 않음(9/26, 9/27). 9/26 결제 주문의 (결제 당시 − 현재) 205,200 중 환불 기록은 148,320 뿐이라, 환불 API 에 안 잡히는 취소(네이버페이 등)를 찾기 위해 줄어든 주문을 건별로(채널·결제수단·품목 상태· 네이버페이 클레임·취소일·환불 기록) 표시. 클레임 조회에 cancel_date 추가. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -566,6 +566,21 @@
|
||||
'</td><td class="perf-num">' + won(x.used_points + x.used_credits) + "</td><td>" + esc((x.methods || []).join(", ") || "–") + "</td></tr>";
|
||||
}).join("") + "</tbody></table>"
|
||||
: "") +
|
||||
((r.reduced_orders || []).length
|
||||
? '<h4 class="perf-h" style="margin:14px 0 6px">그날 결제한 주문 중 금액이 줄어든 주문 (취소·반품) — "환불 기록 없음"이 환불 API 에 안 잡힌 건</h4>' +
|
||||
'<table class="perf-table"><thead><tr><th class="perf-th-label">주문번호</th><th class="perf-th-label">채널</th>' +
|
||||
'<th class="perf-th-label">결제수단</th><th class="perf-th-label">품목 상태</th><th class="perf-th-label">취소·환불일</th>' +
|
||||
"<th>결제 당시</th><th>현재</th><th>줄어든 금액</th><th>환불 기록</th></tr></thead><tbody>" +
|
||||
r.reduced_orders.map(function (x) {
|
||||
const miss = x.diff - x.refunded;
|
||||
return "<tr" + (miss > 0 ? ' class="perf-row-match"' : "") + '><td class="perf-td-label">' + esc(x.order_id) + "</td><td>" +
|
||||
esc(x.channel || "–") + "</td><td>" + esc(x.payment || "–") + "</td><td>" +
|
||||
esc(x.statuses.join(", ") + (x.naver_pay.length ? " / 네이버페이 " + x.naver_pay.join(",") : "")) + "</td><td>" +
|
||||
esc(x.claim_dates.join(", ") || "–") + '</td><td class="perf-num">' + won(x.initial) + '</td><td class="perf-num">' +
|
||||
won(x.now) + '</td><td class="perf-num">' + won(x.diff) + '</td><td class="perf-num">' +
|
||||
(x.refunded ? won(x.refunded) + ' <span class="perf-muted">' + esc(x.refund_dates.join(", ")) + "</span>" : "<b>없음</b>") + "</td></tr>";
|
||||
}).join("") + "</tbody></table>"
|
||||
: "") +
|
||||
(r.claims
|
||||
? '<h4 class="perf-h" style="margin:14px 0 6px">그날 취소·반품·교환 완료 품목 (주문 API)</h4>' +
|
||||
((r.claims.errors || []).length ? '<p class="perf-notice is-warn">' + esc(r.claims.errors.join(" / ")) + "</p>" : "") +
|
||||
|
||||
Reference in New Issue
Block a user