@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) !!}

{!! trans('texts.report_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()->hasFeature(FEATURE_REPORTS)) @endif
{!! Former::checkbox('enable_report')->text(trans('texts.enable'))->check($enableReport)->forceValue(1) !!} {!! Former::select('report_type')->options($reportTypes, $reportType)->label(trans('texts.type')) !!}
{!! 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('enable_chart')->text(trans('texts.enable'))->check($enableChart)->forceValue(1) !!} {!! Former::select('group_by')->options($dateTypes, $groupBy) !!} {!! Former::select('chart_type')->options($chartTypes, $chartType) !!} {!! Former::close() !!}
@if ($enableReport)
@foreach ($columns as $column) @endforeach @if (count($displayData)) @foreach ($displayData as $record) @foreach ($record as $field) @endforeach @endforeach @else @endif
{{ trans("texts.{$column}") }}
{!! $field !!}
{{ trans('texts.empty_table') }}

 

@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