@extends('layouts.app') @section('content')

Monthly report

{!! Form::open(['method' => 'get']) !!}
{!! Form::label('year','Year',['class' => 'control-label']) !!} {!! Form::select('y', array_combine(range(date("Y"), 1900), range(date("Y"), 1900)), old('y', Request::get('y', date('Y'))), ['class' => 'form-control', 'data-live-search' => 'true', 'data-show-subtext' => 'true']) !!}
{!! Form::label('month','Month',['class' => 'control-label']) !!} {!! Form::select('m', cal_info(0)['months'], old('m', Request::get('m', date('m'))), ['class' => 'form-control', 'data-live-search' => 'true', 'data-show-subtext' => 'true']) !!}

{!! Form::submit('View Report',['class' => 'btn btn-primary']) !!}

Report
{!! Form::close() !!}
Income {{ digiCurrency($inc_total) }}
Expenses {{ digiCurrency($exp_total) }}
Profit {{ digiCurrency($profit) }}
@foreach($inc_summary as $inc) @endforeach
Income by category {{ digiCurrency($inc_total) }}
{{ $inc['name'] }} {{ digiCurrency($inc['amount']) }}
@foreach($exp_summary as $inc) @endforeach
Expenses by category {{ digiCurrency($exp_total) }}
{{ $inc['name'] }} {{ digiCurrency($inc['amount']) }}
@include('admin.monthly_reports.graph', compact( 'reportTitle', 'results', 'chartType', 'reportLabel', 'reportTitle_expense', 'results_expense', 'chartType_expense', 'reportLabel_expense' ) ) @stop