@extends('layouts.app') @section('title', 'إدارة الأطباء') @section('page_title', 'إدارة الأطباء') @section('content')
إجمالي الأطباء
أطباء جدد هذا الشهر
أطباء نشطون اليوم
متوسط المواعيد لكل طبيب
| الاسم | رقم الهاتف | البريد الإلكتروني | التخصص | المواعيد | المرضى | السجلات الطبية | تاريخ الانضمام | الحالة | سعر الكشف | سعر المتابعة | نسبة العمولة | مستحقات الشهر | الإجراءات |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
د. {{ $doctor->name }}
|
{{ $doctor->mobile }} | {{ $doctor->email ?? '-' }} | {{ $doctor->specialization ? $doctor->specialization : 'طب عام' }} | {{ \App\Models\Appointment::where('doctor_id', $doctor->id)->count() }} | {{ \App\Models\Appointment::where('doctor_id', $doctor->id)->distinct('patient_id')->count() }} | {{ \App\Models\MedicalRecord::where('doctor_id', $doctor->id)->count() }} | {{ $doctor->created_at->format('Y-m-d') }} | نشط | {{ isset($doctor->checkup_cost) ? number_format($doctor->checkup_cost, 2) . ' ج.م' : '-' }} | {{ isset($doctor->followup_cost) ? number_format($doctor->followup_cost, 2) . ' ج.م' : '-' }} | {{ $doctor->commission_percentage ? rtrim(rtrim(number_format($doctor->commission_percentage, 2, '.', ''), '0'), '.') . '%' : '-' }} | @php $monthStart = now()->startOfMonth(); $monthEnd = now()->endOfMonth(); $paidSum = \App\Models\Appointment::where('doctor_id', $doctor->id) ->where('payment_status', 'paid') ->whereBetween('appointment_date', [$monthStart, $monthEnd]) ->sum('cost'); $commission = $doctor->commission_percentage ? ($paidSum * ($doctor->commission_percentage/100)) : 0; @endphp {{ number_format($commission, 2) }} ج.م |
|