@extends('layouts.master') @section('title', 'Statistics | Proxima - Medical Management app') @section('title-topbar', 'Statistics') @section('css') @endsection @section('fixedcontent') @if (Session::has('success'))

Sent Successfully

{{ Session::get('success') }}

@endif @if (Session::has('error_delete'))

Can not be deleted

{{ Session::get('error_delete') }}

@endif @endsection @section('content')
Dashboard | Day pulses
@if (Auth::user()->branch_id == 0)
@endif
@if (request()->live_report) @else @endif
{{ __('basic.total pulses') }}
@php //$profit = $all_pulses->sum('total_paid') - $all_pulses->sum('total_paid'); @endphp {{ $all_pulses->sum('used_pulses') }} ps
Machine records
New Record
@if (count($machine_recs_total_pulses) > 0) @foreach ($machine_recs_total_pulses as $item)
{{ $item->record->machine->name }}
branch

{{ $item->record->machine->branch->name }}

Doctor

{{ $item->record->doctor->name }}

Beginning

{{ $item->record->beginning }} ps

Ending

{{ $item->record->ending }} ps

Total

@php $total_machin = $item->record->ending - $item->record->beginning; @endphp {{ $total_machin }} ps

Used

{{ $item->used }} ps

@if ($item->used == $total_machin) @php $total_machin_color = 'done-color-btn'; @endphp @else @php $total_machin_color = 'cancel-color-btn'; @endphp @endif
Difference

{{ $item->used - $total_machin }} ps

@endforeach @else

Nothing to show

@endif
All machine pulses today
@foreach ($machine_pulses as $item) @endforeach
Name Total
TOTAL {{ $all_pulses->sum('used_pulses') }} ps
{{ $item->machine->name }} {{ $item->total }} ps
All Machine pulses today chart
Machine pulses chart
All Pulses
@foreach ($all_pulses as $item) @if ($item->type == 0) @php $text_color = 'active-color-btn'; $msg = __('patientappo.session'); @endphp @elseif ($item->type == 1) @php $text_color = 'done-color-btn'; $msg = __('basic.money per pulse'); @endphp @elseif ($item->type == 2) @php $text_color = 'prog-color-btn'; $msg = __('basic.session package'); @endphp @elseif ($item->type == 3) @php $text_color = 'not_accepted-color-btn'; $msg = __('basic.pulses package'); @endphp @elseif ($item->type == 4) @php $text_color = 'pend-color-btn'; $msg = __('basic.free session'); @endphp @endif @if ($item->invoice_item) @if ($item->invoice_item->invoice->status == 0) @php $text_color_invoice = 'cancel-color-btn'; $msg_invoice = __('basic.not paid'); @endphp @elseif ($item->invoice_item->invoice->status == 1) @php $text_color_invoice = 'pend-color-btn'; $msg_invoice = __('basic.pending'); @endphp @elseif ($item->invoice_item->invoice->status == 2) @php $text_color_invoice = 'prog-color-btn'; $msg_invoice = __('basic.installment'); @endphp @elseif ($item->invoice_item->invoice->status == 3) @php $text_color_invoice = 'done-color-btn'; $msg_invoice = __('basic.paid'); @endphp @elseif ($item->invoice_item->invoice->status == 4) @php $text_color_invoice = 'cancel-color-btn'; $msg_invoice = __('basic.refund'); @endphp @endif @php $invoice_url = 'href=' . route("sett.invoice.show", $item->invoice_item->invoice->id); @endphp @else @php $text_color_invoice = 'done-color-btn'; $msg_invoice = __('basic.from package'); $invoice_url = ''; @endphp @endif @endforeach
{{ __('basic.date') }} {{ __('basic.type') }} {{ __('basic.name') }} {{ __('basic.patient') }} {{ __('basic.machine') }} {{ __('basic.doctor') }} {{ __('patientappo.pay status') }} {{ __('basic.fluence') }} {{ __('basic.pulse area') }} {{ __('basic.spot size') }} {{ __('basic.balance before session') }} {{ __('basic.used pulses') }} {{ __('basic.package') }}
TOTAL {{ $all_pulses->sum('used_pulses') }} ps
{{ date('d M Y', strtotime($item->date)) }} {{ $msg }} @if ($item->service_item) {{ $item->service_item->name }} @else Taken from package @endif {{ $item->patient->name }} {{ $item->machine->name }} {{ $item->doctor->name }} {{ $msg_invoice }} {{ $item->fluence }} @if ($item->pulse_area) @foreach ($item->pulse_area as $pulse_area) {{ $pulse_area->name .','}} @endforeach @else @endif {{ $item->spot_size }} {{ $item->balance_before_session }} {{ $item->used_pulses }} @if ($item->package) {{ $item->package->service_item->name }} {{ $item->package->date }} @else No package @endif
All doctor pulses today
@foreach ($doctor_pulses as $item) @endforeach
Name Total
TOTAL {{ $all_pulses->sum('used_pulses') }} ps
{{ $item->doctor->name }} {{ $item->total }} ps
All doctor pulses today chart
Doctor pulses chart
@endsection @section('js') @php $chart_color = ['#1a78f1', '#38dfa8', '#d13c62', '#12c7d9', '#03c2c3', '#5035df', '#17a673', '#2e59d9', '#9aeded', '#f3d56a', '#7c859d', '#a4adc5', '#80142f', '#33d293', '#bed233', '#3958e9', '#10c86f', '#654fb6', '#a44fb6', '#89728e', '#c85110', '#6d769d', '#1b6954', '#204494', '#94206b', '#948320', '#209493', '#292094', '#203a65', '#4e6fa5', '#e29031', '#e23168', '#31e0e2', '#e29131', '#319fe2', '#8131e2', '#31a8e2', '#31e2c0', '#31c3e2', '#e2a931', '#3157e2']; @endphp @endsection