@extends('backEnd.master') @section('title') @lang('accounts.search_income_expense') @endsection @section('mainContent') @php @$setting = generalSetting(); if(!empty(@$setting->currency_symbol)){ @$currency = @$setting->currency_symbol; }else{ @$currency = '$'; } @endphp

@lang('common.select_criteria')

@if(session()->has('message-success') != "") @if(session()->has('message-success'))
{{ session()->get('message-success') }}
@endif @endif
{{ Form::open(['class' => 'form-horizontal', 'files' => true, 'route' => 'search_accounts', 'method' => 'POST', 'enctype' => 'multipart/form-data', 'id' => 'search_income_expense']) }}
@if ($errors->has('date_from')) {{ @$errors->first('date_from') }} @endif
@if ($errors->has('date_to')) {{ @$errors->first('date_to') }} @endif
@if ($errors->has('type')) {{ @$errors->first('type') }} @endif
@if ($errors->has('type')) {{ @$errors->first('type') }} @endif
{{ Form::close() }}
@if(isset($add_incomes))

@lang('accounts.income_result')

@php $total_income = 0;@endphp @foreach($add_incomes as $add_income) @php @$total_income = @$total_income + @$add_income->amount; @endphp @endforeach @if(@$fees_payments != "") @php @$total_income = @$total_income + @$fees_payments; @endphp @endif @if(@$item_sells != "") @php @$total_income = @$total_income + @$item_sells; @endphp @endif @if(@$dormitory != 0) @php @$total_income = @$total_income + @$dormitory; @endphp @endif
@lang('common.name') @lang('accounts.payroll') @lang('accounts.amount')({{@generalSetting()->currency_symbol}})
{{@$add_income->name}} {{@$add_income->ACHead!=""?@$add_income->ACHead->head:""}} {{number_format(@$add_income->amount, 2)}}
@lang('fees.fees_collection') @lang('fees.fees') {{number_format(@$fees_payments, 2)}}
@lang('inventory.item_sell') @lang('accounts.sells') {{number_format(@$item_sells, 2)}}
@lang('accounts.dormitory_fees') @lang('dormitory.dormitory') {{number_format(@$dormitory, 2)}}
@lang('accounts.grand_total') {{number_format(@$total_income, 2)}}
@endif @if(isset($add_expenses))

@lang('accounts.expense_result')

@php @$total_expense = 0;@endphp @foreach($add_expenses as $add_expense) @php @$total_expense = @$total_expense + @$add_expense->amount; @endphp @endforeach @if(@$item_receives != 0) @php @$total_expense = @$total_expense + @$item_receives; @endphp @endif @if(@$payroll_payments != 0) @php @$total_expense = @$total_expense + @$payroll_payments; @endphp @endif
@lang('common.name') @lang('accounts.expense_head') @lang('accounts.amount')({{generalSetting()->currency_symbol}})
{{@$add_expense->name}} {{@$add_expense->ACHead!=""?@$add_expense->ACHead->head:""}} {{number_format(@$add_expense->amount, 2)}}
@lang('accounts.item_purchase') @lang('accounts.purchase') {{number_format(@$item_receives, 2)}}
@lang('fees.from_payroll') @lang('hr.payroll') {{number_format(@$payroll_payments, 2)}}
@lang('accounts.grand_total') {{number_format(@$total_expense, 2)}}
@endif
@endsection @include('backEnd.partials.data_table_js') @include('backEnd.partials.date_picker_css_js')