Skip to content

Add "Unpaid" stat to organization reimbursements page#13431

Open
Copilot wants to merge 3 commits intomainfrom
copilot/add-unpaid-stat-reimbursements
Open

Add "Unpaid" stat to organization reimbursements page#13431
Copilot wants to merge 3 commits intomainfrom
copilot/add-unpaid-stat-reimbursements

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 7, 2026

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:

  • Draft
  • Under Review (submitted)
  • Review Requested (reimbursement_requested)

These correspond to the existing pending scope on Reimbursement::Report.

Changes

  • app/controllers/events_controller.rb: Compute @unpaid using the existing pending scope, summing USD amounts directly and non-USD amounts via cached_wise_transfer_quote_amount. Reuses a pending_reports variable to avoid redundant queries.
  • app/views/events/reimbursements.html.erb: Add the "Unpaid" stat between "Reimbursed" and "Pending" in the statset.

Agent-Logs-Url: https://github.com/hackclub/hcb/sessions/b35f78b2-0e83-49eb-a223-51d517840f44

Co-authored-by: YodaLightsabr <76178582+YodaLightsabr@users.noreply.github.com>
@YodaLightsabr YodaLightsabr marked this pull request as ready for review April 13, 2026 14:51
@YodaLightsabr YodaLightsabr requested a review from a team April 13, 2026 14:51
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