@extends('layouts.master') @section('title', 'Statistics | Proxima - Medical Management app') @section('title-topbar', 'Statistics') @section('css') @endsection @section('content')
Dashboard | Invoice | Month invoices
Income invoices
@role('Super-admin|Accountant') @endrole @foreach ($invoice_income_inv as $item) @role('Super-admin|Accountant') @endrole @endforeach @role('Super-admin|Accountant') @endrole
Status TotalCostCat Items Description Discount Receptionist Patient Doctor Branch Date-Time
@if ($item->status == 1) @php $status = 'pend-color-btn'; $status_msg = __('basic.pending'); @endphp @elseif ($item->status == 2) @php $status = 'prog-color-btn'; $status_msg = __('basic.installment'); @endphp @elseif ($item->status == 3) @php $status = 'done-color-btn'; $status_msg = __('basic.paid'); @endphp @elseif ($item->status == 4) @php $status = 'cancel-color-btn'; $status_msg = __('basic.refund'); @endphp @endif
{{ $status_msg }}
@foreach ($item->payment as $item_p) @if ($item_p->method == 1) @php $payment_method_txt = __('basic.cash'); @endphp @elseif ($item_p->method == 2) @php $payment_method_txt = __('basic.visa'); @endphp @endif {{ $item_p->amount }} EGP
via {{ $payment_method_txt }} | shift: {{ $item_p->worker->name }}
at {{ date('d M Y', strtotime($item_p->paid_date)) }}
@endforeach
{{ $item->total_cost }}{{ $item->service_inv_cat->name }} @foreach ($item->invoice_items as $item_items) @if ($item_items->categorizable) {{ $item_items->categorizable->name }} | @else No Items @endif @endforeach {{ $item->note }} @if ($item->discount) {{ $item->discount }} EGP
on {{ $item->items_price }} EGP
@else @endif
@php $workers = []; @endphp @foreach ($item->payment as $item_p) @if (!in_array($item_p->worker->name,$workers)) @php $workers[] = $item_p->worker->name @endphp @endif @endforeach @foreach ($workers as $worker) {{$worker}}
@endforeach
@if ($item->receivable) {{ $item->receivable->name }} @else {{ __('patientappo.no receiver') }} @endif @php $doctors = []; @endphp @foreach ($item->invoice_items as $item_items) @if ($item_items->doctor->name ?? '') @if (!in_array($item_items->doctor->name ,$doctors)) @php $doctors[] = $item_items->doctor->name @endphp @endif @endif @endforeach @if (!$doctors) No Doctor Assigned @endif @foreach ($doctors as $doctor) {{$doctor}}
@endforeach
{{ $item->branch->name }} @foreach ($item->payment as $item_p) {{$item_p->paid_date}}
@endforeach
TOTAL {{ $total_income = $total_income_cash + $total_income_visa }} EGP Cash {{ $total_income_cash }} EGP Credit {{ $total_income_visa }} EGP Cost {{ $invoice_income_inv->sum('total_cost') }} EGP
{{-- $invoice_income_inv->appends(request()->input())->links() --}}
Expenses invoices
@foreach ($invoice_expenses_inv as $item) @endforeach
Status Total Cost Cat Items Description Discount Receptionist Patient Doctor Branch Date-Time
@if ($item->status == 1) @php $status = 'pend-color-btn'; $status_msg = __('basic.pending'); @endphp @elseif ($item->status == 2) @php $status = 'prog-color-btn'; $status_msg = __('basic.installment'); @endphp @elseif ($item->status == 3) @php $status = 'done-color-btn'; $status_msg = __('basic.paid'); @endphp @elseif ($item->status == 4) @php $status = 'cancel-color-btn'; $status_msg = __('basic.refund'); @endphp @endif
{{ $status_msg }}
@foreach ($item->payment as $item_p) @if ($item_p->method == 1) @php $payment_method_txt = __('basic.cash'); @endphp @elseif ($item_p->method == 2) @php $payment_method_txt = __('basic.visa'); @endphp @endif {{ $item_p->amount }} EGP
via {{ $payment_method_txt }} | shift: {{ $item_p->worker->name }}
@endforeach
{{ $item->total_cost }} {{ $item->service_inv_cat->name }} @foreach ($item->invoice_items as $item_items) @if ($item_items->categorizable) {{ $item_items->categorizable->name }} | @else No Items @endif @endforeach {{ $item->note }} @if ($item->discount) {{ $item->discount }} EGP
on {{ $item->items_price }} EGP
@else @endif
@php $workers = []; @endphp @foreach ($item->payment as $item_p) @if (!in_array($item_p->worker->name,$workers)) @php $workers[] = $item_p->worker->name @endphp @endif @endforeach @foreach ($workers as $worker) {{$worker}}
@endforeach
@if ($item->receivable) {{ $item->receivable->name }} @else {{ __('patientappo.no receiver') }} @endif @php $doctors = []; @endphp @foreach ($item->invoice_items as $item_items) @if ($item_items->doctor->name ?? '') @if (!in_array($item_items->doctor->name ,$doctors)) @php $doctors[] = $item_items->doctor->name @endphp @endif @endif @endforeach @if (!$doctors) No Doctor Assigned @endif @foreach ($doctors as $doctor) {{$doctor}}
@endforeach
{{ $item->branch->name }} @foreach ($item->payment as $item_p) {{$item_p->paid_date}}
@endforeach
TOTAL {{ $total_expenses = $total_expenses_cash + $total_expenses_visa }} EGP Cash {{ $total_expenses_cash }} EGP Credit {{ $total_expenses_visa }} EGP Cost {{ $invoice_expenses_inv->sum('total_cost') }} EGP
{{-- $invoice_expenses_inv->appends(request()->input())->links() --}}
{{--
Income totals cat
@php $income_details_cat_total = 0; @endphp @foreach ($income_details_cat as $item) @php $income_details_cat_total += $item->sums; @endphp @endforeach
Name Total
{{ $item->service_inv_cat->name }} {{ $item->sums }} EGP
TOTAL {{ $income_details_cat_total }} 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
@foreach ($income_details as $item) @endforeach
Name Total
TOTAL {{ $income_details->sum('sums') }} EGP
{{ $item->categorizable->name }} {{ $item->sums }} EGP
Expenses totals by items
@foreach ($expenses_details as $item) @endforeach
Name Total
TOTAL {{ $expenses_details->sum('sums') }} EGP
{{ $item->categorizable->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 Receptionist Patient Doctor Branch Date-Time
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) @if ($item_items->categorizable) {{ $item_items->categorizable->name }} | @else No Items @endif @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 }} @php $workers = []; @endphp @foreach ($item->payment as $item_p) @if (!in_array($item_p->worker->name,$workers)) @php $workers[] = $item_p->worker->name @endphp @endif @endforeach @foreach ($workers as $worker) {{$worker}}
@endforeach
@if ($item->receivable) {{ $item->receivable->name }} @else {{ __('patientappo.no receiver') }} @endif @php $doctors = []; @endphp @foreach ($item->invoice_items as $item_items) @if ($item_items->doctor->name ?? '') @if (!in_array($item_items->doctor->name ,$doctors)) @php $doctors[] = $item_items->doctor->name @endphp @endif @endif @endforeach @if (!$doctors) No Doctor Assigned @endif @foreach ($doctors as $doctor) {{$doctor}}
@endforeach
{{ $item->branch->name }} @foreach ($item->payment as $item_p) {{$item_p->paid_date}}
@endforeach
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 Receptionist Patient Doctor Branch Date-Time
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) @if ($item_items->categorizable) {{ $item_items->categorizable->name }} | @else No Items @endif @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 }} @php $workers = []; @endphp @foreach ($item->payment as $item_p) @if (!in_array($item_p->worker->name,$workers)) @php $workers[] = $item_p->worker->name @endphp @endif @endforeach @foreach ($workers as $worker) {{$worker}}
@endforeach
@if ($item->receivable) {{ $item->receivable->name }} @else {{ __('patientappo.no receiver') }} @endif @php $doctors = []; @endphp @foreach ($item->invoice_items as $item_items) @if ($item_items->doctor->name ?? '') @if (!in_array($item_items->doctor->name ,$doctors)) @php $doctors[] = $item_items->doctor->name @endphp @endif @endif @endforeach @if (!$doctors) No Doctor Assigned @endif @foreach ($doctors as $doctor) {{$doctor}}
@endforeach
{{ $item->branch->name }} @foreach ($item->payment as $item_p) {{$item_p->paid_date}}
@endforeach
@endrole
{{-- total income (cash - credit) --}}
Income (Cash) Expenses (Cash)
Net Income (Cash)
@php $profit_cash = $total_income_cash - $total_expenses_cash; @endphp {{ $profit_cash }} EGP @role('Super-admin|Accountant')
Net Income After Cost (Cash)
{{ $profit_cash - $invoice_income_inv->sum('total_cost') }} EGP @endrole
{{-- total income (cash - credit) --}}
Income (Visa) Expenses (Visa)
Net Income (Visa)
@php $profit_visa = $total_expenses_visa - $total_income_visa; @endphp {{ $profit_visa }} EGP @role('Super-admin|Accountant')
Net Income After Cost (Visa)
{{ $profit_visa - $invoice_expenses_inv->sum('total_cost') }} EGP @endrole
Income Expenses
Net Income
@php $profit = $total_income - $total_expenses; @endphp {{ $profit }} EGP @role('Super-admin|Accountant')
Net Income After Cost
{{ $total_income - $invoice_income_inv->sum('total_cost') }} EGP @endrole
@endsection @section('js') @endsection