• Mahmoud Aglan's avatar
    feat(reports): what a player owes and has paid, by birth cohort · 28fc2e02
    Mahmoud Aglan authored
    Every dues report was per invoice, so answering 'how much is on this boy'
    meant adding rows up by eye, and there was no way to ask it of a cohort at
    all — no report anywhere could filter on a date of birth. Two new ones:
    participant_dues totals each player, participant_invoice_history is the
    same money invoice by invoice. Both take a birth-year box, because that is
    how a club talks about its players: مواليد 2015 is a cohort, not a search.
    
    What is owed sums each invoice's stored due_amount floored at zero rather
    than subtracting paid from billed. An overpaid invoice carries a negative
    due_amount, and summing the subtraction would let it cancel another
    invoice's real debt — the report would quietly forgive money.
    
    The birth-year filter reaches invoices → participants → people through
    whereHas rather than a join, so Participant's BranchScope survives the
    subquery and another branch's player cannot be reached by typing their
    membership number into the search box.
    
    Filters are declared in the report config instead of special-cased, and
    the CSV export builds its arguments from the same list. That closes an
    existing divergence: the minimum-absences filter was wired into the page
    and not the export, so filtering the absentees report and downloading it
    gave you the unfiltered one.
    Co-Authored-By: 's avatarClaude Opus 5 (1M context) <noreply@anthropic.com>
    28fc2e02
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...
cash-sessions Loading commit data...
components 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...
parent Loading commit data...
participants Loading commit data...
people Loading commit data...
portal Loading commit data...
pos 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...
requests 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...
branch-switcher.blade.php Loading commit data...
dashboard.blade.php Loading commit data...
global-search.blade.php Loading commit data...