Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
First attempt to make the year charts and month reports report the same thing [skip ci]
James Coleac6f98fc47a0
diff --git a/app/views/reports/year.blade.php b/app/views/reports/year.blade.phpindex db918e2718..e7fc7c5d7a 100644--- a/app/views/reports/year.blade.php+++ b/app/views/reports/year.blade.php@@ -30,7 +30,7 @@<div class="panel-heading">Account balance</div>- <table class="table">+ <table class="table table-bordered table-striped"><?php$start = 0;$end = 0;@@ -62,6 +62,39 @@</tr></table></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 class="col-lg-3 col-md-3 col-sm-3"><div class="panel panel-default">@@ -69,12 +102,18 @@Income</div><table class="table">+ <?php $sum = 0;?>@foreach($groupedIncomes as $income)+ <?php $sum += floatval($income->sum)*-1;?><tr><td><a href="{{route('accounts.show',$income->account_id)}}">{{{$income->name}}}</a></td><td>{{mf(floatval($income->sum)*-1)}}</td></tr>@endforeach+ <tr>+ <td><em>Sum</em></td>+ <td>{{mf($sum)}}</td>+ </tr></table></div></div>