@extends('header') @section('head') @parent @include('money_script') @stop @section('top-right') @if (config('services.postmark') && auth()->user()->hasPermission('view_all') && auth()->user()->hasPermission('view_all')) {!! Button::normal(trans('texts.emails')) ->asLinkTo(url('/reports/emails')) ->appendIcon(Icon::create('envelope')) !!} @endif {!! Button::normal(trans('texts.calendar')) ->asLinkTo(url('/reports/calendar')) ->appendIcon(Icon::create('calendar')) !!} @stop @section('content') @if (!Utils::isPro())
{!! trans('texts.pro_plan_reports', ['link'=>'' . trans('texts.pro_plan_remove_logo_link') . '']) !!}
@endif {!! Former::open()->addClass('report-form')->rules(['start_date' => 'required', 'end_date' => 'required']) !!}
{!! Former::text('action')->forceValue('') !!} {!! Former::text('range')->forceValue('') !!} {!! Former::text('scheduled_report_id')->forceValue('') !!}
{!! Former::populateField('start_date', $startDate) !!} {!! Former::populateField('end_date', $endDate) !!}

{!! 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('group') ->addOption('', '') ->addOption(trans('texts.day'), 'day') ->addOption(trans('texts.month'), 'monthyear') ->addOption(trans('texts.year'), 'year') !!} {!! Former::select('subgroup') ->addOption('', '') !!}
@if (!Auth::user()->hasFeature(FEATURE_REPORTS)) @endif
{!! Former::select('format') ->addOption('CSV', 'csv') ->addOption('XLSX', 'xlsx') ->addOption('PDF', 'pdf') ->raw() !!}   {!! Button::normal(trans('texts.export')) ->withAttributes(['onclick' => 'onExportClick()']) ->appendIcon(Icon::create('download-alt')) !!} {!! Button::normal(trans('texts.cancel_schedule')) ->withAttributes(['id' => 'cancelSchduleButton', 'onclick' => 'onCancelScheduleClick()', 'style' => 'display:none']) ->appendIcon(Icon::create('remove')) !!} {!! Button::primary(trans('texts.schedule')) ->withAttributes(['id'=>'scheduleButton', 'onclick' => 'showScheduleModal()', 'style' => 'display:none']) ->appendIcon(Icon::create('time')) !!}    {!! Button::success(trans('texts.run')) ->withAttributes(array('id' => 'submitButton')) ->submit() ->appendIcon(Icon::create('play')) ->large() !!} @if (request()->report_type) @endif
@if (request()->report_type) @include('reports.chart_builder')
@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 $field => $value) @endforeach @endforeach @endforeach

 

@endif {!! $report ? $report->tableHeader() : '' !!} @if (count($displayData)) @foreach ($displayData as $record) @foreach ($record as $field) @endforeach @endforeach @else @endif
{{ trans('texts.reports_help') }}
@endif {!! Former::close() !!} @stop @section('onReady') $('#start_date, #end_date').datepicker({ autoclose: true, todayHighlight: true, keyboardNavigation: false }); var currentDate = new Date(); currentDate.setDate(currentDate.getDate() + 1); $('#send_date').datepicker('update', currentDate); @stop