@component('components.filters', [
'title' => __('report.filters'),
'class' => 'box-primary'
])
{{-- {!! Form::label('brand_name', __('product.brand') . ' Name:') !!} --}}
{!! Form::text('brand_name', null, ['class' => 'form-control', 'id' => 'brand_name_filter',
'placeholder' => __('advancedreports::lang.search_by_brand_name')]); !!}
{{-- Divider --}}
{!! Form::label('brand_id', __('product.brand') . ':') !!}
@php
$brand_options = ['' => __('lang_v1.all'), '0' => 'No Brand'];
if(is_array($brands)) {
$brand_options = array_merge($brand_options, $brands);
} else {
$brand_options = collect($brand_options)->merge($brands)->toArray();
}
@endphp
{!! Form::select('brand_id', $brand_options, null, ['class' => 'form-control select2',
'style' => 'width:100%', 'id' => 'brand_filter']); !!}
{!! Form::label('location_id', __('purchase.business_location') . ':') !!}
{!! Form::select('location_id', $business_locations, null, ['class' => 'form-control select2',
'style' => 'width:100%', 'id' => 'location_filter']); !!}
{!! Form::label('payment_status', __('purchase.payment_status') . ':') !!}
{!! Form::select('payment_status', [
'' => __('lang_v1.all'),
'paid' => __('lang_v1.paid'),
'due' => __('lang_v1.due'),
'partial' => __('lang_v1.partial')
], null, ['class' => 'form-control select2', 'style' => 'width:100%', 'id' =>
'payment_status_filter']); !!}
{!! Form::label('payment_method', __('lang_v1.payment_method') . ':') !!}
{!! Form::select('payment_method', $payment_types, null, ['class' => 'form-control select2',
'style' => 'width:100%', 'id' => 'payment_method_filter']); !!}
{!! Form::label('user_id', __('advancedreports::lang.staff') . ':') !!}
{!! Form::select('user_id', $users, null, ['class' => 'form-control select2',
'style' => 'width:100%', 'id' => 'user_filter']); !!}
{!! Form::label('year', __('Year') . ':') !!}
{!! Form::select('year', array_combine(range(date('Y')-5, date('Y')+1), range(date('Y')-5,
date('Y')+1)), date('Y'), ['class' => 'form-control select2', 'style' => 'width:100%', 'id' =>
'year_filter']); !!}
@endcomponent