Skip to content

Develop#490

Merged
minij02 merged 2 commits into
mainfrom
develop
May 22, 2026
Merged

Develop#490
minij02 merged 2 commits into
mainfrom
develop

Conversation

@minij02
Copy link
Copy Markdown
Collaborator

@minij02 minij02 commented May 22, 2026

📌 기능 설명

📌 구현 내용

📌 구현 결과

📌 논의하고 싶은 점

minij02 and others added 2 commits May 23, 2026 02:26
#485 후속. 환불 시 Settlement.status='Refunded'로 전이됐으나 정산 통계가
status 무관 단순 합계라 매출이 부풀려 표시되던 문제 정정.

### GET /api/settlements/yearly
- aggregateYearlyTotals 쿼리:
  - succeeded_amount = Succeed만 (환불 제외)
  - refunded_amount, refunded_count 신규 컬럼 추가
  - total_settled를 succeeded_amount로 통일 (net = 환불 제외)
  - total_sales는 그대로 gross (Purchase.amount 합계, 환불 포함) — 비교용 유지
- DTO: refunded_amount, refunded_count 추가

### GET /api/settlements/sales/monthly
- service 합산 시 status==='Refunded' 분리:
  - refunded_count, refunded_amount 별도 누적
  - total_settled는 환불 제외 누적 (net)
- DTO: summary에 refunded_count, refunded_amount 추가
- items.status enum에 'Refunded' 추가

### GET /api/settlements/pending-amount
- 변경 없음 (이미 status='Pending'만 필터)

### Swagger
- 두 API 응답 schema 갱신, status enum에 Refunded 추가

환수 자동화(Payple 지급이체 차감/SettlementAdjustment)는 별도 이슈로 분리.
[FEAT] 정산 통계에서 환불(Refunded) 거래 분리 표시 (#488)
@minij02 minij02 merged commit 6ed70da into main May 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant