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

 

{!! 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 @if ($reportType != ENTITY_CLIENT) @endif @if ($reportType == ENTITY_PAYMENT) @endif @if ($reportType != ENTITY_PAYMENT) @endif
{{ trans("texts.{$column}") }}
{!! $field !!}
{{ trans('texts.totals') }} @foreach ($reportTotals['amount'] as $currencyId => $total) {{ Utils::formatMoney($total, $currencyId) }}
@endforeach
@foreach ($reportTotals['paid'] as $currencyId => $total) {{ Utils::formatMoney($total, $currencyId) }}
@endforeach
@foreach ($reportTotals['balance'] as $currencyId => $total) {{ Utils::formatMoney($total, $currencyId) }}
@endforeach
@endif @if ($enableChart)

 

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