@extends('layouts.app') @section('title') {{__('Accounting')}} @endsection @section('breadcrumb')

{{__('Accounting')}}

@endsection @section('content')

{{__('Accounting Report')}}

@include('admin.accounting._filter_form') @if(request()->has('date')||request()->has('doctors')||request()->has('tests')||request()->has('cultures'))

{{__('Accounting Report')}}

{{__('Due Date')}}: {{date('d-m-Y')}}

{{__('From')}} {{date('d-m-Y',strtotime($from))}} {{__('To')}} {{date('d-m-Y',strtotime($to))}}

@if(request()->has('show_groups'))
{{__('Group Tests')}}
@foreach($groups as $group) @endforeach
{{__('Date')}} {{__('Patient Name')}} {{__('Doctor')}} {{__('Tests')}} {{__('Subtotal')}} {{__('Discount')}} {{__('Total')}} {{__('Paid')}} {{__('Due')}}
{{$group['created_at']}} @if(isset($group['patient'])) {{$group['patient']['name']}} @endif @if(isset($group['doctor'])) {{$group['doctor']['name']}} @endif
    @foreach($group['tests'] as $test)
  • {{$test['test']['name']}}
  • @endforeach @foreach($group['cultures'] as $culture)
  • {{$culture['culture']['name']}}
  • @endforeach
{{formated_price($group['subtotal'])}} {{formated_price($group['discount'])}} {{formated_price($group['total'])}} {{formated_price($group['paid'])}} {{formated_price($group['due'])}}
@endif @if(request()->has('show_expenses'))
{{__('Expenses')}}
@foreach($expenses as $expense) @endforeach
{{__('Category')}} {{__('Date')}} {{__('Amount')}}
{{$expense['category']['name']}} {{date('d-m-Y',strtotime($expense['date']))}} {{formated_price($expense['amount'])}}
@endif
{{__('Accounting Report Summary')}}
@if(request()->has('show_expenses')) @endif @if(request()->has('show_profit')) @endif
{{__('Total')}}: {{formated_price($total)}}
{{__('Paid')}}: {{formated_price($paid)}}
{{__('Due')}}: {{formated_price($due)}}
{{__('Expenses')}}: {{formated_price($total_expenses)}}
{{__('Profit')}}: {{formated_price($profit)}}
@endif
@if(isset($pdf)) @endif
@endsection @section('scripts') @endsection