Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭
#2,084 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
ruby
领域
backend

调研方向

检查 app/services/event_revenue_figures.rb 以及 spec/services/event_revenue_report_spec.rb 中折扣 CE 费用的示例,然后将现有的注册折扣处理方式与 app/views/continuing_education_registrations/_payment_history.html.erb 中的 CE 分配流程进行比较。确认全额和部分 CE 折扣的会计处理方式,以及收入页面是否需要单独的折扣行;完成的标准是政策已达成一致,且报告行为和测试与该政策一致。

由索引模型根据 Issue 内容生成。

描述

event mgmt stakeholder-question
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_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
主要语言
Ruby
星标
15
派生
28
平均合并
1 天 12 分钟
30 天内合并 PR
262

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

rubyforgood/awbw 的其他 Issue

查看 rubyforgood/awbw 的全部 Issue

相似的 Issue

更多 Ruby Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。