fix(performance): 네이버 매출 = 판매분석 "판매금액(총)" — 결제 뒤 취소·반품 포함, 배송비 제외

- 9/1 판매분석 매출 4,455,600원(판매금액(총)): 할인 뒤 금액, 배송비 별도, 환불은 환불일에 따로 빠짐
- 처음 규칙(취소·반품 빼고 배송비 더함)은 4,245,300원으로 달랐음
- 입금대기·미입금 취소만 제외, 결제 뒤 취소·반품도 결제일 매출에 포함
- 원본 데이터 확인 표에 결제 뒤 취소·반품분·배송비(참고) 열 추가
- performance.js 캐시 버전 20260930x, 테스트·문서 갱신

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-30 13:46:57 +09:00
parent a5f90a0343
commit 077c92fa32
6 changed files with 59 additions and 41 deletions
+8 -5
View File
@@ -861,13 +861,16 @@
// 날짜별 현재 규칙 매출(네이버) — 쇼핑몰 관리자 화면 매출과 나란히 비교
const days = (r.days || []).length ? '<h4 class="perf-h" style="margin:14px 0 6px">날짜별 현재 규칙 매출</h4>' +
(r.rule ? '<p class="perf-muted">규칙: ' + esc(r.rule) + "</p>" : "") +
'<table class="perf-table"><thead><tr><th class="perf-th-label">결제일</th><th>주문 수</th><th>매출</th></tr></thead><tbody>' +
'<table class="perf-table"><thead><tr><th class="perf-th-label">결제일</th><th>주문 수</th><th>매출</th>' +
"<th>그중 결제 뒤 취소·반품(참고)</th><th>배송비(참고, 매출 제외)</th></tr></thead><tbody>" +
r.days.map(function (d) {
return '<tr><td class="perf-td-label">' + esc(d.date) + '</td><td class="perf-num">' + fmt(d.orders) +
'</td><td class="perf-num">' + fmt(d.amount) + "</td></tr>";
}).join("") + '<tr><td class="perf-td-label"><b>합계</b></td><td class="perf-num"><b>' +
fmt(r.days.reduce(function (a, d) { return a + d.orders; }, 0)) + '</b></td><td class="perf-num"><b>' +
fmt(r.days.reduce(function (a, d) { return a + d.amount; }, 0)) + "</b></td></tr></tbody></table>" : "";
'</td><td class="perf-num">' + fmt(d.amount) + '</td><td class="perf-num">' + fmt(d.claimed || 0) +
'</td><td class="perf-num">' + fmt(d.ship || 0) + "</td></tr>";
}).join("") + '<tr><td class="perf-td-label"><b>합계</b></td>' +
["orders", "amount", "claimed", "ship"].map(function (k) {
return '<td class="perf-num"><b>' + fmt(r.days.reduce(function (a, d) { return a + (d[k] || 0); }, 0)) + "</b></td>";
}).join("") + "</tr></tbody></table>" : "";
out.innerHTML = summary + days + (details || '<p class="perf-muted" style="margin-top:8px">그 기간에 조회된 주문이 없습니다. 쇼핑몰 관리자 화면에서 매출이 있던 날로 다시 해 보세요.</p>');
} catch (err) {
out.innerHTML = '<p class="perf-notice is-warn">' + esc(err.message) + "</p>";