rubyforgood / rubyforgood/awbw

Confirm: comped CE fees count as org subsidy in the revenue report

Open
#2,084 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

event mgmt stakeholder-question
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.rbdiscount_cents sums Discount allocations across both EventRegistration and ContinuingEducationRegistration
  • spec/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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.