@extends('layouts.master') @section('title', 'All Invoices | Proxima - Medical Management app') @section('title-topbar', __('basic.smart search')) @section('css') @endsection @section('content')
{{ __('basic.dashboard') }} | {{ __('basic.invoices') }} | {{ __('basic.smart search') }}
{{ __('basic.search filter') }}
@csrf

@foreach ($specialty as $item)
@endforeach

@foreach ($branch as $item)
@endforeach

{{ __('basic.reset') }}

{{ __('patientappo.total amount') }} {{ $invoices->sum('total_paid') }} {{ __('basic.egp') }}

{{ __('patientappo.total patients') }} {{ count($invoices) }} {{ __('basic.patients') }}

@foreach ($invoices as $item)
@if ($item->receivable) @else
@endif

{{ date('d M Y', strtotime($item->created_at)) }}

@if ($item->receivable) {{ $item->receivable->name }} @else
No Receiver
@endif

@if ($item->type == 0) Income @else Expenses @endif

{{ __('basic.code') }}
{{ $item->code }}
{{ __('basic.specialty') }}
{{ $item->specialty->name }}
{{ __('basic.branch') }}
{{ $item->branch->name }}
{{ __('basic.amount') }}
@if ($item->total_paid) {{ $item->total_paid }} {{ __('basic.egp') }} @else 0 @endif
{{ __('basic.status') }}
@if ($item->status == 0) @php $text_color_invoice = 'cancel-color-btn'; $msg_invoice = __('basic.not paid'); @endphp @elseif ($item->status == 1) @php $text_color_invoice = 'pend-color-btn'; $msg_invoice = __('basic.pending'); @endphp @elseif ($item->status == 2) @php $text_color_invoice = 'prog-color-btn'; $msg_invoice = __('basic.installment'); @endphp @elseif ($item->status == 3) @php $text_color_invoice = 'done-color-btn'; $msg_invoice = __('basic.paid'); @endphp @elseif ($item->status == 4) @php $text_color_invoice = 'cancel-color-btn'; $msg_invoice = __('basic.refund'); @endphp @endif {{ $msg_invoice }}
@endforeach
{{ $invoices->appends(request()->input())->links() }}
@endsection @section('js') @endsection