feat(fees): junior rate for 2026-08 is 0

- 2026-08 added to the junior rate table at 0 CZK, same as adults
- A single practice in a 0-rate month is 0 instead of "?", since a
  free month needs no manual review
- Mirrored in Go and legacy Python; new calculate_junior_fee parity
  fixtures

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-08 21:27:10 +02:00
co-authored by Claude Opus 5.5
parent 7d55eca189
commit 21db863958
8 changed files with 57 additions and 11 deletions
+6
View File
@@ -146,6 +146,12 @@ SEEDS[("calculate_junior_fee", "two_sessions_reduced_sep")] = {
SEEDS[("calculate_junior_fee", "two_sessions_default_fallback")] = {
"attendance_count": 2, "month_key": "2099-06"
}
SEEDS[("calculate_junior_fee", "two_sessions_free_august")] = {
"attendance_count": 2, "month_key": "2026-08"
}
SEEDS[("calculate_junior_fee", "one_session_free_august")] = {
"attendance_count": 1, "month_key": "2026-08"
}
# --- parse_czk_amount ---
+6 -4
View File
@@ -34,7 +34,8 @@ ADULT_FEE_MONTHLY_RATE = {
JUNIOR_FEE_DEFAULT = 500 # CZK for 2+ practices
JUNIOR_MONTHLY_RATE = {
"2025-09": 250,
"2026-03": 250 # reduced fee for March 2026
"2026-03": 250, # reduced fee for March 2026
"2026-08": 0,
}
ADULT_MERGED_MONTHS = {
"2025-09": "2025-10", # keys are merged into values
@@ -105,12 +106,13 @@ def calculate_fee(attendance_count: int, month_key: str) -> int:
def calculate_junior_fee(attendance_count: int, month_key: str) -> str | int:
"""Apply junior fee rules: 0 → 0, 1 → '?', 2+ → Configured Rate (default 500)."""
"""Apply junior fee rules: 0 → 0, 1 → '?' (0 in a 0-rate month), 2+ → Configured Rate (default 500)."""
if attendance_count == 0:
return 0
if attendance_count == 1:
rate = JUNIOR_MONTHLY_RATE.get(month_key, JUNIOR_FEE_DEFAULT)
if attendance_count == 1 and rate > 0:
return "?"
return JUNIOR_MONTHLY_RATE.get(month_key, JUNIOR_FEE_DEFAULT)
return rate
def get_members(rows: list[list[str]]) -> list[tuple[str, str, list[str]]]: