• Mahmoud Aglan's avatar
    fix(payments): actually update subscription/fine/installment records when paid from process page · 9044313e
    Mahmoud Aglan authored
    The generic payment process page (linked from waiver "الانتقال إلى السداد") was
    recording payments in the payments table but never updating the source records
    (subscriptions.paid_amount, fines.paid_amount, installment_schedule.paid_amount).
    This caused the debt check to keep showing debts as unpaid after payment.
    
    Added handleSubscriptionPayment, handleFinePayment, and handleInstallmentPayment
    methods that mark the underlying records as paid (oldest first).
    
    Also fixed waiver debt check using wrong fines status ('pending' instead of
    'imposed'/'appeal_upheld') which is what fines actually use.
    Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
    9044313e
PaymentController.php 22.6 KB