2014-11-02 11:46:01 -06:00
|
|
|
@extends('layouts.default')
|
|
|
|
@section('content')
|
2014-11-28 09:35:11 -06:00
|
|
|
{{ Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $date) }}
|
2014-11-02 11:46:01 -06:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-10 col-md-8 col-sm-12">
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
Income vs. expenses
|
|
|
|
</div>
|
|
|
|
<div class="panel-body">
|
|
|
|
<div id="income-expenses-chart"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-lg-2 col-md-4 col-sm-12">
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
Income vs. expenses
|
|
|
|
</div>
|
|
|
|
<div class="panel-body">
|
|
|
|
<div id="income-expenses-sum-chart"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
2014-12-07 08:37:53 -06:00
|
|
|
<div class="col-lg-6 col-md-6 col-sm-6">
|
2014-11-07 15:06:30 -06:00
|
|
|
<div class="panel panel-default">
|
2014-11-02 11:46:01 -06:00
|
|
|
<div class="panel-heading">
|
2014-12-07 08:37:53 -06:00
|
|
|
Account balance
|
2014-11-02 11:46:01 -06:00
|
|
|
</div>
|
2014-12-07 08:37:53 -06:00
|
|
|
<table class="table">
|
|
|
|
<?php
|
|
|
|
$start = 0;
|
|
|
|
$end = 0;
|
|
|
|
$diff = 0;
|
|
|
|
?>
|
|
|
|
@foreach($balances as $balance)
|
|
|
|
<?php
|
|
|
|
$start += $balance['start'];
|
|
|
|
$end += $balance['end'];
|
|
|
|
$diff += ($balance['end']-$balance['start']);
|
|
|
|
?>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<a href="{{route('accounts.show',$balance['account']->id)}}">{{{$balance['account']->name}}}</a>
|
|
|
|
@if($balance['shared'])
|
|
|
|
<small><em>shared</em></small>
|
|
|
|
@endif
|
|
|
|
</td>
|
|
|
|
<td>{{mf($balance['start'])}}</td>
|
|
|
|
<td>{{mf($balance['end'])}}</td>
|
|
|
|
<td>{{mf($balance['end']-$balance['start'])}}</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
<tr>
|
|
|
|
<td><em>Sum of sums</em></td>
|
|
|
|
<td>{{mf($start)}}</td>
|
|
|
|
<td>{{mf($end)}}</td>
|
|
|
|
<td>{{mf($diff)}}</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2014-11-02 11:46:01 -06:00
|
|
|
</div>
|
|
|
|
</div>
|
2014-12-07 08:37:53 -06:00
|
|
|
<div class="col-lg-3 col-md-3 col-sm-3">
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
Income
|
|
|
|
</div>
|
|
|
|
<table class="table">
|
|
|
|
@foreach($groupedIncomes as $income)
|
|
|
|
<tr>
|
|
|
|
<td><a href="{{route('accounts.show',$income->account_id)}}">{{{$income->name}}}</a></td>
|
|
|
|
<td>{{mf(floatval($income->sum)*-1)}}</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-lg-3 col-md-3 col-sm-3">
|
2014-12-06 02:16:54 -06:00
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
2014-12-07 08:37:53 -06:00
|
|
|
Expenses
|
2014-12-06 02:16:54 -06:00
|
|
|
</div>
|
2014-12-07 08:37:53 -06:00
|
|
|
<table class="table">
|
|
|
|
@foreach($groupedExpenses as $expense)
|
|
|
|
<tr>
|
|
|
|
<td><a href="{{route('accounts.show',$expense->account_id)}}">{{{$expense->name}}}</a></td>
|
|
|
|
<td>{{mf(floatval($expense->sum)*-1)}}</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</table>
|
2014-12-06 02:16:54 -06:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2014-11-07 15:06:30 -06:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-12 col-md-12 col-sm-12">
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
Budgets
|
|
|
|
</div>
|
|
|
|
<div class="panel-body">
|
2014-12-07 08:37:53 -06:00
|
|
|
<!-- <div id="budgets"></div> -->
|
2014-11-07 15:06:30 -06:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2014-11-02 11:46:01 -06:00
|
|
|
@stop
|
|
|
|
@section('scripts')
|
|
|
|
<!-- load the libraries and scripts necessary for Google Charts: -->
|
|
|
|
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
|
|
|
|
{{HTML::script('assets/javascript/firefly/gcharts.options.js')}}
|
|
|
|
{{HTML::script('assets/javascript/firefly/gcharts.js')}}
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
var year = '{{$year}}';
|
2014-12-23 23:10:39 -06:00
|
|
|
var currencyCode = '{{getCurrencyCode()}}';
|
2014-11-02 11:46:01 -06:00
|
|
|
</script>
|
|
|
|
|
|
|
|
{{HTML::script('assets/javascript/firefly/reports.js')}}
|
|
|
|
|
|
|
|
@stop
|