feat(wholesale): 정산 선수금 3카드 · 총 사용 가능 · 선수금 정산 · 입금 취소 #138 - #244
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
Warning Review limit reachedNext included review available in 31 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (15)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
3 tasks
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
무엇
정산 탭에 선수금 축을 넣는다. 2026-09-10에 "서버 데이터가 없다"로 보류했던 #138을 #237 스냅샷 재동기화로 다시 열었다.
GET /receivables/retailers/{id}/prepaid값 그대로. Figma의 보조 문구(입금 회수·완료율·미정산 건수)는 서버가 안 줘서 안 그린다미수→남은 미수,배분→이번 배분, 합계행 추가. 남은 미수는 서버outstandingAmount(출고 미수 − 이미 붙은 배분) 그대로. 출고 여부는 새shippedAmount로 본다(이행 상태 근사 폐기)POST /allocations) — 3카드의 버튼으로 진입. 새 입금 없이 남은 선수금만으로 배분하는 패널. 입금 폼과 같은 배분 표·같은 derive를 쓰고, 남은 선수금이 0이면 버튼이 잠긴다. Idempotency-Key는 입금 등록과 같은 방식POST /payments/{id}/void) — 미수원장 입금 줄의취소→ 사유 필수 다이얼로그. 같은 페이지에 취소 줄이 이미 붙은 입금은 버튼을 안 단다prepaidRemaining을 적는다왜
prepaidRemaining으로 캐시를 직접 고치지 않는 것도 같은 이유(totalPaid·totalAllocated가 응답에 없다)다시 시도가 둘이 된다(확정 주문과 같은 흐름)확인
pnpm typecheck && pnpm lint && pnpm build통과prepaid응답 모양, 404RESOURCE_NOT_FOUND,outstandingAmount가 출고 기준으로 내려오는 것(출고 전 주문 0, moodon 7007은 shipped 46,000 = outstanding 46,000). 쓰기 호출(payments·allocations·void)은 하지 않았다 — dev 데이터를 안 바꿨다취소범위에서 뺀 것
POST /allocations/{id}/cancel) — 화면에 배분 id를 보여 주는 자리가 없다. 억지로 만들지 않고 뺐다. 필요하면 별도 이슈BankAccountPanel은 손대지 않았다800줄 초과 사유와 파일 구성
정산 화면 한 장이다. 3카드·총 사용 가능·선수금 정산·입금 취소가 같은 derive(배분 표 규칙)와 같은 결과 문구(
notice)를 나눠 써서 나누면 중간 상태가 어색하다. 커밋은 셋으로 나눴다(선수금 조회·3카드 / 사용 가능액·배분 표 / 선수금 정산·입금 취소).types.tsPrepaidSummary·AllocationCreateRequest·PaymentVoid*wire 별칭,PrepaidView·AllocationDraft,LedgerRowView.paymentId/voidable,SettlementNotice.kindconstants.tsALLOCATION_EXCEEDS_PAYMENT·_PREPAID), 입금 취소 문구·사유 상한derive.tsavailableTotal, 배분 표 상한을 사용 가능액으로,toPrepaidView,hasShipped(shippedAmount), 원장voidable, 선수금 정산·입금 취소 요청 변환,noticeText3종api/keys.ts·api/queries.tsprepaid(retailerId)키·경로·usePrepaidQuery,allocations·paymentVoid경로api/mutations.tsuseCreateAllocationMutation,useVoidPaymentMutationcomponents/PrepaidSummaryPanel.tsx(신규)선수금으로 정산진입components/PrepaidAllocationPanel.tsx(신규)components/PaymentVoidDialog.tsx(신규)components/AllocationTable.tsxcomponents/DepositFormPanel.tsxcomponents/ReceivableLedgerTable.tsx·SettlementSegmentView.tsx취소버튼·다이얼로그components/SettlementListView.tsxshared/api/errorCodes.tsALLOCATION_EXCEEDS_PREPAIDCloses #138