@extends('header') @section('head') @parent @stop @section('content') @parent @include('accounts.nav', ['selected' => ACCOUNT_CHARTS_AND_REPORTS, 'advanced' => true]) {!! Former::open()->rules(['start_date' => 'required', 'end_date' => 'required'])->addClass('warn-on-exit') !!}
{!! Former::text('action') !!}
{!! Former::populateField('start_date', $startDate) !!} {!! Former::populateField('end_date', $endDate) !!} {!! Former::populateField('enable_report', intval($enableReport)) !!} {!! Former::populateField('enable_chart', intval($enableChart)) !!}

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

{!! Former::text('start_date')->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT)) ->addGroupClass('start_date') ->append('') !!} {!! Former::text('end_date')->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT)) ->addGroupClass('end_date') ->append('') !!}

 

{!! Former::actions( Button::primary(trans('texts.export'))->withAttributes(array('onclick' => 'onExportClick()'))->appendIcon(Icon::create('export')), Button::success(trans('texts.run'))->withAttributes(array('id' => 'submitButton'))->submit()->appendIcon(Icon::create('play')) ) !!} @if (!Auth::user()->isPro()) @endif
{!! Former::checkbox('enable_report')->text(trans('texts.enable')) !!} {!! Former::select('report_type')->options($reportTypes, $reportType)->label(trans('texts.type')) !!}

 

{!! Former::checkbox('enable_chart')->text(trans('texts.enable')) !!} {!! Former::select('group_by')->options($dateTypes, $groupBy) !!} {!! Former::select('chart_type')->options($chartTypes, $chartType) !!} {!! Former::close() !!}
@if ($enableReport)
@foreach ($columns as $column) @endforeach @foreach ($displayData as $record) @foreach ($record as $field) @endforeach @endforeach
{{ trans("texts.{$column}") }}
{!! $field !!}

 

@if (count(array_values($reportTotals))) @foreach (array_values($reportTotals)[0] as $key => $val) @endforeach @foreach ($reportTotals as $currencyId => $val) @foreach ($val as $id => $field) @endforeach @endforeach
{{ trans("texts.totals") }}{{ trans("texts.{$key}") }}
{!! Utils::getFromCache($currencyId, 'currencies')->name !!}{!! Utils::formatMoney($field, $currencyId) !!}
@endif
@endif @if ($enableChart)

 

 Invoices
 Payments
 Credits
@endif
@stop @section('onReady') $('#start_date, #end_date').datepicker({ autoclose: true, todayHighlight: true, keyboardNavigation: false }); @stop