Repository navigation
remove order refunds and rebase donation/payout on grant-excluded accounting - #65
Merged
Merged
Conversation
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.
Summary
Removes the order-refund concept entirely — a paid order is now terminal (no reversal path; admin
adjustmentremains the only manual escape hatch). Drops therefundstable,order_status='refunded',transaction_type='refund', the refund columns/indexes,POST /v1/refunds, and all refund UI across the four clients. Rebases donation/payout on base-grant-excluded accounting: per user기부 = max(0, spent − grant),환급 = min(charge, balance), so실충전 = 기부 + 환급. Migration0013_drop_refunds.sqlhand-corrected for the enum swap (status DEFAULT drop/restore + type-predicate partial index recreate).Verification
pnpm lint— passedpnpm build(7 packages) — passedpnpm --filter api test— passed (105 tests, incl. new grant-excluded donation/payout coverage)pnpm --filter {pos,admin,app,kiosk} test— passed (6/6/7/1)drizzle-kit migrateapplied to dev DB; schema verified (enums trimmed,refundsdropped, columns removed, partial indexes recreated)