@extends('layouts.app') @section('title', 'مستحقات المعلمين') @section('content')
FINANCE

مستحقات المعلمين

احتساب عمولات المعلمين بناءً على نسبة الخصم المسجلة في الموارد البشرية

@if (session('success'))
✅ {{ session('success') }}
@endif @unless ($defaultTeacherCashbox)
⚠️ لم يتم تعيين خزنة افتراضية لمستحقات المعلمين — اختر خزنة من هنا
@endunless

المستحقات المعلقة

{{ number_format($pendingPayouts, 2) }} USD

💰
{{-- Teachers Grid --}}
@foreach ($teachers as $t) @endforeach
{{-- Payouts Table --}}

📋 سجل مستحقات المعلمين

@forelse ($teacherPayouts as $p) @empty @endforelse
المعلمالدورةالطلابسعر الدورةالنسبةالمبيعاتمستحق المعلمصافي الإيرادالحالة
{{ $p->teacher_name ?? '—' }} {{ $p->course_name }} {{ $p->student_count }} {{ number_format($p->course_price, 2) }} {{ $p->cut_percent }}% {{ number_format($p->student_count * $p->course_price, 2) }} {{ number_format($p->amount, 2) }} {{ number_format(($p->student_count * $p->course_price) - $p->amount, 2) }} {{ $p->status === 'pending' ? 'معلق' : 'مدفوع' }} @if ($p->status === 'pending')
@csrf
@endif
لا توجد مستحقات
@if (method_exists($teacherPayouts, 'links'))
{{ $teacherPayouts->links() }}
@endif
{{-- Add Modal --}} @endsection @push('scripts') @endpush