Skip to content

fix: 장부 통합 report의 합계/지분 계산 보정#18

Merged
rlarltj merged 1 commit into
MONEYMONG:devfrom
pott-101:pott-101/fix-report-share
May 5, 2026
Merged

fix: 장부 통합 report의 합계/지분 계산 보정#18
rlarltj merged 1 commit into
MONEYMONG:devfrom
pott-101:pott-101/fix-report-share

Conversation

@pott-101

@pott-101 pott-101 commented May 5, 2026

Copy link
Copy Markdown
Contributor

Summary

장부 통합 report API(LedgerReportReader)의 다음 세 가지 동작을 수정합니다.

  1. totalIncome / totalExpense / totalBalance — 요청 기간이 아닌 장부 전체 기간 합계로 응답하도록 수정. 기존엔 요청 기간으로 필터링된 filteredDetails 기준으로 합산되어, 단일 월 요청 시 해당 월 합계만 응답됨.
  2. monthly[].incomeShareOfPeriod / expenseShareOfPeriod — 분모를 장부 전체 기간 합계로 변경. 기존엔 요청 기간 내부 합계가 분모라서 단일 월 요청 시 항상 1.0이 응답됨.
  3. categories[] — 단일 share 필드를 incomeShare / expenseShare로 분리. 기존엔 income과 expense가 모두 있는 카테고리에서 expense 비율이 누락됨. 두 분모 모두 장부 전체 기간 합계 기준.

MemberReportincomeShare/expenseShare는 기존 의미(요청 기간 내부 비율)를 유지합니다.

Test plan

  • 단일 월 요청 시 totalIncome/totalExpense가 해당 월 합계가 아닌 장부 전체 합계로 응답되는지 확인
  • 단일 월 요청 시 monthly[0].incomeShareOfPeriod가 1.0이 아닌 (해당 월 / 장부 전체) 비율인지 확인
  • 동일 카테고리에 income과 expense가 동시에 있을 때 두 비율 모두 응답에 포함되는지 확인
  • 클라이언트에서 응답 스키마(categories[].share 제거, incomeShare/expenseShare 추가) 반영

🤖 Generated with Claude Code

- totalIncome/totalExpense/totalBalance를 요청 기간이 아닌 장부 전체 기간 합계로 변경
- monthly의 incomeShareOfPeriod/expenseShareOfPeriod 분모를 장부 전체 기간 합계로 변경
- categories의 단일 share 필드를 incomeShare/expenseShare로 분리

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@pott-101

pott-101 commented May 5, 2026

Copy link
Copy Markdown
Contributor Author

dev에 직접 push로 전환합니다.

@pott-101 pott-101 closed this May 5, 2026
@pott-101

pott-101 commented May 5, 2026

Copy link
Copy Markdown
Contributor Author

dev에 직접 push 권한이 없어 PR로 진행합니다.

@pott-101 pott-101 reopened this May 5, 2026
@rlarltj rlarltj merged commit 559ece7 into MONEYMONG:dev May 5, 2026
2 checks 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.

2 participants