{{-- Profit rows per clinic or per doctor. Params: $rows, $kind (clinic|doctor), $totals. --}} @php($money = fn ($amount) => number_format((float) $amount, 2)) @if (collect($rows)->isEmpty())
| {{ $kind === 'clinic' ? trans('clinic.reports_center.clinic') : trans('clinic.doctors.title') }} | {{ trans('clinic.doctors.earning_bookings') }} | {{ trans('clinic.doctors.total_price') }} | {{ trans('clinic.reports_center.doctors_shares') }} | {{ trans('clinic.reports_center.profit') }} | {{ trans('clinic.reports_center.share_of_profit') }} |
|---|---|---|---|---|---|
|
@if ($kind === 'clinic')
{{ $row['model']?->name ?? '—' }}
{{ $row['model']?->branch?->name }}
@else
@if ($row['model'])
{{ $row['model']->name }}
{{ $row['model']->specialty?->name }}
@else
—
@endif
@endif
|
{{ $row['bookings'] }} | {{ $money($row['revenue']) }} | {{ $money($row['doctor_share']) }} | {{ $money($row['center_share']) }} |
{{ $share }}%
|