• Mahmoud Aglan's avatar
    feat(groups): show per-product ownership and real amounts paid · b6fd3fb7
    Mahmoud Aglan authored
    A programme can now bundle products it requires (program_products), so
    the group view can answer "who has not bought their registration card"
    — which nothing in the system could express before. products.is_essential
    is global; this is per-programme.
    
    Each bundled product gets its own column: bought or not, a progress bar,
    and the amount settled against the amount billed. Instalments fall out
    of this for free rather than needing their own column.
    
    Reading a payment off a line is not possible here — a subscription and a
    registration card routinely share one invoice. ParticipantBillingService
    allocates each payment across the lines it covers, pro rata on
    subtotal_amount, rounding down so the remainder stays unallocated rather
    than inventing money. Allocation is capped at the amount billed: a
    payment settles total_amount, which also carries tax and fees, so paying
    in full would otherwise allocate over 100% of a line. Verified against
    production — no invoice over-allocates.
    
    The payment column now shows the amount paid rather than a bare "paid",
    with مجاني for free players and لم يدفع for unpaid, and participants
    carry their عضو / غير عضو tag. The enrolment-date column is gone.
    Total collected is shown to users with invoices.list.
    
    The bundling migration is conditional: it acts only where an academy has
    both an active product named قيد and programmes named فريق. Elsewhere it
    does nothing, which is what makes it safe for every tenant. On oc-sport
    that is exactly one product across 12 programmes.
    Co-Authored-By: 's avatarClaude Opus 5 (1M context) <noreply@anthropic.com>
    b6fd3fb7
Name
Last commit
Last update
..
Activities Loading commit data...
Admin Loading commit data...
Assignments Loading commit data...
Attendance Loading commit data...
Audit Loading commit data...
Auth Loading commit data...
Branches Loading commit data...
CashSessions Loading commit data...
Components Loading commit data...
Concerns Loading commit data...
Dashboard Loading commit data...
Documents Loading commit data...
Enrollments Loading commit data...
Evaluations Loading commit data...
Events Loading commit data...
Facilities Loading commit data...
Financial Loading commit data...
Groups Loading commit data...
Guardian Loading commit data...
HR Loading commit data...
Inventory Loading commit data...
Invoices Loading commit data...
Messaging Loading commit data...
Notifications Loading commit data...
POS Loading commit data...
Parent Loading commit data...
Participants Loading commit data...
People Loading commit data...
Pricing Loading commit data...
Profile Loading commit data...
Programs Loading commit data...
Public Loading commit data...
Receptionist Loading commit data...
Reports Loading commit data...
Roles Loading commit data...
Schedule Loading commit data...
Settings Loading commit data...
Trainer Loading commit data...
Training Loading commit data...
Users Loading commit data...
Wallets Loading commit data...
Website Loading commit data...
WhatsApp Loading commit data...
Wizards Loading commit data...
BranchSwitcher.php Loading commit data...
Dashboard.php Loading commit data...
GlobalSearch.php Loading commit data...