@extends('layouts.master') @section('title', 'Statistics | Proxima - Medical Management app') @section('title-topbar', 'Statistics') @section('css') @endsection @section('content')
Dashboard | Invoice | Day invoices
@if (request()->live_report) @else @endif
Income invoices
@php $total_income = 0; @endphp @foreach ($invoice_income as $item) @if ($item->payment_method == 1) @php $payment_method_txt = __('basic.cash'); @endphp @elseif ($item->payment_method == 2) @php $payment_method_txt = __('basic.visa'); @endphp @elseif ($item->payment_method == 3) @php $payment_method_txt = __('basic.online'); @endphp @elseif ($item->payment_method == 4) @php $payment_method_txt = __('basic.bank transfer'); @endphp @elseif ($item->payment_method == 5) @php $payment_method_txt = __('basic.mobile transfer'); @endphp @else @php $payment_method_txt = ''; @endphp @endif @endforeach
Date Total Cat Items Description Discount Method Patient Branch
{{ date('d M', strtotime($item->paid_date)) }} @if ($item->status == 2 && $item->deposit_amount == null) @php $total_income += $item->total_paid; @endphp {{ $item->total_paid }} EGP @elseif ($item->status == 2 && $item->deposit_amount !== null) @if ($item->deposit_date === $date) @php $total_income += $item->deposit_amount; @endphp {{ $item->deposit_amount }} EGP
out of {{ $item->final_price }}
{{ __('basic.pending') }}
@else @php $total_income += $item->total_paid - $item->deposit_amount; @endphp {{ $item->total_paid - $item->deposit_amount }} EGP
{{ $item->deposit_amount }} depost paid on {{ date('d M', strtotime($item->deposit_date)) }}
@endif @elseif ($item->status == 1) @php $total_income += $item->deposit_amount; @endphp {{ $item->deposit_amount }} EGP
out of {{ $item->final_price }}
{{ __('basic.pending') }}
@endif
{{ $item->service_inv_cat->name }} @foreach ($item->invoice_items as $item_items) {{ $item_items->categorizable->name }} | @endforeach {{ $item->note }} @if ($item->worker)
shift: {{ $item->worker->name }}
@endif
@if ($item->discount) {{ $item->discount }} EGP
on {{ $item->items_price }} egp
@else @endif
{{ $payment_method_txt }} @if ($item->receivable) {{ $item->receivable->name }} @else {{ __('patientappo.no receiver') }} @endif {{ $item->branch->name }}
TOTAL {{ $total_income }} EGP
Expenses invoices
@php $total_expenses = 0; @endphp @foreach ($invoice_expenses as $item) @if ($item->payment_method == 1) @php $payment_method_txt = __('basic.cash'); @endphp @elseif ($item->payment_method == 2) @php $payment_method_txt = __('basic.visa'); @endphp @elseif ($item->payment_method == 3) @php $payment_method_txt = __('basic.online'); @endphp @elseif ($item->payment_method == 4) @php $payment_method_txt = __('basic.bank transfer'); @endphp @elseif ($item->payment_method == 5) @php $payment_method_txt = __('basic.mobile transfer'); @endphp @else @php $payment_method_txt = ''; @endphp @endif @endforeach
Date Total Cat Items Description Discount Method Receiver Branch
{{ date('d M', strtotime($item->paid_date)) }} @if ($item->status == 2 && $item->deposit_amount == null) @php $total_expenses += $item->total_paid; @endphp {{ $item->total_paid }} EGP @elseif ($item->status == 2 && $item->deposit_amount !== null) @if ($item->deposit_date === $date) @php $total_expenses += $item->deposit_amount; @endphp {{ $item->deposit_amount }} EGP
out of {{ $item->final_price }}
{{ __('basic.pending') }}
@else @php $total_expenses += $item->total_paid - $item->deposit_amount; @endphp {{ $item->total_paid - $item->deposit_amount }} EGP
{{ $item->deposit_amount }} depost paid on {{ date('d M', strtotime($item->deposit_date)) }}
@endif @elseif ($item->status == 1) @php $total_expenses += $item->deposit_amount; @endphp {{ $item->deposit_amount }} EGP
out of {{ $item->final_price }}
{{ __('basic.pending') }}
@endif
{{ $item->service_inv_cat->name }} @foreach ($item->invoice_items as $item_items) {{ $item_items->categorizable->name }} | @endforeach {{ $item->note }} @if ($item->worker) | shift: {{ $item->worker->name }} @endif @if ($item->discount) {{ $item->discount }} EGP
on {{ $item->items_price }} egp
@else @endif
{{ $payment_method_txt }} @if ($item->receivable) {{ $item->receivable->name }} @else {{ __('patientappo.no receiver') }} @endif {{ $item->branch->name }}
TOTAL {{ $total_expenses }} EGP
Income totals cat
@foreach ($income_details_cat as $item) @endforeach
Name Total
TOTAL {{ $income_details_cat->sum('sums') }} EGP
{{ $item->service_inv_cat->name }} {{ $item->sums }} EGP
Expenses totals cat
@foreach ($expenses_details_cat as $item) @endforeach
Name Total
TOTAL {{ $expenses_details->sum('sums') }} EGP
{{ $item->service_inv_cat->name }} {{ $item->sums }} EGP
Income totals by items chart
income totals
Expenses totals by items chart
Expenses totals
@role('Super-admin|Operation')
Operation income invoices
@foreach ($invoice_oper_income as $item) @if ($item->payment_method == 1) @php $payment_method_txt = __('basic.cash'); @endphp @elseif ($item->payment_method == 2) @php $payment_method_txt = __('basic.visa'); @endphp @elseif ($item->payment_method == 3) @php $payment_method_txt = __('basic.online'); @endphp @elseif ($item->payment_method == 4) @php $payment_method_txt = __('basic.bank transfer'); @endphp @elseif ($item->payment_method == 5) @php $payment_method_txt = __('basic.mobile transfer'); @endphp @else @php $payment_method_txt = ''; @endphp @endif @endforeach
Date Total Cat Items Description Discount Method Patient Branch
TOTAL {{ $invoice_oper_income->sum('total_paid') }} EGP
{{ date('d M', strtotime($item->paid_date)) }} @if ($item->status == 1) {{ $item->total_paid }} EGP
out of {{ $item->final_price }}
{{ __('basic.pending') }}
@else {{ $item->total_paid }} EGP @endif
{{ $item->service_inv_cat->name }} @foreach ($item->invoice_items as $item_items) {{ $item_items->categorizable->name }} | @endforeach {{ $item->note }} @if ($item->worker)
shift: {{ $item->worker->name }}
@endif
@if ($item->discount) {{ $item->discount }} EGP
on {{ $item->items_price }} egp
@else @endif
{{ $payment_method_txt }} @if ($item->receivable) {{ $item->receivable->name }} @else {{ __('patientappo.no receiver') }} @endif {{ $item->branch->name }}
Operation expenses invoices
@foreach ($invoice_oper_expenses as $item) @if ($item->payment_method == 1) @php $payment_method_txt = __('basic.cash'); @endphp @elseif ($item->payment_method == 2) @php $payment_method_txt = __('basic.visa'); @endphp @elseif ($item->payment_method == 3) @php $payment_method_txt = __('basic.online'); @endphp @elseif ($item->payment_method == 4) @php $payment_method_txt = __('basic.bank transfer'); @endphp @elseif ($item->payment_method == 5) @php $payment_method_txt = __('basic.mobile transfer'); @endphp @else @php $payment_method_txt = ''; @endphp @endif @endforeach
Date Total Cat Items Description Discount Method Patient Branch
TOTAL {{ $invoice_oper_expenses->sum('total_paid') }} EGP
{{ date('d M', strtotime($item->paid_date)) }} @if ($item->status == 1) {{ $item->total_paid }} EGP
out of {{ $item->final_price }}
{{ __('basic.pending') }}
@else {{ $item->total_paid }} EGP @endif
{{ $item->service_inv_cat->name }} @foreach ($item->invoice_items as $item_items) {{ $item_items->categorizable->name }} | @endforeach {{ $item->note }} @if ($item->worker)
shift: {{ $item->worker->name }}
@endif
@if ($item->discount) {{ $item->discount }} EGP
on {{ $item->items_price }} egp
@else @endif
{{ $payment_method_txt }} @if ($item->receivable) {{ $item->receivable->name }} @else {{ __('patientappo.no receiver') }} @endif {{ $item->branch->name }}
@endrole
Income Expenses
Net Income
@php $profit = $total_income - $total_expenses; @endphp {{ $profit }} EGP
@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', '#dc3545', '#51b24b', '#a94bb2', '#4b8bb2', '#57b24b', '#a5b24b', '#b2804b', '#b24b4b', '#834bb2', '#b24b6a', '#574bb2', '#236368', '#232c68', '#682345', '#4b2368', '#234b68', '#306823', '#a39f39', '#a239a3', '#a33963', '#a33951', '#a33939', '#c73737', '#6837c7']; @endphp @endsection