mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
First attempt to make the year charts and month reports report the same thing [skip ci]
This commit is contained in:
parent
1a1f89f555
commit
ac6f98fc47
@ -30,7 +30,7 @@
|
|||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
Account balance
|
Account balance
|
||||||
</div>
|
</div>
|
||||||
<table class="table">
|
<table class="table table-bordered table-striped">
|
||||||
<?php
|
<?php
|
||||||
$start = 0;
|
$start = 0;
|
||||||
$end = 0;
|
$end = 0;
|
||||||
@ -62,6 +62,39 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">
|
||||||
|
Income vs. expense
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
$incomeSum = 0;
|
||||||
|
$expenseSum = 0;
|
||||||
|
foreach($groupedIncomes as $income) {
|
||||||
|
$incomeSum += floatval($income->sum);
|
||||||
|
}
|
||||||
|
foreach($groupedExpenses as $exp) {
|
||||||
|
$expenseSum += floatval($exp['amount']);
|
||||||
|
}
|
||||||
|
$incomeSum = floatval($incomeSum*-1);
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<table class="table table-bordered table-striped">
|
||||||
|
<tr>
|
||||||
|
<td>In</td>
|
||||||
|
<td>{{mf($incomeSum)}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Out</td>
|
||||||
|
<td>{{mf($expenseSum*-1)}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Difference</td>
|
||||||
|
<td>{{mf($incomeSum - $expenseSum)}}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-3 col-md-3 col-sm-3">
|
<div class="col-lg-3 col-md-3 col-sm-3">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
@ -69,12 +102,18 @@
|
|||||||
Income
|
Income
|
||||||
</div>
|
</div>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
|
<?php $sum = 0;?>
|
||||||
@foreach($groupedIncomes as $income)
|
@foreach($groupedIncomes as $income)
|
||||||
|
<?php $sum += floatval($income->sum)*-1;?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="{{route('accounts.show',$income->account_id)}}">{{{$income->name}}}</a></td>
|
<td><a href="{{route('accounts.show',$income->account_id)}}">{{{$income->name}}}</a></td>
|
||||||
<td>{{mf(floatval($income->sum)*-1)}}</td>
|
<td>{{mf(floatval($income->sum)*-1)}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
<tr>
|
||||||
|
<td><em>Sum</em></td>
|
||||||
|
<td>{{mf($sum)}}</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user