{{-- DTHospital - doctor share report, approval and payout. Copyright (c) ICT Innovations Part of DTHospital Licensed under the GNU General Public License v3.0. --}} @extends('layouts.master') @section('content') @include('app.partials._alerts') @php($canApprove = \App\Support\Permissions::allows('doctor_share_approve'))

Doctor share report

@if ($byDoctor->isNotEmpty()) @foreach ($byDoctor as $id => $t) @endforeach
DoctorPendingApprovedPaidHospital keeps
{{ $doctorNames[$id] ?? $id }}{{ number_format($t['pending'], 2) }}{{ number_format($t['approved'], 2) }}{{ number_format($t['paid'], 2) }}{{ number_format($t['hospital'], 2) }}
@endif
{{ csrf_field() }}
@if ($canApprove)@endif @forelse ($shares as $s) @php($settled = $s->invoice && $s->invoice->balance() <= 0.004) @if ($canApprove)@endif @empty @endforelse @if ($shares->isNotEmpty()) @endif
InvoiceDatePatientServiceDoctorType Base%ShareInvoiceShare status
#{{ $s->payment_id }} {{ optional($s->invoice)->date }} {{ optional($s->invoice)->patient_name }} {{ optional($s->item)->name }} {{ $doctorNames[$s->doctor_id] ?? $s->doctor_id }} {{ ucfirst($s->role) }} {{ number_format((float) $s->base_amount, 2) }} {{ rtrim(rtrim($s->percent, '0'), '.') }} {{ number_format((float) $s->amount, 2) }} {!! $settled ? 'Paid' : 'Unpaid' !!} {{ ucfirst($s->status) }}{{ $s->payout_ref ? ' (' . $s->payout_ref . ')' : '' }}
No shares in this range. Shares appear when an invoice is raised for a doctor who is on a share policy.
Total{{ number_format($shares->sum('amount'), 2) }}
@if ($canApprove && $shares->isNotEmpty())

Only shares on invoices paid in full can be approved. Paying writes one expense per doctor to Accounting under "Doctor share".

@endif
@stop