• Mahmoud Aglan's avatar
    feat(installments): add cheque auto-generator with live validation · 69f09d80
    Mahmoud Aglan authored
    - ChequeService: add nextChequeNumber() — sequential from last numeric cheque in DB
    - ChequeController: index() passes planTotal, uploadedTotal, nextChequeNum; storeBatch() validates total coverage + dedup + activates member; store() validates total coverage on final cheque
    - Routes: add POST /installments/{planId}/cheques/batch
    - cheques.php: full rewrite — KPI row, auto-generator panel (JS generates N editable rows from amount+bank+start-date), live total validation bar, submit disabled until total covered, editable-row table with per-row delete, existing cheques table with coverage status, single-upload form retained
    Co-Authored-By: 's avatarClaude Sonnet 4.6 <noreply@anthropic.com>
    69f09d80
cheques.php 26.8 KB