feat(performance): 카페24 대조에 환불 목록 없는 취소·반품 건별 표
결제합계 공식 교체 후 남은 차이는 결제 2일(9/25 +9,900, 9/11 +24,900)과 환불 5일(9/21·9/16 +9,900, 9/11 +26,400, 9/14 −7,000, 9/4 −3,500). −3,500/−7,000 은 환불 목록에 없는 취소(네이버페이 등)의 배송비 환불을 안 넣은 것으로 보여, 그 건들을 건별로(뺀 금액·품목 결제금액·쿠폰·주문 전체취소 여부· 주문 배송비) 표시한다. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -402,6 +402,12 @@ class Cafe24Adapter(MarketplaceAdapter):
|
||||
"quantity": qty, "amount": max(0, amount),
|
||||
"product_name": str(i.get("product_name") or "")[:40],
|
||||
"naver_pay_claim_status": str(i.get("naver_pay_claim_status") or ""),
|
||||
# 대조용 — 주문 전체가 취소·반품됐는지, 그 주문 배송비(배송비 환불 여부 확인)
|
||||
"order_all_claimed": all(str(x.get("order_status") or "") in NO_RECORD_DONE
|
||||
for x in o.get("items") or []),
|
||||
"order_shipping_fee": order_amounts(o)["shipping_fee"],
|
||||
"item_payment_amount": _won(i.get("payment_amount")),
|
||||
"coupon": _won(i.get("coupon_discount_price")),
|
||||
}
|
||||
if not found:
|
||||
return []
|
||||
|
||||
@@ -239,4 +239,4 @@
|
||||
} | tojson }}</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}<script src="/static/performance.js?v=20260930n" defer></script>{% endblock %}
|
||||
{% block scripts %}<script src="/static/performance.js?v=20260930o" defer></script>{% endblock %}
|
||||
|
||||
@@ -155,4 +155,4 @@
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}<script src="/static/performance.js?v=20260930n" defer></script>{% endblock %}
|
||||
{% block scripts %}<script src="/static/performance.js?v=20260930o" defer></script>{% endblock %}
|
||||
|
||||
@@ -582,6 +582,19 @@
|
||||
'</td><td class="perf-num">' + won(x.used_points + x.used_credits) + "</td><td>" + esc((x.methods || []).join(", ") || "–") + "</td></tr>";
|
||||
}).join("") + "</tbody></table>"
|
||||
: "") +
|
||||
((r.no_record_claims || []).length
|
||||
? '<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>" +
|
||||
r.no_record_claims.map(function (c) {
|
||||
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) +
|
||||
'</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>"
|
||||
: "") +
|
||||
((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>' +
|
||||
|
||||
Reference in New Issue
Block a user