@extends('_version_02.commons.layouts.admin') @section('content') {!! Form::model($model, ['class'=>'form-horizontal','method'=>'get']) !!}
{{App\Language::trans('Filter By')}}

{!! Form::label('export_by', App\Language::trans('Export By'), ['class'=>'control-label col-md-2']) !!}
{!!$errors->first('status', '')!!}
{!! Form::label('from_customer_id', App\Language::trans('Customer'), ['class'=>'col-sm-2 col-form-label']) !!}
{!! Form::select('from_customer_id', App\Customer::by_name_combobox(), null, ['class'=>'form-control']) !!} {!!$errors->first('from_customer_id', '')!!}
{!! Form::label('created_date_range', App\Language::trans('Created Date Range'), ['class'=>'col-sm-2 col-form-label']) !!}
@include('_version_02.commons.layouts.partials._form_floating_footer_report')
{!! Form::close() !!} @if(count($listing))
{{App\Language::trans('Result')}}

@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