Merge branch 'feat/performance' into feat/project — 네이버 매출 = 판매금액(총)
This commit is contained in:
@@ -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>";
|
||||
|
||||
Reference in New Issue
Block a user