@extends('layouts.admin') @section('page-title') {{ __('Income Vs Expense Summary') }} @endsection @section('breadcrumb') @endsection @push('theme-script') @endpush @php if (isset($_GET['category']) && $_GET['period'] == 'yearly') { $chartArr = []; foreach ($profit as $innerArray) { foreach ($innerArray as $value) { $chartArr[] = $value; } } } else { $chartArr = $profit[0]; } @endphp @push('script-page') @endpush @section('action-btn')
@endsection @section('content')
{{ Form::open(['route' => ['report.income.vs.expense.summary'], 'method' => 'GET', 'id' => 'income_vs_expense_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'] : '', ['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'] : '', ['class' => 'form-control select period', 'required' => 'required']) }}
{{ Form::label('year', __('Year'), ['class' => 'form-label']) }} {{ Form::select('year', $yearList, isset($_GET['year']) ? $_GET['year'] : '', ['class' => 'form-control select']) }}
@endif
{{ Form::label('category', __('Category'), ['class' => 'form-label']) }} {{ Form::select('category', $category, isset($_GET['category']) ? $_GET['category'] : '', ['class' => 'form-control select']) }}
{{ Form::label('customer', __('Customer'), ['class' => 'form-label']) }} {{ Form::select('customer', $customer, isset($_GET['customer']) ? $_GET['customer'] : '', ['class' => 'form-control select']) }}
{{ Form::label('vender', __('Vendor'), ['class' => 'form-label']) }} {{ Form::select('vender', $vender, isset($_GET['vender']) ? $_GET['vender'] : '', ['class' => 'form-control select']) }}
{{ Form::close() }}
{{ __('Report') }} :
{{ __('Income Vs Expense Summary') }}
@if ($filter['category'] != __('All'))
{{ __('Category') }} :
{{ $filter['category'] }}
@endif @if ($filter['customer'] != __('All'))
{{ __('Customer') }} :
{{ $filter['customer'] }}
@endif @if ($filter['vender'] != __('All'))
{{ __('Vendor') }} :
{{ $filter['vender'] }}
@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 ($revenueIncomeTotal as $revenue) @foreach ($revenue as $value) @endforeach @endforeach @foreach ($invoiceIncomeTotal as $invoice) @foreach ($invoice as $value) @endforeach @endforeach @foreach ($paymentExpenseTotal as $payment) @foreach ($payment as $value) @endforeach @endforeach @foreach ($billExpenseTotal as $bill) @foreach ($bill as $value) @endforeach @endforeach @foreach ($profit as $prft) @foreach ($prft as $value) @endforeach @endforeach
{{ __('Type') }}{{ $month }}
{{ __('Income : ') }}
{{ __('Revenue') }}{{ \Auth::user()->priceFormat($value) }}
{{ __('Invoice') }}{{ \Auth::user()->priceFormat($value) }}
{{ __('Expense : ') }}
{{ __('Payment') }}{{ \Auth::user()->priceFormat($value) }}
{{ __('Bill') }}{{ \Auth::user()->priceFormat($value) }}
{{ __('Profit = Income - Expense ') }}
{{ __('Profit') }}
{{ \Auth::user()->priceFormat($value) }}
{{-- half yearly --}} @elseif(isset($_GET['category']) && $_GET['period'] == 'half-yearly')
@foreach ($monthList as $month) @endforeach @foreach ($revenueIncomeTotal as $revenue) @foreach ($revenue as $value) @endforeach @endforeach @foreach ($invoiceIncomeTotal as $invoice) @foreach ($invoice as $value) @endforeach @endforeach @foreach ($paymentExpenseTotal as $payment) @foreach ($payment as $value) @endforeach @endforeach @foreach ($billExpenseTotal as $bill) @foreach ($bill as $value) @endforeach @endforeach @foreach ($profit as $prft) @foreach ($prft as $value) @endforeach @endforeach
{{ __('Type') }}{{ $month }}
{{ __('Income : ') }}
{{ __('Revenue') }}{{ \Auth::user()->priceFormat($value) }}
{{ __('Invoice') }}{{ \Auth::user()->priceFormat($value) }}
{{ __('Expense : ') }}
{{ __('Payment') }}{{ \Auth::user()->priceFormat($value) }}
{{ __('Bill') }}{{ \Auth::user()->priceFormat($value) }}
{{ __('Profit = Income - Expense ') }}
{{ __('Profit') }}
{{ \Auth::user()->priceFormat($value) }}
{{-- yearly --}} @elseif(isset($_GET['category']) && $_GET['period'] == 'yearly')
@foreach ($monthList as $month) @endforeach @foreach ($revenueIncomeTotal as $revenue) @foreach ($revenue as $value) @endforeach @endforeach @foreach ($invoiceIncomeTotal as $invoice) @foreach ($invoice as $value) @endforeach @endforeach @foreach ($paymentExpenseTotal as $payment) @foreach ($payment as $value) @endforeach @endforeach @foreach ($billExpenseTotal as $bill) @foreach ($bill as $value) @endforeach @endforeach @foreach ($profit as $prft) @foreach ($prft as $value) @endforeach @endforeach
{{ __('Type') }}{{ $month }}
{{ __('Income : ') }}
{{ __('Revenue') }}{{ \Auth::user()->priceFormat($value) }}
{{ __('Invoice') }}{{ \Auth::user()->priceFormat($value) }}
{{ __('Expense : ') }}
{{ __('Payment') }}{{ \Auth::user()->priceFormat($value) }}
{{ __('Bill') }}{{ \Auth::user()->priceFormat($value) }}
{{ __('Profit = Income - Expense ') }}
{{ __('Profit') }}
{{ \Auth::user()->priceFormat($value) }}
@else
@foreach ($monthList as $month) @endforeach @foreach ($revenueIncomeTotal as $revenue) @endforeach @foreach ($invoiceIncomeTotal as $invoice) @endforeach @foreach ($paymentExpenseTotal as $payment) @endforeach @foreach ($billExpenseTotal as $bill) @endforeach @foreach ($profit as $prft) @foreach ($prft as $value) @endforeach @endforeach
{{ __('Type') }}{{ $month }}
{{ __('Income : ') }}
{{ __('Revenue') }} @if (is_array($revenue) || is_object($revenue)) @foreach ($revenue as $value) {{ \Auth::user()->priceFormat($value) }} @endforeach @else {{ \Auth::user()->priceFormat($revenue) }} @endif
{{ __('Invoice') }} @if (is_array($invoice) || is_object($invoice)) @foreach ($invoice as $value) {{ \Auth::user()->priceFormat($value) }} @endforeach @else {{ \Auth::user()->priceFormat($invoice) }} @endif
{{ __('Expense : ') }}
{{ __('Payment') }} @if (is_array($payment) || is_object($payment)) @foreach ($payment as $value) {{ \Auth::user()->priceFormat($value) }} @endforeach @else {{ \Auth::user()->priceFormat($payment) }} @endif
{{ __('Bill') }} @if (is_array($bill) || is_object($bill)) @foreach ($bill as $value) {{ \Auth::user()->priceFormat($value) }} @endforeach @else {{ \Auth::user()->priceFormat($bill) }} @endif
{{ __('Profit = Income - Expense ') }}
{{ __('Profit') }}
{{ \Auth::user()->priceFormat($value) }}
@endif
@endsection