From 2f86445077e3a55d4bad446cc4d27d6aed85fbeb Mon Sep 17 00:00:00 2001 From: king Date: Tue, 29 Sep 2026 22:53:43 +0900 Subject: [PATCH] =?UTF-8?q?feat(performance):=20=EC=B9=B4=ED=8E=9824=20?= =?UTF-8?q?=EB=8C=80=EC=A1=B0=EC=97=90=20=ED=99=98=EB=B6=88=20=EB=AA=A9?= =?UTF-8?q?=EB=A1=9D=20=EC=97=86=EB=8A=94=20=EC=B7=A8=EC=86=8C=C2=B7?= =?UTF-8?q?=EB=B0=98=ED=92=88=20=EA=B1=B4=EB=B3=84=20=ED=91=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 결제합계 공식 교체 후 남은 차이는 결제 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 --- app/modules/performance/adapters/cafe24.py | 6 ++++++ .../performance/templates/performance/index.html | 2 +- .../performance/templates/performance/settings.html | 2 +- app/static/performance.js | 13 +++++++++++++ 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/app/modules/performance/adapters/cafe24.py b/app/modules/performance/adapters/cafe24.py index cab1d3c..418f2b2 100644 --- a/app/modules/performance/adapters/cafe24.py +++ b/app/modules/performance/adapters/cafe24.py @@ -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 [] diff --git a/app/modules/performance/templates/performance/index.html b/app/modules/performance/templates/performance/index.html index e752247..7b20b56 100644 --- a/app/modules/performance/templates/performance/index.html +++ b/app/modules/performance/templates/performance/index.html @@ -239,4 +239,4 @@ } | tojson }} {% endblock %} -{% block scripts %}{% endblock %} +{% block scripts %}{% endblock %} diff --git a/app/modules/performance/templates/performance/settings.html b/app/modules/performance/templates/performance/settings.html index 7dee1f8..bd4f88e 100644 --- a/app/modules/performance/templates/performance/settings.html +++ b/app/modules/performance/templates/performance/settings.html @@ -155,4 +155,4 @@ {% endblock %} -{% block scripts %}{% endblock %} +{% block scripts %}{% endblock %} diff --git a/app/static/performance.js b/app/static/performance.js index 49d8aed..bef7b38 100644 --- a/app/static/performance.js +++ b/app/static/performance.js @@ -582,6 +582,19 @@ '' + won(x.used_points + x.used_credits) + "" + esc((x.methods || []).join(", ") || "–") + ""; }).join("") + "" : "") + + ((r.no_record_claims || []).length + ? '

환불 목록에 없는 취소·반품 (환불합계에 넣은 건 — 네이버페이 등)

' + + '' + + '' + + "" + + r.no_record_claims.map(function (c) { + return '"; + }).join("") + "
주문번호품목채널상태반영일상품수량뺀 금액품목 결제금액쿠폰주문 전체취소주문 배송비
' + esc(c.order_id) + "" + esc(c.item_code) + "" + esc(c.place_name || c.market_id || "–") + + "" + esc(c.status + (c.naver_pay_claim_status ? " / 네이버페이 " + c.naver_pay_claim_status : "")) + "" + esc(c.day) + + "" + esc(c.product_name) + '' + fmt(c.quantity) + '' + won(c.amount) + + '' + won(c.item_payment_amount) + '' + won(c.coupon) + "" + + (c.order_all_claimed ? "예" : "아니오") + '' + won(c.order_shipping_fee) + "
" + : "") + ((r.reduced_orders || []).length ? '

그날 결제한 주문 중 금액이 줄어든 주문 (취소·반품) — "환불 기록 없음"이 환불 API 에 안 잡힌 건

' + '' +
주문번호채널