mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-09 07:26:02 +00:00
Code cleanup.
This commit is contained in:
@@ -1,119 +0,0 @@
|
||||
@extends('layouts.default')
|
||||
@section('content')
|
||||
{{ Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $start) }}
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<h3>Budgets</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@foreach($budgets as $budget)
|
||||
<div class="col-lg-3 col-md-4 col-sm-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
{{{$budget->name}}}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
@foreach($budget->repInfo as $repetition)
|
||||
<p class="text-center">{{{$repetition['date']}}}</p>
|
||||
<div class="progress progress-striped">
|
||||
@if($repetition['overspent'])
|
||||
<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="{{$repetition['pct']}}" aria-valuemin="0" aria-valuemax="100" style="width: {{$repetition['pct']}}%;min-width:15px;">
|
||||
{{$repetition['pct_display']}}%
|
||||
</div>
|
||||
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="{{100-$repetition['pct']}}" aria-valuemin="0" aria-valuemax="100" style="width: {{100-$repetition['pct']}}%;">
|
||||
</div>
|
||||
@else
|
||||
<div class="progress-bar" role="progressbar" aria-valuenow="{{$repetition['pct']}}" aria-valuemin="0" aria-valuemax="100" style="width: {{$repetition['pct']}}%;min-width:15px;">
|
||||
{{$repetition['pct_display']}}%
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td style="width:50%">Budgeted</td>
|
||||
<td>{{mf($repetition['budgeted'])}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Spent</td>
|
||||
<td>{{mf($repetition['spent'])}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Left</td>
|
||||
<td>{{mf($repetition['left'])}}</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
@endforeach
|
||||
<!--
|
||||
|
||||
Progressbar, Spent, budgeted, left
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<h3>Accounts</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@foreach($accounts as $account)
|
||||
<div class="col-lg-4 col-md-6 col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
{{{$account->name}}}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
||||
List of budgets with: expenses, left in budget
|
||||
Balance at start of month.
|
||||
|
||||
Balance at end of month + left in all (relevant budgets)
|
||||
</div>
|
||||
<table class="table">
|
||||
<?php $sum = 0;$sumBudgets = 0;?>
|
||||
@foreach($account->budgetInfo as $budget)
|
||||
<?php $sum += $budget['spent'];if($budget['budget_id'] != 0) {$sumBudgets += $budget['spent'];}?>
|
||||
<tr>
|
||||
<td>{{$budget['budget_name']}}</td>
|
||||
<td>{{mf($budget['budgeted'])}}</td>
|
||||
<td>{{mf($budget['spent'])}}</td>
|
||||
<td>{{mf($budget['left'])}}</td>
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
@if($sum != 0)
|
||||
<tr>
|
||||
<td><em>Sum</em></td>
|
||||
<td></td>
|
||||
<td>{{mf($sum)}}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
@endif
|
||||
@if($sum != 0)
|
||||
<tr>
|
||||
<td><em>Sum (budgets only)</em></td>
|
||||
<td></td>
|
||||
<td>{{mf($sumBudgets)}}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<td>Balance</td>
|
||||
<td></td>
|
||||
<td>{{mf(Steam::balance($account, $end))}}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
@stop
|
||||
@section('scripts')
|
||||
@stop
|
||||
@@ -24,7 +24,7 @@
|
||||
<div class="panel-body">
|
||||
<ul>
|
||||
@foreach($months as $month)
|
||||
<li><a href="{{route('reports.budgets',[$month['year'],$month['month']])}}">{{$month['formatted']}}</a></li>
|
||||
<li><a href="#{{$month['year']}}-{{$month['month']}}">{{$month['formatted']}}</a></li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user