@extends('billings.layouts.admin') @section('content') {!! Form::model($model, ['class'=>'form-horizontal','method'=>'get']) !!}

{{App\Language::trans('Filter By')}}

{!! Form::label('date_started', App\Language::trans('Date Started'), ['class'=>'control-label col-md-4']) !!}
{!! Form::text('date_started', null, ['class'=>'form-control']) !!} {!!$errors->first('date_started', '')!!}
{!! Form::label('date_ended', App\Language::trans('Date Ended'), ['class'=>'control-label col-md-4']) !!}
{!! Form::text('date_ended', null, ['class'=>'form-control']) !!} {!!$errors->first('date_ended', '')!!}
{!! Form::label('from_customer_id', App\Language::trans('From Customer'), ['class'=>'control-label col-md-4']) !!}
{!! Form::select('from_customer_id', App\Customer::by_name_combobox(), null, ['class'=>'form-control']) !!} {!!$errors->first('from_customer_id', '')!!}
{!! Form::label('to_customer_id', App\Language::trans('To Customer'), ['class'=>'control-label col-md-4']) !!}
{!! Form::select('to_customer_id', App\Customer::by_name_combobox(), null, ['class'=>'form-control']) !!} {!!$errors->first('to_customer_id', '')!!}
{!! Form::label('from_ar_invoice_id', App\Language::trans('From Invoice'), ['class'=>'control-label col-md-4']) !!}
{!! Form::select('from_ar_invoice_id', App\MembershipModel\ARInvoice::combobox(), null, ['class'=>'form-control']) !!} {!!$errors->first('from_ar_invoice_id', '')!!}
{!! Form::label('to_ar_invoice_id', App\Language::trans('To Invoice'), ['class'=>'control-label col-md-4']) !!}
{!! Form::select('to_ar_invoice_id', App\MembershipModel\ARInvoice::combobox(), null, ['class'=>'form-control']) !!} {!!$errors->first('to_ar_invoice_id', '')!!}
{!! Form::label('export_by', App\Language::trans('Export By'), ['class'=>'control-label col-md-4']) !!}
{!!$errors->first('export_by', '')!!}
{!! Form::close() !!} @if(count($listing))

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

@foreach($listing as $index => $row) @php $total += $row->total_amount; @endphp @endforeach
# {{App\Language::trans('Document No.')}} {{App\Language::trans('Document Date')}} {{App\Language::trans('Customer')}} {{App\Language::trans('Payment Term')}} {{App\Language::trans('Due Date')}} {{App\Language::trans('Status')}} {{App\Language::trans('Amount')}}
{{$index+1}} {{$row->document_no}} {{$row->getDate($row->document_date)}} {{$row->customer_name}} {{$row->payment_term_days ? ($row->payment_term_days.' '.App\Language::trans('Days')):App\Language::trans('Cash')}} {{$row->getDate($row->due_date)}} {{$row->status}} {{$row->getDouble($row->total_amount)}}
{{App\Language::trans('Total')}}: {{number_format($total, 2)}}
@endif @stop @section('script') init_select2($("select[name=from_customer_id]")); init_select2($("select[name=to_customer_id]")); init_select2($("select[name=from_ar_invoice_id]")); init_select2($("select[name=to_ar_invoice_id]")); @stop