@extends('header') @section('head') @parent @stop @section('content') @if (!Utils::isPro())
{!! trans('texts.pro_plan_reports', ['link'=>'' . trans('texts.pro_plan_remove_logo_link') . '']) !!}
@endif {!! Former::open()->rules(['start_date' => 'required', 'end_date' => 'required']) !!}
{!! Former::text('action') !!}
{!! Former::populateField('start_date', $startDate) !!} {!! Former::populateField('end_date', $endDate) !!} @if ( ! request()->report_type) {!! Former::populateField('group_when_sorted', 1) !!} {!! Former::populateField('group_dates_by', 'monthyear') !!} @endif

{!! trans('texts.report_settings') !!}

{!! Former::select('report_type')->options($reportTypes, $reportType)->label(trans('texts.type')) !!}
 
{!! Former::text('start_date') !!} {!! Former::text('end_date') !!}
{!! Former::select('invoice_status')->label('status') ->addOption(trans('texts.all'), 'all') ->addOption(trans('texts.draft'), 'draft') ->addOption(trans('texts.unpaid'), 'unpaid') ->addOption(trans('texts.paid'), 'paid') !!}
{!! Former::select('date_field')->label(trans('texts.filter')) ->addOption(trans('texts.invoice_date'), FILTER_INVOICE_DATE) ->addOption(trans('texts.payment_date'), FILTER_PAYMENT_DATE) !!}
{!! Former::checkbox('group_when_sorted')->text('enable') !!} {!! Former::select('group_dates_by') ->addOption(trans('texts.day'), 'day') ->addOption(trans('texts.month'), 'monthyear') ->addOption(trans('texts.year'), 'year') !!}
@if (!Auth::user()->hasFeature(FEATURE_REPORTS)) @endif
{!! Button::primary(trans('texts.export')) ->withAttributes(array('onclick' => 'onExportClick()')) ->appendIcon(Icon::create('export')) ->large() !!} {!! Button::success(trans('texts.run')) ->withAttributes(array('id' => 'submitButton')) ->submit() ->appendIcon(Icon::create('play')) ->large() !!}

{!! Former::close() !!} @if (request()->report_type)
@if (count(array_values($reportTotals))) @foreach (array_values(array_values($reportTotals)[0])[0] as $key => $val) @endforeach @foreach ($reportTotals as $currencyId => $each) @foreach ($each as $dimension => $val) @foreach ($val as $id => $field) @endforeach @endforeach @endforeach

 

@endif {!! $report->tableHeader() !!} @if (count($displayData)) @foreach ($displayData as $record) @foreach ($record as $field) @endforeach @endforeach @else @endif
{{ trans('texts.reports_help') }}
@endif @stop @section('onReady') $('#start_date, #end_date').datepicker({ autoclose: true, todayHighlight: true, keyboardNavigation: false }); @stop