Add "Unpaid" stat to organization reimbursements page#13431
Open
Add "Unpaid" stat to organization reimbursements page#13431
Conversation
Agent-Logs-Url: https://github.com/hackclub/hcb/sessions/b35f78b2-0e83-49eb-a223-51d517840f44 Co-authored-by: YodaLightsabr <76178582+YodaLightsabr@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
YodaLightsabr
April 7, 2026 23:56
View session
YodaLightsabr
approved these changes
Apr 13, 2026
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
Adds an Unpaid stat to the organization's reimbursements page, placed to the left of the existing Pending stat.
The "Unpaid" stat shows the total amount for reimbursement reports in the following states:
These correspond to the existing
pendingscope onReimbursement::Report.Changes
app/controllers/events_controller.rb: Compute@unpaidusing the existingpendingscope, summing USD amounts directly and non-USD amounts viacached_wise_transfer_quote_amount. Reuses apending_reportsvariable to avoid redundant queries.app/views/events/reimbursements.html.erb: Add the "Unpaid" stat between "Reimbursed" and "Pending" in the statset.