• Mahmoud Aglan's avatar
    fix(roster): count the registration money however the receptionist typed it · fa06830c
    Mahmoud Aglan authored
    The قيد column asked the database one question — is there an invoice line
    carrying this product's itemable morph? That is how the POS writes a sale
    and not how most of this money was collected. A receptionist taking the
    first instalment types "القسط الاول من القيد" into a free-text line; the
    player has paid, and the roster called him a non-buyer. On OC-Sport that
    is fourteen lines across nine players, every one of whom had paid.
    
    BundledProductLine reads those lines the way SubscriptionLine reads
    subscription ones: over whole normalised words, matched against the words
    that identify the product and nothing else. "قيد اشتراك فريق اتحاد الكرة"
    is identified by قيد and اتحاد — اشتراك heads half the subscription lines
    in the same ledger and فريق is how the programmes are named, so any word
    appearing in a programme name is dropped as unable to tell the two apart.
    A line that names nothing at all ("القسط الاول") is attributed only where
    it can be: the programme requires exactly one product and the invoice pays
    for no training, so there is one thing here paid in instalments and that
    is what it is paying off.
    
    The column now shows the money rather than a yes/no: paid so far against
    what is owed, "أقساط" while it is being paid off, "مدفوع بالكامل" once it
    is settled. What is owed comes from the product line when there is one —
    that price was agreed and frozen at the sale. Money typed by hand is only
    the instalments taken so far, so 2,500 of 2,500 would call a third of a
    card paid in full; there the total is the product's price for this
    member's tier, marked ≈ and explained in the cell's title.
    
    Two matching consequences: instalment wording no longer counts as
    subscription (training is billed by the month here, so a bare "القسط
    الاول" made a player who had paid 2,500 toward his card read as having
    paid for July's training), and free players no longer inflate the header's
    "بدون" count — they are exempt from the bundle, and the cell already says
    so with a dash.
    
    Verified against a restored OC-Sport tenant: all six فريق rosters render,
    the reported player (عبدالله أحمد صلاح سيد) now reads 2,500 / 8,000 ≈
    (31%) أقساط instead of "لم يشترِ", and every hand-typed payer is counted.
    271 tests pass.
    Co-Authored-By: 's avatarClaude Opus 5 (1M context) <noreply@anthropic.com>
    fa06830c
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...
flutter_shell Loading commit data...
gap-filling-plans Loading commit data...
lang 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...