dbfdg @extends('layouts.admin') @section('page-title') {{__('Income Summary')}} @endsection @section('breadcrumb') @endsection @push('theme-script') @endpush @php if(isset($_GET['category']) && $_GET['period'] == 'yearly') { $chartArr = []; foreach ($chartIncomeArr as $innerArray) { foreach ($innerArray as $value) { $chartArr[] = $value; } } } else { $chartArr = $chartIncomeArr[0]; } @endphp @push('script-page') @endpush @section('action-btn')
@endsection @section('content')
{{ Form::open(array('route' => array('report.income.summary'),'method' => 'GET','id'=>'report_income_summary')) }}
@if(isset($_GET['period']) && $_GET['period'] == 'yearly')
{{ Form::label('period', __('Income Period'),['class'=>'form-label']) }} {{ Form::select('period', $periods,isset($_GET['period'])?$_GET['period']:'', array('class' => 'form-control select period','required'=>'required')) }}
@else
{{ Form::label('period', __('Income Period'),['class'=>'form-label']) }} {{ Form::select('period', $periods,isset($_GET['period'])?$_GET['period']:'', array('class' => 'form-control select period','required'=>'required')) }}
{{ Form::label('year', __('Year'),['class'=>'form-label'])}} {{ Form::select('year',$yearList,isset($_GET['year'])?$_GET['year']:'', array('class' => 'form-control select')) }}
@endif
{{ Form::label('category', __('Category'),['class'=>'form-label'])}} {{ Form::select('category',$category,isset($_GET['category'])?$_GET['category']:'', array('class' => 'form-control select')) }}
{{ Form::label('customer', __('Customer'),['class'=>'form-label'])}} {{ Form::select('customer',$customer,isset($_GET['customer'])?$_GET['customer']:'', array('class' => 'form-control select')) }}
{{ Form::close() }}
{{__('Report')}} :
{{__('Income Summary')}}
@if($filter['category']!= __('All'))
{{__('Category')}} :
{{$filter['category']}}
@endif @if($filter['customer']!= __('All'))
{{__('Customer')}} :
{{$filter['customer']}}
@endif
{{__('Duration')}} : @if(isset($_GET['period']) && $_GET['period'] == 'yearly')
{{array_key_last($yearList).' to '.array_key_first($yearList)}}
@else
{{$filter['startDateRange'].' to '.$filter['endDateRange']}}
@endif
{{-- quarterly --}} @if(isset($_GET['category']) && $_GET['period'] == 'quarterly')
@foreach($monthList as $month) @endforeach @foreach($incomeArr as $i=>$income) @foreach($income['data'] as $j=>$data) @endforeach @endforeach @foreach($invoiceArray as $i=>$invoice) @foreach($invoice['data'] as $j=>$data) @endforeach @endforeach @foreach($chartIncomeArr as $i => $income) @foreach($income as $key => $value) @endforeach @endforeach
{{__('Category')}}{{$month}}
{{__('Revenue :')}}
{{$income['category']}}{{\Auth::user()->priceFormat($data)}}
{{__('Invoice :')}}
{{$invoice['category']}}{{\Auth::user()->priceFormat($data)}}
{{__('Income = Revenue + Invoice :')}}
{{__('Total')}}
{{\Auth::user()->priceFormat($value)}}
{{-- half yearly --}} @elseif(isset($_GET['category']) && $_GET['period'] == 'half-yearly')
@foreach($monthList as $month) @endforeach @foreach($incomeArr as $i=>$income) @foreach($income['data'] as $j=>$data) @endforeach @endforeach @foreach($invoiceArray as $i=>$invoice) @foreach($invoice['data'] as $j=>$data) @endforeach @endforeach @foreach($chartIncomeArr as $i => $income) @foreach($income as $key => $value) @endforeach @endforeach
{{__('Category half')}}{{$month}}
{{__('Revenue :')}}
{{$income['category']}}{{\Auth::user()->priceFormat($data)}}
{{__('Invoice :')}}
{{$invoice['category']}}{{\Auth::user()->priceFormat($data)}}
{{__('Income = Revenue + Invoice :')}}
{{__('Total')}}
{{\Auth::user()->priceFormat($value)}}
{{-- yearly --}} @elseif(isset($_GET['category']) && $_GET['period'] == 'yearly')
@foreach($monthList as $month) @endforeach @foreach($incomeArr as $i=>$income) @foreach($income['data'] as $j=>$data) @endforeach @endforeach @foreach($invoiceArray as $i=>$invoice) @foreach($invoice['data'] as $j=>$data) @endforeach @endforeach @foreach($chartIncomeArr as $i => $income) @foreach($income as $key => $value) @endforeach @endforeach
{{__('Category year')}}{{$month}}
{{__('Revenue :')}}
{{$income['category']}}{{\Auth::user()->priceFormat($data)}}
{{__('Invoice :')}}
{{$invoice['category']}}{{\Auth::user()->priceFormat($data)}}
{{__('Income = Revenue + Invoice :')}}
{{__('Total')}}
{{\Auth::user()->priceFormat($value)}}
@else
@foreach($monthList as $month) @endforeach @foreach($incomeArr as $i=>$income) @foreach($income['data'] as $j=>$data) @endforeach @endforeach @foreach($invoiceArray as $i=>$invoice) @foreach($invoice['data'] as $j=>$data) @endforeach @endforeach @foreach($chartIncomeArr as $i => $income) @foreach($income as $key => $value) @endforeach @endforeach
{{__('Category')}}{{$month}}
{{__('Revenue :')}}
{{$income['category']}}{{\Auth::user()->priceFormat($data)}}
{{__('Invoice :')}}
{{$invoice['category']}}{{\Auth::user()->priceFormat($data)}}
{{__('Income = Revenue + Invoice :')}}
{{__('Total')}}
{{\Auth::user()->priceFormat($value)}}
@endif
@endsection