1. 22 Aug, 2026 1 commit
    • Mahmoud Aglan's avatar
      Fix subscription payment status: only check program fee, not all invoices · 435aeddb
      Mahmoud Aglan authored
      The group view was marking players as "unpaid" if they had ANY unpaid
      invoice (products, etc.), even if their program subscription was fully paid.
      
      Now the logic only checks:
      1. Enrollment payment_status (paid/waived = done)
      2. Enrollment's linked invoice status
      3. Recent subscription invoice with matching program name
      
      Also fixed ActivateEnrollmentOnPayment listener to properly set
      payment_status='paid' on enrollments when subscription invoice is paid
      (was only activating status, not updating payment_status).
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      435aeddb
  2. 20 Aug, 2026 1 commit
    • Mahmoud Aglan's avatar
      Add group payment/product stats + fix WithSorting trait conflict · 521f6d7b
      Mahmoud Aglan authored
      - Group view: added KPI cards for paid/unpaid/free player counts
      - Group view: added essential product purchase stats with progress bars
      - Group view: added installment info column per player in enrollments tab
      - Fixed PHP 8.2+ trait property conflict: removed $sortBy/$sortDir
        redeclarations from 13 Livewire components that use WithSorting trait,
        moved custom defaults to mount() instead
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      521f6d7b
  3. 19 Aug, 2026 3 commits
  4. 16 Aug, 2026 2 commits
  5. 15 Aug, 2026 1 commit
  6. 13 Aug, 2026 6 commits
    • Mahmoud Aglan's avatar
      Add file attachment to expenses (proof/receipt upload) · e891ce11
      Mahmoud Aglan authored
      - New migration: attachment_path + attachment_name columns on expenses
      - ExpenseForm uses WithFileUploads trait, accepts jpg/png/webp/pdf up to 5MB
      - Drag-drop upload zone in the form with preview of attached file name
      - Files stored in storage/app/public/expenses/
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      e891ce11
    • Mahmoud Aglan's avatar
      Auto-regenerate attendance records when participant reactivated · af0946b7
      Mahmoud Aglan authored
      When a participant goes from suspended/frozen/inactive → active,
      the listener now regenerates expected attendance records for all
      their active enrollments' future sessions.
      
      Previously, reactivated participants were invisible in attendance
      because records were only generated at session creation time.
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      af0946b7
    • Mahmoud Aglan's avatar
      Fix POS payment collection + retroactive wizard reliability · 86da35b4
      Mahmoud Aglan authored
      Payment Collection (CollectPaymentWizard):
      - Remove branch filter from participant search (POS sells cross-branch)
      - Include Draft status in outstanding invoice query
      - Add invoice search mode (search by invoice number/contact name)
      - Allow walk-in invoices to be found and paid directly
      - Accept inactive/frozen/registered participants (not just active)
      
      Retroactive Enrollment Wizard:
      - Fix "paid outside system" to use PaymentService (creates proper Payment
        + Transaction records for financial reports)
      - Add server-side validation in confirm() before DB transaction
      - Add national_id duplicate check to prevent duplicate participants
      - Add price=0 guard (show error if no base price and no override)
      - Fix rounding loss: remainder goes to last month's invoice
      - Pass skip_auto_invoice to prevent double invoice creation
      
      POS Partial Payment:
      - Enable allows_partial_payment on all existing products (migration)
        so the deposit/partial payment UI appears at checkout
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      86da35b4
    • Mahmoud Aglan's avatar
      Add financial quick-links: invoices, POS history, expenses list · f1f30cc6
      Mahmoud Aglan authored
      All financial-related pages are now reachable from the Financial Overview
      via quick-action buttons with proper permission gates.
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      f1f30cc6
    • Mahmoud Aglan's avatar
      Add sales receipts tab to product detail page · eb96c326
      Mahmoud Aglan authored
      Shows all POS receipts (RCP-*) containing this product with: receipt
      number, customer, total, payment status, method, cashier, date.
      Each receipt has a print link and invoice link for further actions.
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      eb96c326
    • Mahmoud Aglan's avatar
      Redesign branch switcher: bold dropdown with pin/lock feature · e3750618
      Mahmoud Aglan authored
      - Prominent button with colored border (amber pulse when unpinned, green when pinned)
      - Dropdown with branch list, selected indicator, and pin status
      - Pin icon shows when branch is locked
      - Selecting a branch auto-pins it (persists across logout/login)
      - Unpin button available to release the lock
      - Visual hint text explains pin behavior
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      e3750618
  7. 10 Aug, 2026 2 commits
  8. 09 Aug, 2026 11 commits
  9. 08 Aug, 2026 1 commit
  10. 06 Aug, 2026 1 commit
  11. 05 Aug, 2026 3 commits
  12. 04 Aug, 2026 6 commits
  13. 03 Aug, 2026 1 commit
    • Mahmoud Aglan's avatar
      Financial overview: detailed revenue breakdown + unpaid highlight in attendance · 3a69923d
      Mahmoud Aglan authored
      1. Financial Overview: add subscription vs product revenue split, top programs
         by revenue, per-product totals, and 12 key financial metrics (churn rate,
         avg revenue per participant, profit margin, avg days to collect, etc.)
         All respect the existing period + branch filters.
      
      2. Attendance views (TakeAttendance + QuickAttendance): detect participants
         with unpaid invoices or overdue renewals and highlight them in red with
         "غير مدفوع" badge so trainers can see payment status at a glance.
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      3a69923d
  14. 02 Aug, 2026 1 commit