@extends('layouts.master') @if(count($invoice) > 0) @if($worker_type === "doctor") @php $worker_type = $invoice[0]->doctor->name; @endphp @elseif($worker_type === "worker") @php $worker_type = $invoice[0]->invoice->name; @endphp @else @php $worker_type = ""; @endphp @endif @endif @section('title', 'Search Invoice | Proxima - Medical Management app ' . $worker_type) @section('title-topbar', 'Search ' . $worker_type) @section('css') @endsection @section('content')
Dashboard | Invoice Search | Day invoices
Income invoices
@role('Super-admin|Accountant') @endrole @php $total_income_cash = 0; $total_income_visa = 0; $total_item_price = 0; @endphp @foreach ($invoice as $item) @role('Super-admin|Accountant') @endrole @endforeach
Status TotalCostItem Price Items Description Discount Patient Doctor Branch
@if ($item->invoice->status == 0) @php $status = 'cancel-color-btn'; $status_msg = __('basic.not paid'); @endphp @elseif ($item->invoice->status == 1) @php $status = 'pend-color-btn'; $status_msg = __('basic.pending'); @endphp @elseif ($item->invoice->status == 2) @php $status = 'prog-color-btn'; $status_msg = __('basic.installment'); @endphp @elseif ($item->invoice->status == 3) @php $status = 'done-color-btn'; $status_msg = __('basic.paid'); @endphp @elseif ($item->invoice->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'); $total_income_cash += $item_p->amount; @endphp @elseif ($item_p->method == 2) @php $payment_method_txt = __('basic.visa'); $total_income_visa += $item_p->amount; @endphp @endif {{ $item_p->amount }} EGP
via {{ $payment_method_txt }} | shift: {{ $item_p->worker->name }}
@endforeach
{{ $item->invoice->total_cost }} EGP @php $total_item_price += $item->price; @endphp {{ $item->price }} {{ $item->categorizable->name }} {{ $item->invoice->note }} @if ($item->invoice->discount) {{ $item->invoice->discount }} EGP
on {{ $item->invoice->items_price }} egp
@else @endif
@if ($item->invoice->receivable) {{ $item->invoice->receivable->name }} @else {{ __('patientappo.no receiver') }} @endif @if($item->doctor) {{ $item->doctor->name }} @endif {{ $item->invoice->branch->name }}
Paid {{ $total_income = $total_income_cash + $total_income_visa }} EGP Cash {{ $total_income_cash }} EGP Credit {{ $total_income_visa }} EGP Items Price {{ $total_item_price }} EGP
Income Expenses
Paid
@php $profit = $total_income; @endphp {{ $profit }} EGP @role('Super-admin|Accountant')
Items Price
{{ $total_item_price }} EGP @endrole
@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