• Claude's avatar
    Itemise financial expenses and stop double-counting refunds · 99c1d2b6
    Claude authored
    Three separate defects made the financial figures wrong.
    
    1. Refunds were counted as revenue. Eighteen queries summed payments on
       status='confirmed' with no direction filter, so outbound refunds were
       added to income across the dashboard, the revenue/product/subscription
       widgets, the financial report, the print report and ReportService.
       That inflated revenue by 40,048 EGP all-time, 32,510 this month.
    
    2. Refunds were simultaneously counted as an expense. The refunded
       original already drops out of revenue when its status becomes
       'refunded', so adding the outbound payment to expenses deducted the
       same money a second time. Refunds are now contra-revenue: the revenue
       card shows gross collected, refunds, and the net, and the expense side
       no longer includes them.
    
    3. Expenses were presented as vague lumps, the worst being "مدفوعات أخرى"
       — which was in fact customer refunds. The breakdown is now one line
       per real cost (payroll, facility rent, purchases, and each expense
       category separately), sorted by size, each stating where it comes
       from.
    
    Payroll was missing from expenses entirely; approved and paid payslips
    plus trainer compensation are now included, scoped by branch through the
    trainer's employee record.
    Co-Authored-By: 's avatarClaude Opus 5 <noreply@anthropic.com>
    99c1d2b6
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...