Bill a monthly group class its fee once per month
CI / Tests (PHP 8.1) (pull_request) Successful in 49s
CI / Tests (PHP 8.2) (pull_request) Successful in 52s
CI / No Debug Code (pull_request) Successful in 2s
CI / PHPStan (pull_request) Successful in 2m50s
CI / Coding Standards (pull_request) Successful in 2m58s
CI / Tests (PHP 8.3) (pull_request) Successful in 2m38s
CI / Build Plugin Zip (pull_request) Skipped

A monthly group class multiplied its price by the sessions falling in the month,
the same rule private lessons use — so a class priced at 40.00 CAD meeting
weekly was billed 160.00 CAD on the 1st, and no studio could quote the price on
a class card without lying about it.

A group class is now billed its fee once for the month however many times it
meets, which is what the card quotes and what the student ticks to agree to.
Private lessons keep the per-lesson rule: their price is a per-lesson fee, and
that is why the card quotes it per lesson.

The session count still labels the month on the student's payment notice; it no
longer prices it.

Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
2026-07-28 15:22:46 -03:00
co-authored by Claude Opus 5
parent a276d53c1b
commit bfdc3b3380
6 changed files with 56 additions and 21 deletions
+9 -13
View File
@@ -112,19 +112,15 @@ offering's `billing_mode` in the words the student needs:
So a lesson type reads `50.00 CAD at booking` in the booking form's type picker,
and a group class card reads `120.00 CAD up front`. A free offering shows `Free`.
**`monthly` reads differently per offering kind.** A private lesson's monthly
charge is that month's lessons × the fee, so the fee is quoted **per lesson**
(`50.00 CAD per lesson monthly`). A group class is enrolled in once, as one
schedule, so its figure is quoted as it stands (`120.00 CAD monthly`) — see
`isPerLessonMonthly()` in `assets/js/pricing.js`.
> **Caveat.** `ScheduledBillingRunner::billGroupMonthly()` bills a monthly group
> class `price × sessions in the month`, the same per-session multiplication used
> for private lessons — so a class meeting weekly is charged roughly four times
> the quoted `120.00 CAD monthly` figure. The display deliberately quotes the
> price as a monthly figure; closing the gap means either billing a monthly group
> class once per month regardless of session count, or restoring the per-lesson
> wording for group classes too.
**`monthly` reads differently per offering kind, because it *bills* differently.**
A private lesson's price is a per-lesson fee and its monthly charge is that
month's lessons × the fee, so the fee is quoted **per lesson**
(`50.00 CAD per lesson monthly`). A monthly group class is priced **per month**
`ScheduledBillingRunner::billGroupMonthly()` charges the fee once for the month
however many times the class meets in it — so its figure is quoted as it stands
(`120.00 CAD monthly`). The display split is `isPerLessonMonthly()` in
`assets/js/pricing.js`; the billing split is the one place the monthly rule
differs between the two kinds.
Before a booking or enrolment can be submitted, the form shows the price again as
a summary block with a **required agreement checkbox** — the second confirmation,