Repository navigation
Stop on payment requests and refunds net of partial refunds for back campaigns (#89) - #91
Conversation
…campaigns (#89) The pledge page hides the transfer details while a moderator has stopped the campaign's payment requests, and shows amounts owed back net of refunds (give.pledge_balance). Moderators stop or resume the payment requests of a succeeded back campaign at /admin/payment-requests. The campaign page shows the public stop notice. Notices word refund_amount, the overpaid refund_owed and the stop and resume notices. Needs DOS/DOS.Me 20261106110000_give_pledge_net_refunds_and_payment_stop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
…d wording from review (#89) - /me/contributions reads give.pledge_balances: amounts due and owed back are net of refunds, and a stopped campaign shows no Thanh toán button. - The pledge page asks for payment details through loadPledgeMoney, which never calls pledge_payment while stopped; no details before the deadline is 'unavailable', not 'closed'; refunds already made are named next to the received amount; a failed balance read leaves the amounts out. - The stop notice and the stopped page give the deadline; the creator gets a resume notice; the admin page says a note change sends no new notices. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner decision: no pledge lapses while payment requests are stopped, and a resume moves the deadlines by the time stopped. The pledge page, the stop and resume notices and the moderator page now say so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A pledge already overdue when the stop began lapses as usual, so its page shows the deadline as passed instead of the stop wording (stopHoldsPledge). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
⏸️ DOS Review: Automatic Review Limit ReachedDOS Code Review already reviewed 3 commits of this pull request automatically, the limit for one pull request, so this commit was not reviewed automatically and nothing was charged. Please step back before pushing another fix: a pull request that needs this many review rounds usually needs a rethink of its approach or a smaller scope, not one more patch. When you are ready, a maintainer can comment /review to review the current commit. |
|
PO acceptance: merge at 4d32cca. Lint + Build green, Vitest 913, tsc/eslint clean; reviews no P1. DB part DOS/DOS.Me#1551 merged. |
Refs #89
App side of #89.
Deploy order: DOS/DOS.Me#1551 (migration
20261106110000_give_pledge_net_refunds_and_payment_stop) must be applied before this ships.paymentCampaign, the money totals and the contributions list read the newpayments_stopped_*columns andgive.pledge_balances; without them the pledge pages fail.What changes
/me/pledges/[code]): while a moderator has stopped the campaign's payment requests, the page shows "Give đã tạm dừng yêu cầu thanh toán… Đừng chuyển tiền" with the public note and never callspledge_payment(loadPledgeMoney; the database also returns no row). The decision ispaymentView()inlib/pledges.ts; the stop wins over everything, and no details before the deadline shows "reload" rather than "closed". The wording says the stop does not count against the deadline (no lapse while stopped; a resume moves the deadline), only for pledges the stop holds (stopHoldsPledge); a pledge overdue before the stop shows as closed.give.pledge_balances(refund owed = received - refunded, or the excess of a paid pledge) and name refunds already made; if that read fails the amounts are left out rather than shown gross./me/contributions): amounts due and owed back net of refunds; a stopped campaign shows "Give đang tạm dừng yêu cầu thanh toán" and no Thanh toán button. The "nothing due" note is reworded now thatamount_dueis net./admin/payment-requests(moderator/admin, linked from /admin): lists succeeded back campaigns (stopped first) with stop (internal reason + public note), change note, and resume (reason). Server action checks the role with the moderator's own token, then callsgive.set_payment_requests_stoppedas service role; database refusals are worded.PledgeTotalson the campaign page shows the stop and its note first.MoneyTotalsreadspayments_stopped_at/payments_stopped_note.lib/notices.ts): refund_due / refund_owed userefund_amount(net) when present; refund_owed reasonoverpaidsays "đã chuyển nhiều hơn số cam kết… hoàn lại phần thừa"; new kindspayment_requests_stoppedandpayment_requests_resumed(backer and creator variants); reminder fallback amount is net ofrefunded_amount.Tests
paymentView,pledgeListSummary/offersPayment,pledgeBalances,loadPledgeMoneynever callspledge_paymentwhile stopped, admin action, notices,PledgeTotalsstop notice);tsc --noEmitandeslintclean.Reviews
General and money reviews: no P1; P2s (contributions list, gross/net mix, deploy order) and most P3s fixed. Left as follow-ups: the creator's matching hint (
lib/reconciliation.tswaitsFor) ignores refunds; payment_due/reminder notices sent before a stop still read "pay" (their link shows the stop).🤖 Generated with Claude Code