@extends('layouts.master_backend') @section('content') @php $i = $j = 0; $totalAmount = 0; $totalNetAmoun = 0; $totalIncomeAmount = 0; $totalExpenseAmount = 0; @endphp
@if($report_of == 'transactions')

{{lang_trans('txt_transactions_report')}}


{{ Form::model($search_data,array('url'=>route('search-payment-history'),'id'=>"search-payment-history", 'class'=>"form-horizontal form-label-left")) }} {{--
{{Form::text('customer_id',null,['class'=>"form-", "id"=>"customers", "placeholder"=>lang_trans('ph_select')])}}
--}}
{{Form::text('date_from',null,['class'=>"form-control datepicker", 'placeholder'=>lang_trans('ph_date_from')])}}
{{Form::text('date_to',null,['class'=>"form-control datepicker", 'placeholder'=>lang_trans('ph_date_to')])}}

{{ Form::close() }}

{{-- --}} @foreach($datalist as $k=>$val) @if($val->is_checkout==0) @php if($val->payment_of=='cr') { $totalIncomeAmount += $val->payment_amount; } else if($val->payment_of=='dr') { $totalExpenseAmount += $val->payment_amount; } $totalAmount += $val->payment_amount; $i++; @endphp {{-- --}} @endif @endforeach
{{lang_trans('txt_sno')}}{{lang_trans('txt_user_name')}} {{lang_trans('txt_customer_name')}}{{lang_trans('txt_transaction_id')}} {{lang_trans('txt_activity')}} {{lang_trans('txt_payment_mode')}} {{lang_trans('txt_date')}} {{lang_trans('txt_total_amount')}}
{{$i}}{{($val->user) ? $val->user->name : ''}} {{($val->customer) ? $val->customer->name : ''}}{{$val->transaction_id}} {{getPaymentPurpose($val->purpose)}} {{$val->payment_type}} {{dateConvert($val->payment_date ,'d-m-Y H:i')}} {{getCurrencySymbol()}} {{numberFormat($val->payment_amount)}}
@php $totalNetAmoun = $totalIncomeAmount-$totalExpenseAmount; @endphp
{{lang_trans('txt_total_income')}} {{getCurrencySymbol()}} {{numberFormat($totalIncomeAmount)}}
{{lang_trans('txt_total_expense')}} {{getCurrencySymbol()}} {{numberFormat($totalExpenseAmount)}}
{{lang_trans('txt_total_netamount')}} {{getCurrencySymbol()}} {{numberFormat($totalNetAmoun)}}
@endif @if($report_of == 'checkouts')

{{lang_trans('txt_checkout_report')}}


{{ Form::model($search_data,array('url'=>route('search-checkouts'),'id'=>"search-checkouts", 'class'=>"form-horizontal form-label-left")) }}
{{Form::text('customer_id',null,['class'=>"form-", "id"=>"customers", "placeholder"=>lang_trans('ph_select')])}}
{{Form::select('room_type_id',$roomtypes_list,null,['class'=>"form-control",'placeholder'=>lang_trans('ph_select')])}}
{{Form::select('payment_status',config('constants.PAYMENT_STATUS'),null,['class'=>"form-control",'placeholder'=>lang_trans('ph_select')])}}
{{Form::text('date_from',null,['class'=>"form-control datepicker", 'placeholder'=>lang_trans('ph_date_from')])}}
{{Form::text('date_to',null,['class'=>"form-control datepicker", 'placeholder'=>lang_trans('ph_date_to')])}}

{{lang_trans('btn_search')}}
{{ Form::close() }}
@endif @if($report_of == 'expense')

{{lang_trans('txt_expense_report')}}

{{ Form::model($search_data,array('url'=>route('search-expenses'),'id'=>"search-expense", 'class'=>"form-horizontal form-label-left")) }}
{{Form::select('category_id',$category_list,null,['class'=>"form-control",'placeholder'=>lang_trans('ph_select')])}}
{{Form::text('date_from',null,['class'=>"form-control datepicker", 'placeholder'=>lang_trans('ph_date_from')])}}
{{Form::text('date_to',null,['class'=>"form-control datepicker", 'placeholder'=>lang_trans('ph_date_to')])}}

{{lang_trans('btn_search')}}
{{ Form::close() }}
@endif
@endsection