[Reimbursements] Show banners when orgs have insufficient funds#13434
Open
manuthecoder wants to merge 10 commits intomainfrom
Open
[Reimbursements] Show banners when orgs have insufficient funds#13434manuthecoder wants to merge 10 commits intomainfrom
manuthecoder wants to merge 10 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…rgs-have-insufficient-funds
…rgs-have-insufficient-funds
YodaLightsabr
requested changes
Apr 13, 2026
Contributor
YodaLightsabr
left a comment
There was a problem hiding this comment.
We currently already have a system in place for alerting users of insufficient funds:
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.
Co-authored-by: Claude <noreply@anthropic.com>
…rgs-have-insufficient-funds
…rgs-have-insufficient-funds
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.
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:
exceeds_event_balance?method inReimbursement::Reportto check if the requested amount surpasses the event's available USD balance for submitted reports