@if(!isset($contract))
{{-- filter by contract --}}
{!! Form::label('filter_contract', 'Contract') !!}
{!! Form::select('filter_contract', [], [], [
'class' => 'form-select',
'data-kt-select2' => 'true',
'data-placeholder' => 'All',
'data-allow-clear' => 'true',
'data-remote' => route('resource-select', ['Contract', 'hasinv', 'companies' => @$company->id])
]) !!}
@endif
@if(!isset($company))
{{-- filter by company --}}
{!! Form::label('filter_company', 'Client') !!}
{!! Form::select('filter_company', [], [], [
'class' => 'form-select',
'data-kt-select2' => 'true',
'data-placeholder' => 'All',
'data-allow-clear' => 'true',
'data-remote' => route('resource-select', ['groupedCompany', 'hasinv'])
]) !!}
@endif
{!! Form::label('filter_status', 'Status') !!}
{!! Form::select('filter_status', $invoice_statuses, '', ['class' => 'form-select', 'data-kt-select2' => 'true', 'data-placeholder' => 'All', 'data-allow-clear' => 'true']) !!}
{!! Form::label('filter_invoice_type', 'Invoice Type') !!}
{!! Form::select('filter_invoice_type', [
'Contract' => 'Contract',
'Expense' => 'Expense',
'Competition' => 'Competition',
'Award' => 'Award',
], '',
[
'class' => 'form-select', 'data-kt-select2' => 'true',
'data-placeholder' => 'All',
'data-allow-clear' => 'true',
'multiple' => 'multiple'
]) !!}
{{-- invoice_due_date_years --}}
{!! Form::label('filter_due_date_year', 'Due Date') !!}
{!! Form::select('filter_due_date_year', $due_date_years, null, ['class' => 'form-select', 'data-kt-select2' => 'true', 'data-placeholder' => 'Any', 'data-allow-clear' => 'true']) !!}
{{-- due date range --}}
{!! Form::label('filter_due_date_range', 'Due Date Range') !!}
{!! Form::text('filter_due_date_range', null, ['class' => 'form-control flatpickr', 'data-flatpickr' => '{"mode":"range"}', 'placeholder' => __('Due Date')]) !!}
{{-- payment date range --}}
{!! Form::label('filter_payment_date_range', 'Payment Date Range') !!}
{!! Form::text('filter_payment_date_range', null, ['class' => 'form-control flatpickr', 'data-flatpickr' => '{"mode":"range"}', 'placeholder' => __('Payment Date')]) !!}
{{-- trashed --}}
@if(iCan('read trashed invoice'))
{!! Form::label('filter_invoice_state', 'State') !!}
{!! Form::select('filter_invoice_state', [
'trashed' => 'Trashed',
'not_trashed' => 'Not Trashed',
'both' => 'Both',
], 'not_trashed', ['class' => 'form-select', 'data-kt-select2' => 'true', 'data-placeholder' => 'Not Trashed', 'data-allow-clear' => 'true']) !!}
@endif
{!! Form::label('filter_due_date', 'Miscellaneous') !!}
{!! Form::select('filter_due_date', [
'' => 'All',
'Due Date' => [
'over_due' => 'Overdue',
'this_month' => 'This Month',
'prev_month' => 'Previous Month',
'next_month' => 'Next Month',
'this_quarter' => 'This Quarter',
'prev_quarter' => 'Previous Quarter',
'next_quarter' => 'Next Quarter',
],
'Currency' => [
'foreign_currency' => 'Foreign',
'local_currency' => 'Local',
],
'Comments' => [
'has_comments' => 'Has Comments',
]
], '',
[
'class' => 'form-select', 'data-kt-select2' => 'true',
'data-placeholder' => 'All',
'data-allow-clear' => 'true'
]
) !!}