- 12 Jun, 2026 1 commit
-
-
Mahmoud Aglan authored
- Add FIFO payment validation: must pay oldest year first before newer years - Add OverdueFineApplicator::applyForMember() for on-demand fine recalculation - Rewrite view with year-grouped sections, fine breakdown panels, totals - Add data migration to fix corrupted rows (paid_amount with no payment_id) - Show fine calculation details (percentage × base = amount, from rules engine) - Disable pay buttons for non-oldest years with Arabic tooltip - Summary cards showing total debt, fines, and years overdue Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
- 11 Jun, 2026 2 commits
-
-
Mahmoud Aglan authored
- Foreign bill: branch-specific fee lookup, exchange rate conversion, EGP display - Seasonal bill: duration, nationality, dates, base amount, discounts, VAT, family members - Sports bill: improved breakdown with separator and total line - Form fee: add in_queue status to bill item - Controller: type-specific payment types, validation whitelist, descriptions - View: conditional installment option, working-only family links, type-specific labels Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Membership types (seasonal, sports, honorary, foreign) are now selectable at creation time instead of being post-creation conversions from working. Each type has its own fee logic, billing, activation path, and subscription rules. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
- 10 Jun, 2026 1 commit
-
-
Mahmoud Aglan authored
- TemporaryFeeCalculator: resolve current pricing_configs price instead of stored membership_value, matching SpouseFeeCalculator and ChildFeeCalculator behaviour - SubscriptionGenerator: add per-dependent dedup guards (spouse/child/temporary) to prevent duplicate subscription rows on repeated batch runs - Phase_89_001 migration: idempotent fix for subscription late-fine escalation rules (10/50/100/200/300% over 5 years, correct from the broken seed 100/200/300%) - Members show view: add warning banner listing active male children aged 25+ with direct freeze button, surfacing the existing freeze route that was never linked Co-Authored-By:Claude Sonnet 4.6 <noreply@anthropic.com>
-
- 08 Jun, 2026 1 commit
-
-
Mahmoud Aglan authored
- MemberController: SELECT TIMESTAMPDIFF for age_years/age_months in children query - children-table.php: compute age from DOB in view (fallback for static column) - show.php (member): same dynamic age + add 'separated' status translation - show.php (child): compute age from DOB dynamically, fix 25+ threshold check - AgeMonitorJob: add daily age recalculation for all children, change auto-freeze to auto-separate (status='separated', classification='separated') - AutoFreezeService: update processAutoFreeze() to separate instead of just freeze - DB fixes: corrected DOBs from NIDs, updated all ages, separated 3 children >= 25 Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
- 07 Jun, 2026 1 commit
-
-
Mahmoud Aglan authored
- SeparationFeeCalculator: handle NULL qualification_id with fallback pricing lookup, use actual membership_type instead of hardcoded 'working' - SeparationFeeCalculator companion surcharge: use current pricing_configs instead of stale member.membership_value - SubscriptionGeneratorJob: set development_fee=0.00 for spouse/child/temp (matching SubscriptionGenerator service that was already fixed) - RetroactiveMembershipService: default dev fee to 0.00 for non-member types - RetroactiveWizardController: same default logic for missing form fields - Retroactive wizard JS: generate 0.00 dev fee for dependent subscriptions Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
- 03 Jun, 2026 2 commits
-
-
Mahmoud Aglan authored
Members with qualification_id=NULL (old retroactive entries) were falling back to the stored membership_value (e.g. 119,800) instead of using the current pricing (150,000). Now when qualification is NULL, we look up the minimum price for that branch+type, which gives the correct base value. Also fixed 26 existing subscription records in live DB: removed dev fee (35.00) from spouse/child/temp subscriptions and recalculated totals. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Business rule fixes per ticket #68: 1. Spouse/child fee percentages now use CURRENT membership value from pricing_configs (150k/225k/300k) instead of old stored value at creation 2. Spouse annual subscription = 492 (SVC_ANNUAL_SPOUSE) WITHOUT dev fee Was incorrectly using child rate (222) + dev fee (35) = 257 3. Child/temp annual subscription = 222 WITHOUT dev fee Was incorrectly adding 35 dev fee = 257 4. Late marriage penalty: now calculated from LATER of (marriage_date, member_activated_at) to TODAY — not from marriage to member creation 5. SubscriptionGenerator batch: spouse/child/temp subscriptions no longer include development_fee (set to 0.00). Only member keeps dev fee. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
- 01 Jun, 2026 3 commits
-
-
Mahmoud Aglan authored
Frontend: - Client-side NID parser (no API call) — extracts DOB, gender, age, governorate - Shows green badge with parsed info (governorate, gender, age) - Red highlight + Arabic message on every invalid field - Validates: code, name, employment_type, payment_model (non-academy), academy_id (academy), NID length, email format, phone format - Hides payment/rate fields for academy coaches (not needed) - Shows note explaining academy coaches follow salary system - Gender/DOB auto-locked when NID is valid, manual otherwise - Age displayed under DOB field Backend: - Strips non-digits from NID input - Uppercase code automatically - Checks NID uniqueness against existing coaches - Validates email with filter_var - Academy coach requires academy_id selected - payment_model defaults to 'salary' for academy, 'per_session' fallback - max_groups minimum 1 - Success message includes coach name Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Tables fixed (already applied to live DB directly): reservations, academy_settlements, achievement_definitions, activity_subscriptions, facility_grids, facility_monthly_plans, facility_zone_schedules, player_evaluations, player_injuries, pool_bookings, pool_configurations, pool_schedules, sa_player_documents, sa_pricing_rules, tournaments, training_groups, training_sessions Migration is idempotent — checks column existence before ALTER. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- reservations: added updated_by column (model has autoTrackAuthor=true but column didn't exist) - sa_coaches: academy coaches now default to payment_model='salary' instead of NULL (NOT NULL column) - Also applied column fix directly to live DB via SSH Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
- 31 May, 2026 5 commits
-
-
Mahmoud Aglan authored
Each missing field shows as its own red error banner at the top of the page instead of one long string with invisible newlines. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Client-side: validates ALL mandatory DB fields before allowing next/submit - Step 1: name, phone, gender, date_of_birth (or NID) - Step 2: form_date, join_date - Step 3: membership_value - Step 5: each spouse needs name, DOB/NID, marriage_date, join_date each child needs name, DOB/NID, join_date each temp member needs name, DOB/NID, category - Red border + Arabic error on each missing field, scrolls to first error Server-side: full validation before any DB write - Rejects with clear Arabic messages listing every missing field - No more placeholder dates or fake phone numbers - If anything bypasses JS, server still blocks with human-readable errors Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- spouses: add spouse_order, gender, classification, fallback date_of_birth - children: add child_order, relationship, classification, fallback date_of_birth - temporary_members: fallback date_of_birth, gender - members: phone_mobile defaults to placeholder, date_of_birth fallback - installment_plans: down_payment_receipt cast to string (VARCHAR column) - All dates go through safeDate() — rejects garbage, parses valid formats - All timestamps go through safeTimestamp() — never produces invalid datetime - financial_year '2020/2021' extracted correctly for created_at - bccomp amounts always cast to string to avoid type errors - Null-safe on every optional field — zero room for SQL errors Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- phone_mobile column is NOT NULL; pass empty string instead of null - financial_year '2020/2021' was used directly in created_at datetime; extract first year - Add client-side step validation with red border highlights instead of alert() popups Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
- 30 May, 2026 3 commits
-
-
Mahmoud Aglan authored
Run: php cli.php seed:run Phase_88_001_seed_tournament_bot_players Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
The members table has date_of_birth as NOT NULL, but the wizard passed null when no explicit DOB was entered. Now NationalIdParser extracts DOB and gender from the 14-digit national ID for the main member, spouses, children, and temporary members. If no NID and no DOB provided, returns a clear validation error instead of letting the DB constraint violation propagate. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Fix 5 support ticket bugs: AJAX errors, capacity validation, audit export, player lookup, fee display TKT-59: ExceptionHandler now returns JSON for AJAX/XHR requests instead of HTML error pages. Booking wizard JS improved to show actual error messages. TKT-57: Pricing rule creation now validates group_size_max against the facility unit's max_capacity, preventing over-capacity rules. TKT-46: Added audit log CSV export with all current filters applied. New route GET /audit/export and export button in the filter bar. TKT-55: Player registration member lookup now uses only the DB id (set by AJAX member lookup) instead of ambiguous membership_number/id fallback. National ID field locked when auto-filled from member record. TKT-50: Fee breakdown text now shows base amount and development fee separately (e.g. "اشتراك سنوي: 222.00 + تنمية: 35.00 = 257.00") instead of just the combined total. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
- 24 May, 2026 15 commits
-
-
Mahmoud Aglan authored
Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
The old calculator applied a flat percentage by position (oldest=10%, next=50%, next=100%). The correct model: each year's penalty escalates based on how long THAT SPECIFIC year has been overdue: - Same year past grace (3 months): 10% - 1 year overdue: 50% - 2 years overdue: 100% - 3 years overdue: 200% - 4 years overdue: 300% - 5+ years: membership dropped Also adds: - Grace period rule (SUB_GRACE_MONTHS = 3, extended = 4 with trustees approval) - YEAR_4 (200%) and YEAR_5 (300%) rules in DB - canReinstate() method for 12-month reinstatement window - expireReinstatements() for permanent drop after window expires Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
collectBookData() was only extracting steps for 3 hardcoded sections (membership, sports-activity, treasury) using regex on view files. All other sections (45 of 48) were passed without steps, rendering only subtitle text in the PDF. Now calls TutorialRegistry::getSteps() for every tutorial in every section. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Every tutorial now has 3-7 explicit steps with consistent format: - Navigation step first (how to get to the page) - Action steps in the middle (what to fill/click) - Confirmation/result step last (with success/warning callouts) Sections fixed: parents, medical-board, access-matrix, rules, dashboard, family, transfers-waivers, trainer-portal, parent-portal Also fixed forms.print-form (was 2 steps, now 3). Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Add 84 sub-page screenshots for tutorials (accounting, HR, inventory, procurement, sales, system pages) Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
-
Mahmoud Aglan authored
-
Mahmoud Aglan authored
-
Mahmoud Aglan authored
-
Mahmoud Aglan authored
-
Mahmoud Aglan authored
-
Mahmoud Aglan authored
-
Mahmoud Aglan authored
-
Mahmoud Aglan authored
-
Mahmoud Aglan authored
-
- 23 May, 2026 6 commits
-
-
Mahmoud Aglan authored
-
Mahmoud Aglan authored
-
Mahmoud Aglan authored
-
Mahmoud Aglan authored
-
Mahmoud Aglan authored
-
Mahmoud Aglan authored
-