# Junior Fees Implementation Summary Based on the recent updates, we have introduced a dedicated system for tracking, displaying, and reconciling junior team attendances and payments. ## 1. Implemented Features - **Dual-Sheet Architecture:** The system now pulls attendance from two separate Google Sheet tabs—one for adult practices and another for junior practices. - **New Views:** - `/fees-juniors`: A dedicated dashboard showing junior attendances and calculated fees. - `/reconcile-juniors`: A dedicated page matching Fio bank transactions against expected junior fees. - **Granular Attendance Display:** The UI clearly separates and tallies adult (`A`) and junior (`J`) practice counts for each member (e.g., `4 (2A+2J)` or `2 (J)`). ## 2. Membership Rules - **Identification:** A member is processed as a junior if they appear in the *Junior Sheet*, UNLESS: - They are listed below the separator line `# Treneri` (or `# Trenéři`). - Their tier is explicitly marked as `X`. - **Adult Sheet Fallback:** Members from the Adult Sheet whose tier is marked as `J` are also tracked as juniors. - **Merging Identities:** If a member has the identical name in both the Adult Sheet and the Junior Sheet, their attendance records are merged together into a single profile. ## 3. Fee Calculation Rules The base fee calculation for juniors relies on the total combined attendance across both adult and junior practices for a given month: - **0 attendances:** 0 CZK - **Exactly 1 attendance:** `?` (Flags the month for manual review/decision) - **2 or more attendances:** 500 CZK (Default base rate) ## 4. Exceptions & Overrides We have hardcoded specific timeline and pricing exceptions directly into the logic: - **Modified Monthly Rates:** - **September 2025** (`2025-09`) is explicitly configured to have a fee of **250 CZK** for 2+ attendances instead of the default 500 CZK. - **Merged Billing Months:** To handle holidays and off-seasons, certain subsequent months are merged and billed as a single period. Their attendances are summed up before the fee rule is applied. The current active merges are: - **December 2025** is merged into **January 2026** - **September 2025** is merged into **October 2025**