Skip to content

[Reimbursements] Show banners when orgs have insufficient funds#13434

Open
manuthecoder wants to merge 10 commits intomainfrom
mxg-showing-banners-on-reimbursements-when-orgs-have-insufficient-funds
Open

[Reimbursements] Show banners when orgs have insufficient funds#13434
manuthecoder wants to merge 10 commits intomainfrom
mxg-showing-banners-on-reimbursements-when-orgs-have-insufficient-funds

Conversation

@manuthecoder
Copy link
Copy Markdown
Contributor

@manuthecoder manuthecoder commented Apr 8, 2026

closes #13426

This pull request introduces a balance validation warning on the reimbursement report page

Added validation to alert users when a reimbursement exceeds available event funds:

  • Implemented exceeds_event_balance? method in Reimbursement::Report to check if the requested amount surpasses the event's available USD balance for submitted reports
  • Updated the report view to display an informational callout when the balance is exceeded on open reports, notifying users that additional funding may be required
image

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a “low/insufficient funds” warning to reimbursement report pages so users are informed when a submitted reimbursement amount exceeds the event’s available USD balance.

Changes:

  • Introduces Reimbursement::Report#exceeds_event_balance? to detect when the report amount is beyond the event’s available USD balance.
  • Updates the reimbursement report show view to render a warning callout for open reports that exceed available balance.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
app/models/reimbursement/report.rb Adds a helper method to check whether a submitted report exceeds the event’s available USD balance.
app/views/reimbursement/reports/show.html.erb Renders a warning callout intended to display when the report exceeds the event balance and is still open.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/views/reimbursement/reports/show.html.erb Outdated
Comment thread app/models/reimbursement/report.rb Outdated
Copy link
Copy Markdown
Contributor

@YodaLightsabr YodaLightsabr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We currently already have a system in place for alerting users of insufficient funds:

<span class="bold warning">Warning</span>: your report is beyond your balance. To continue, lower the amount requested.

It looks like the only difference between the existing logic and this PR's logic is that this PR shows the warning even when a report requires peer review. If this difference is intentional, we should update the existing callout rather than creating a new one.

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.

[Reimbursement] Make users aware that they're "waiting on organizers to secure additional funds"

3 participants