• 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
Screenshots Loading commit data...
app Loading commit data...
bootstrap Loading commit data...
config Loading commit data...
database Loading commit data...
docker Loading commit data...
docs Loading commit data...
docs-site Loading commit data...
gap-filling-plans Loading commit data...
marketing-site Loading commit data...
plans Loading commit data...
public Loading commit data...
reference/oc-sport Loading commit data...
resources Loading commit data...
routes Loading commit data...
scripts Loading commit data...
storage Loading commit data...
tests Loading commit data...
.dockerignore Loading commit data...
.editorconfig Loading commit data...
.env.example Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.npmrc Loading commit data...
Beanding Guide.txt Loading commit data...
CLAUDE.md Loading commit data...
Dockerfile Loading commit data...
README.md Loading commit data...
artisan Loading commit data...
captain-definition Loading commit data...
composer.json Loading commit data...
composer.lock Loading commit data...
deploy.sh Loading commit data...
elcaptain-sportsonly-db.md Loading commit data...
one-click-app.yml Loading commit data...
package-lock.json Loading commit data...
package.json Loading commit data...
phpunit.xml Loading commit data...
system info.txt Loading commit data...
vite.config.js Loading commit data...
نادى الشيخ زايد كشف بيانات اللاعبين (2).html Loading commit data...