fix(performance): 카페24 환불 — 네이버페이만·전체취소 배송비 포함, 0원 결제 주문은 0원
9/4·9/16·9/25 대조 결과: - 9/4 환불 122,100 = 환불 목록 98,700 + 네이버페이 취소 19,900 + 그 주문 배송비 3,500 (주문 전체취소) — 우리는 배송비를 빠뜨려 −3,500 (9/14 −7,000 도 같은 유형) - 9/16 환불 201,100 = 환불 목록 그대로 — 우리가 더 뺀 9,900 은 톡체크아웃 (KAKAOPAY) 환불 기록 없는 취소. 카페24 는 네이버페이만 센다 (9/21 도 같은 유형) - 9/25 결제: 실결제·적립금·네이버포인트는 카페24 와 같은데 합계만 +9,900 — 네 값이 모두 0인 주문(가상계좌·휴대폰 9,900)을 상품식으로 넣었기 때문. 카페24 는 0원 (9/11 +24,900 도 같은 유형) - unrefunded_claims: 네이버페이(NCHECKOUT) 주문만, 주문 전체가 취소·반품되면 배송비(− 배송비 할인·쿠폰)를 마지막 클레임 품목에 한 번 더함 - _paid_total: 상품식 대체 제거 - 대조 표에 품목별 배송비 포함액 표시, 테스트 갱신 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -518,7 +518,7 @@
|
||||
[" · 실제 환불액", rs.actual_refund_amount, rm.actual_refund_amount, "sub"],
|
||||
[" · 적립금 환불", rs.used_points, rm.used_points, "sub"],
|
||||
[" · 예치금 환불", rs.used_credits, rm.used_credits, "sub"],
|
||||
["환불 목록 없는 취소·반품 품목 수(네이버페이 등)", rs.no_record_count, rm.no_record_count, "cnt"],
|
||||
["환불 목록 없는 네이버페이 취소·반품 품목 수", rs.no_record_count, rm.no_record_count, "cnt"],
|
||||
[" · 취소·반품 금액", rs.no_record, rm.no_record, "sub"],
|
||||
["환불합계", rs.total, rm.total, "key", 11],
|
||||
["순매출(결제합계 − 환불합계)", s.total - rs.total, m.total - rm.total, "key", 12],
|
||||
@@ -583,7 +583,7 @@
|
||||
}).join("") + "</tbody></table>"
|
||||
: "") +
|
||||
((r.no_record_claims || []).length
|
||||
? '<h4 class="perf-h" style="margin:14px 0 6px">환불 목록에 없는 취소·반품 (환불합계에 넣은 건 — 네이버페이 등)</h4>' +
|
||||
? '<h4 class="perf-h" style="margin:14px 0 6px">환불 목록에 없는 네이버페이 취소·반품 (환불합계에 넣은 건 — 주문 전체취소면 배송비 포함)</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 class="perf-th-label">상품</th>' +
|
||||
"<th>수량</th><th>뺀 금액</th><th>품목 결제금액</th><th>쿠폰</th><th class=\"perf-th-label\">주문 전체취소</th><th>주문 배송비</th></tr></thead><tbody>" +
|
||||
@@ -591,6 +591,7 @@
|
||||
return '<tr><td class="perf-td-label">' + esc(c.order_id) + "</td><td>" + esc(c.item_code) + "</td><td>" + esc(c.place_name || c.market_id || "–") +
|
||||
"</td><td>" + esc(c.status + (c.naver_pay_claim_status ? " / 네이버페이 " + c.naver_pay_claim_status : "")) + "</td><td>" + esc(c.day) +
|
||||
"</td><td>" + esc(c.product_name) + '</td><td class="perf-num">' + fmt(c.quantity) + '</td><td class="perf-num">' + won(c.amount) +
|
||||
(c.shipping_refund ? ' <span class="perf-muted">(배송비 ' + fmt(c.shipping_refund) + ")</span>" : "") +
|
||||
'</td><td class="perf-num">' + won(c.item_payment_amount) + '</td><td class="perf-num">' + won(c.coupon) + "</td><td>" +
|
||||
(c.order_all_claimed ? "<b>예</b>" : "아니오") + '</td><td class="perf-num">' + won(c.order_shipping_fee) + "</td></tr>";
|
||||
}).join("") + "</tbody></table>"
|
||||
|
||||
Reference in New Issue
Block a user