@extends('reports.pdf.layout') @section('content')

Doctor Performance Report

Generated {{ now()->format('d M Y H:i') }}

@foreach($doctors as $d) @php($total=(int)$d->appointments_count) @php($completed=(int)$d->completed_appointments) @endforeach
DoctorSpecialtyTotalCompletedCancelledCompletionRevenue
{{ $d->user?->name }}{{ $d->specialty?->name }}{{ $total }}{{ $completed }}{{ $d->cancelled_appointments }}{{ $total ? number_format(($completed/$total)*100,2) : '0.00' }}%₹ {{ number_format((float)($doctorRevenue[$d->id] ?? 0),2) }}
@endsection