rubyforgood / rubyforgood/awbw
Confirm: comped CE fees count as org subsidy in the revenue report
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 15
- Forks
- 26
- Avg merge
- 12h 42m
- Merged PRs (30d)
- 242
Description
The problem
A CE fee can only ever end up in one of three places: paid, comped (a discount allocation), or owed. #2072 made "paid" and "owed" real figures on the events revenue report — but nothing claimed the comped slice, so a fully-discounted CE fee was neither collected nor outstanding and disappeared from the report entirely.
Example — a $60 CE fee comped in full:
| Before #2072 | #2072 as first written | #2072 as merged | |
|---|---|---|---|
| Fees collected | $0 | $0 | $0 |
| Outstanding | $60 (never collectable) | $0 | $0 |
| Org subsidy | $0 | $0 | $60 |
| Net | $0 | $0 | −$60 |
The middle column is the hole: $60 of value the org gave away, invisible on every figure.
What we did
Counted CE discounts as org subsidy, matching how a discounted registration fee is already treated. Net and total expected drop by the comped amount. Implemented in EventRevenueFigures (app/services/event_revenue_figures.rb) — it's the one place the batched report figures deliberately diverge from EventDashboard.
What needs confirming
- Is "the org gave away $60" the right read of a comped CE fee for annual-report purposes? (The alternative is treating CE comps as never-was-revenue, i.e. leaving them out of every bucket — which is what was happening by accident.)
- Should the same reasoning extend to a partially comped CE fee ($60 fee, $20 discount, $40 paid → $20 subsidy)? That's what the code does today; flagging it because it wasn't discussed separately.
- Does the revenue page need to show CE discounts broken out from registration discounts, or is one combined "Discounts" line enough?
Context
- Introduced by #2072
app/services/event_revenue_figures.rb—discount_centssums Discount allocations across bothEventRegistrationandContinuingEducationRegistrationspec/services/event_revenue_report_spec.rb— "discounted CE fees" describes the expected accounting- CE comps are reachable in the UI today: the allocations page for a CE registration (
app/views/continuing_education_registrations/_payment_history.html.erb) has an "Add discount" action
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review app/services/event_revenue_figures.rb and the discounted CE fees example in spec/services/event_revenue_report_spec.rb, then compare the existing registration discount treatment with the CE allocation flow in app/views/continuing_education_registrations/_payment_history.html.erb. Confirm the accounting treatment for full and partial CE discounts and whether the revenue page needs separate discount lines; done means the policy is agreed and the report behavior and tests match it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100