mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-09 07:26:02 +00:00
Expanded reports
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
<table class="table table-bordered">
|
||||
<?php $tableSum = 0;?>
|
||||
@foreach($journals as $journal)
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{route('transactions.show',$journal->id)}}" title="{{{$journal->description}}}">{{{$journal->description}}}</a>
|
||||
</td>
|
||||
<td>
|
||||
<?php $tableSum += floatval($journal->transactions[1]->amount);?>
|
||||
@if($journal->transactiontype->type == 'Withdrawal')
|
||||
<span class="text-danger">{{mf($journal->transactions[1]->amount,false)}}</span>
|
||||
@endif
|
||||
@@ -26,6 +29,12 @@
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
@if(isset($displaySum) && $displaySum === true)
|
||||
<tr>
|
||||
<td><em>Sum</em></td>
|
||||
<td colspan="3">{{mf($tableSum)}}</td>
|
||||
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
@@ -11,7 +11,24 @@
|
||||
<div class="col-lg-6 col-md-6 col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Expenses (top 10)</div>
|
||||
<div class="panel-body">Body</div>
|
||||
<table class="table table-bordered">
|
||||
<?php $sum = 0;?>
|
||||
@foreach($expenses as $expense)
|
||||
<?php $sum += floatval($expense->sum);?>
|
||||
<tr>
|
||||
@if($expense->account_id != 0)
|
||||
<td><a href="{{route('accounts.show',$expense->account_id)}}">{{{$expense->name}}}</a></td>
|
||||
@else
|
||||
<td><em>{{{$expense->name}}}</em></td>
|
||||
@endif
|
||||
<td>{{mf($expense->sum)}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr>
|
||||
<td><em>Sum</em></td>
|
||||
<td>{{mf($sum)}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -19,13 +36,69 @@
|
||||
<div class="col-lg-6 col-md-6 col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Budgets</div>
|
||||
<div class="panel-body">Body</div>
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th>Budget</th>
|
||||
<th>Envelope</th>
|
||||
<th>Spent</th>
|
||||
<th>Left</th>
|
||||
</tr>
|
||||
<?php $sum = 0;?>
|
||||
@foreach($budgets as $budget)
|
||||
<?php $sum += floatval($budget->spent);?>
|
||||
<tr>
|
||||
<td>
|
||||
@if($budget->id > 0)
|
||||
<a href="{{route('budgets.show',$budget->id)}}">{{{$budget->name}}}</a>
|
||||
@else
|
||||
<em>{{{$budget->name}}}</em>
|
||||
@endif
|
||||
</td>
|
||||
<td>{{mf($budget->budget_amount)}}</td>
|
||||
<td>{{mf($budget->spent,false)}}</td>
|
||||
<td>{{mf(floatval($budget->budget_amount) - floatval($budget->spent))}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr>
|
||||
<td colspan="2"><em>Sum</em></td>
|
||||
<td colspan="2">{{mf($sum)}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="panel-body">
|
||||
<em>This list does not take in account outgoing transfers to shared accounts.</em>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Categories</div>
|
||||
<div class="panel-body">Body</div>
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th>Category</th>
|
||||
<th>Spent</th>
|
||||
</tr>
|
||||
<?php $sum = 0;?>
|
||||
@foreach($categories as $category)
|
||||
<?php $sum += floatval($category->sum);?>
|
||||
<tr>
|
||||
<td>
|
||||
@if($category->id > 0)
|
||||
<a href="{{route('categories.show',$category->id)}}">{{{$category->name}}}</a>
|
||||
@else
|
||||
<em>{{{$category->name}}}</em>
|
||||
@endif
|
||||
</td>
|
||||
<td>{{mf($category->sum,false)}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr>
|
||||
<td><em>Sum</em></td>
|
||||
<td>{{mf($sum)}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="panel-body">
|
||||
<em>This list does not take in account outgoing transfers to shared accounts.</em>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -33,7 +106,32 @@
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Accounts</div>
|
||||
<div class="panel-body">Body</div>
|
||||
<table class="table table-bordered">
|
||||
<?php
|
||||
$sumStart = 0;
|
||||
$sumEnd = 0;
|
||||
$sumDiff = 0;
|
||||
?>
|
||||
@foreach($accounts as $account)
|
||||
<?php
|
||||
$sumStart += $account->startBalance;
|
||||
$sumEnd += $account->endBalance;
|
||||
$sumDiff += $account->difference;
|
||||
?>
|
||||
<tr>
|
||||
<td><a href="#">{{{$account->name}}}</a></td>
|
||||
<td>{{mf($account->startBalance)}}</td>
|
||||
<td>{{mf($account->endBalance)}}</td>
|
||||
<td>{{mf($account->difference)}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr>
|
||||
<td><em>Sum</em></td>
|
||||
<td>{{mf($sumStart)}}</td>
|
||||
<td>{{mf($sumEnd)}}</td>
|
||||
<td>{{mf($sumDiff)}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user