@extends('header') @section('head') @parent @include('money_script') @stop @section('top-right') @if (config('services.postmark') && auth()->user()->hasPermission('view_reports')) {!! 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') ->data_bind("options: report_types, optionsText: 'transType', optionsValue: 'type', value: report_type") ->label(trans('texts.type')) !!}
 
{!! Former::text('start_date') !!} {!! Former::text('end_date') !!}
{!! Former::select('group') ->data_bind("options: groups, optionsText: 'transPeriod', optionsValue: 'period', value: group") !!} {!! Former::select('subgroup') ->data_bind("options: subgroups, optionsText: 'transField', optionsValue: 'field', value: subgroup") !!}
@if (!Auth::user()->hasFeature(FEATURE_REPORTS)) @endif
{!! Former::select('format') ->data_bind("options: export_formats, optionsText: 'transFormat', optionsValue: 'format', value: export_format") ->raw() !!}   {!! Button::normal(trans('texts.export')) ->withAttributes(['style' => 'display:none', 'onclick' => 'onExportClick()', 'data-bind' => 'visible: showExportButton']) ->appendIcon(Icon::create('download-alt')) !!} {!! Button::normal(trans('texts.cancel_schedule')) ->withAttributes(['id' => 'cancelSchduleButton', 'onclick' => 'onCancelScheduleClick()', 'style' => 'display:none', 'data-bind' => 'visible: showCancelScheduleButton']) ->appendIcon(Icon::create('remove')) !!} {!! Button::primary(trans('texts.schedule')) ->withAttributes(['id'=>'scheduleButton', 'onclick' => 'showScheduleModal()', 'style' => 'display:none', 'data-bind' => 'visible: showScheduleButton, css: enableScheduleButton']) ->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