@extends('commons.layouts.admin') @section('content') @include('_version_02.commons.layouts.partials._alert')

{{App\Language::trans('Advance Search')}}

{!!Form::model($model, ['class'=>'form-horizontal','method'=>'get'])!!}
{!! Form::label('customer_id', App\Language::trans('Customer'), ['class'=>'control-label col-md-2']) !!}
{!! Form::select('customer_id', App\Customer::combobox(), null, ['class'=>'form-control']) !!} {!!$errors->first('customer_id', '')!!}
{!! Form::label('type', App\Language::trans('Type'), ['class'=>'control-label col-md-4']) !!}
{!! Form::select('type', App\Setting::payment_received_type(), null, ['class'=>'form-control','autofocus','required','onchange'=>'init_payment_received_type_handle(this)']) !!} {!!$errors->first('type', '')!!}
{!! Form::label('payment_method', App\Language::trans('Payment Method'), ['class'=>'control-label col-md-4']) !!}
{!! Form::select('payment_method', App\Setting::payment_method(), null, ['class'=>'form-control','autofocus','required']) !!} {!!$errors->first('payment_method', '')!!}
{!! Form::label('ar_invoice_id', App\Language::trans('Document Date From'), ['class'=>'control-label col-md-2']) !!}
{!! Form::text('date_started', null, ['class'=>'form-control']) !!} {!!$errors->first('date_started', '')!!}
{!! Form::label('date_ended', App\Language::trans('To'), ['class'=>'control-label col-md-4']) !!}
{!! Form::text('date_ended', null, ['class'=>'form-control']) !!} {!!$errors->first('date_ended', '')!!}
{!! Form::label('sort_by', App\Language::trans('Sort By'), ['class'=>'control-label col-md-6']) !!}
{!! Form::select('sort_by', App\MembershipModel\ARPaymentReceived::sort_by_combobox(), null, ['class'=>'form-control']) !!} {!!$errors->first('sort_by', '')!!}

{{App\Language::trans('Listing Information')}}

@foreach($cols as $col) @if($col == 'id') @else @endif @endforeach @foreach($model as $index => $row) @foreach($row->toArray() as $key => $value) @if($key == 'status') @elseif($key != 'id') @endif @endforeach @endforeach
#{{App\Language::trans(ucwords(str_replace('_', ' ', $col)))}}{{App\Language::trans('Action')}}
{{$index+1}}{{$row->display_status_string($key)}}{{$value}} {{App\Language::trans('Edit')}} | {{App\Language::trans('View')}} | {{App\Language::trans('Print')}} | {{App\Language::trans('Del')}}
@endsection @section('script') var customerInfoUrl = "{{action('CustomersController@getInfo')}}"; function init_customer_info(me) { $.get(customerInfoUrl, {customer_id:$(me).val()}, function(fdata){ for (var key in fdata.data) { console.log("key " + key + " has value " + fdata.data[key]); } },"json"); } init_select2($("select[name=customer_id]")); init_select2($("select[name=sort_by]")); @endsection