• Mahmoud Aglan's avatar
    Wire all cross-module integrations: events, enforcement, dashboard, scheduled jobs · 101a0f35
    Mahmoud Aglan authored
    Money flows:
    - Payslip paid → double-entry financial transaction (debit salary expense / credit cash)
    - POS sale → inventory movements for tracked products
    - Enrollment → auto-invoice via PricingService
    - Invoice overdue detection enhanced with balance guard
    
    Operational events (previously empty → now wired):
    - AssignmentCreated → generate trainer attendance expectations
    - AssignmentEnded → remove future trainer attendance
    - FacilityStatusChanged → cancel reservations on maintenance
    - PurchaseOrderReceived → create receiving inventory movements
    - StockCountCompleted → process count adjustments
    - KitAssembled → deduct component stock
    - InventoryMovementCreated → check low stock threshold
    
    Business rule enforcement:
    - Medical certificate enforcement at attendance time (configurable)
    - Group capacity check + auto-waitlist on enrollment
    - Participant status blocking (frozen/suspended can't enroll)
    - Attendance threshold from settings (not hardcoded)
    
    Dashboard rebuilt with actionable data:
    - Today's sessions, trainers present, payments, active participants
    - Needs-attention cards (overdue invoices, pending approvals, expired docs)
    - Today's schedule with take-attendance buttons
    - Recent payments feed + quick action buttons
    
    Scheduled jobs:
    - attendance:auto-absent (hourly)
    - documents:expire (daily 06:00)
    - payments:detect-defaults (daily 08:00)
    - attendance:send-alerts (daily 20:00)
    Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
    101a0f35
Name
Last commit
Last update
..
AlertFullGroups.php Loading commit data...
AutoMarkAbsent.php Loading commit data...
CleanupAuditLogs.php Loading commit data...
DeactivateExpiredEnrollments.php Loading commit data...
DetectPaymentPlanDefaults.php Loading commit data...
EnforceAttendanceThresholds.php Loading commit data...
ExpireDocuments.php Loading commit data...
GenerateUpcomingSessions.php Loading commit data...
MarkAutoAbsent.php Loading commit data...
MarkOverdueInvoices.php Loading commit data...
NotifyLowStock.php Loading commit data...
ReconcileFinancials.php Loading commit data...
ReconcileGroupCounts.php Loading commit data...
SendAttendanceAlerts.php Loading commit data...
SendBirthdayGreetings.php Loading commit data...
SendDailySummary.php Loading commit data...
SendExpiringSoonReminders.php Loading commit data...
SendInstallmentReminders.php Loading commit data...
SendOverdueReminders.php Loading commit data...
SendParentWeeklyReport.php Loading commit data...