Tweak reports.

This commit is contained in:
James Cole
2016-10-26 19:37:19 +02:00
parent dc0c1b73bc
commit 5db4f8512b
5 changed files with 86 additions and 66 deletions

View File

@@ -20,7 +20,16 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-lg-6 col-md-6 col-sm-6 loading" id="accountReport"> <div class="col-lg-6 col-md-6 col-sm-6 loading">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'accountBalances'|_ }}</h3>
</div>
<div class="box-body table-responsive no-padding loading" id="accountReport">
</div>
</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="box"> <div class="box">
@@ -42,7 +51,15 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-lg-6 col-md-6 col-sm-6 loading" id="incomeVsExpenseReport"> <div class="col-lg-6 col-md-6 col-sm-6">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'incomeVsExpenses'|_ }}</h3>
</div>
<div class="box-body table-responsive no-padding loading" id="incomeVsExpenseReport">
</div>
</div>
</div> </div>
<div class="col-lg-6 col-md-6 col-sm-6"> <div class="col-lg-6 col-md-6 col-sm-6">
{% include 'reports/partials/tags.twig' %} {% include 'reports/partials/tags.twig' %}

View File

@@ -38,7 +38,7 @@
<div class="box-header with-border"> <div class="box-header with-border">
<h3 class="box-title">{{ 'income'|_ }}</h3> <h3 class="box-title">{{ 'income'|_ }}</h3>
</div> </div>
<div class="box-body table-responsive no-padding loading" id="incomeReport"> <div class="box-body table-responsive no-padding loading" id="incomeReport">
</div> </div>
</div> </div>
</div> </div>
@@ -53,7 +53,14 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-lg-6 col-md-6 col-sm-6 loading" id="incomeVsExpenseReport"> <div class="col-lg-6 col-md-6 col-sm-6">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'incomeVsExpenses'|_ }}</h3>
</div>
<div class="box-body table-responsive no-padding loading" id="incomeVsExpenseReport">
</div>
</div>
</div> </div>
<div class="col-lg-6 col-md-6 col-sm-6"> <div class="col-lg-6 col-md-6 col-sm-6">
{% include 'reports/partials/tags.twig' %} {% include 'reports/partials/tags.twig' %}

View File

@@ -31,17 +31,27 @@
<div class="row"> <div class="row">
<div class="col-lg-6 col-md-6 col-sm-6"> <div class="col-lg-6 col-md-6 col-sm-6">
<div class="loading" id="accountReport"> <div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'accountBalances'|_ }}</h3>
</div>
<div class="box-body table-responsive no-padding loading" id="accountReport">
</div>
</div>
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'incomeVsExpenses'|_ }}</h3>
</div>
<div class="box-body table-responsive no-padding loading" id="incomeVsExpenseReport">
</div>
</div> </div>
<div class="loading" id="incomeVsExpenseReport">
</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="box"> <div class="box">
<div class="box-header with-border"> <div class="box-header with-border">
<h3 class="box-title">{{ 'income'|_ }}</h3> <h3 class="box-title">{{ 'income'|_ }}</h3>
</div> </div>
<div class="box-body table-responsive no-padding loading" id="incomeReport"> <div class="box-body table-responsive no-padding loading" id="incomeReport">
</div> </div>
</div> </div>
</div> </div>

View File

@@ -1,37 +1,30 @@
<div class="box"> <table class="table table-hover sortable">
<div class="box-header with-border"> <thead>
<h3 class="box-title">{{ 'accountBalances'|_ }}</h3> <tr>
</div> <th>{{ 'name'|_ }}</th>
<div class="box-body table-responsive no-padding"> <th>{{ 'balanceStart'|_ }}</th>
<table class="table table-hover sortable"> <th>{{ 'balanceEnd'|_ }}</th>
<thead> <th>{{ 'difference'|_ }}</th>
<tr> </tr>
<th>{{ 'name'|_ }}</th> </thead>
<th>{{ 'balanceStart'|_ }}</th> <tbody>
<th>{{ 'balanceEnd'|_ }}</th> {% for account in accountReport.getAccounts %}
<th>{{ 'difference'|_ }}</th> <tr>
</tr> <td>
</thead> <a href="{{ route('accounts.show',account.id) }}" title="{{ account.name }}">{{ account.name }}</a>
<tbody> </td>
{% for account in accountReport.getAccounts %} <td data-value="{{ account.startBalance }}">{{ account.startBalance|formatAmount }}</td>
<tr> <td data-value="{{ account.endBalance }}">{{ account.endBalance|formatAmount }}</td>
<td> <td data-value="{{ (account.endBalance - account.startBalance) }}">{{ (account.endBalance - account.startBalance)|formatAmount }}</td>
<a href="{{ route('accounts.show',account.id) }}" title="{{ account.name }}">{{ account.name }}</a> </tr>
</td> {% endfor %}
<td data-value="{{ account.startBalance }}">{{ account.startBalance|formatAmount }}</td> </tbody>
<td data-value="{{ account.endBalance }}">{{ account.endBalance|formatAmount }}</td> <tfoot>
<td data-value="{{ (account.endBalance - account.startBalance) }}">{{ (account.endBalance - account.startBalance)|formatAmount }}</td> <tr>
</tr> <td><em>{{ 'sumOfSums'|_ }}</em></td>
{% endfor %} <td>{{ accountReport.getStart|formatAmount }}</td>
</tbody> <td>{{ accountReport.getEnd|formatAmount }}</td>
<tfoot> <td>{{ accountReport.getDifference|formatAmount }}</td>
<tr> </tr>
<td><em>{{ 'sumOfSums'|_ }}</em></td> </tfoot>
<td>{{ accountReport.getStart|formatAmount }}</td> </table>
<td>{{ accountReport.getEnd|formatAmount }}</td>
<td>{{ accountReport.getDifference|formatAmount }}</td>
</tr>
</tfoot>
</table>
</div>
</div>

View File

@@ -1,21 +1,14 @@
<div class="box"> <table class="table table-hover">
<div class="box-header with-border"> <tr>
<h3 class="box-title">{{ 'incomeVsExpenses'|_ }}</h3> <td>{{ 'in'|_ }}</td>
</div> <td>{{ incomes.getTotal|formatAmount }}</td>
<div class="box-body table-responsive no-padding"> </tr>
<table class="table table-hover"> <tr>
<tr> <td>{{ 'out'|_ }}</td>
<td>{{ 'in'|_ }}</td> <td>{{ (expenses.getTotal)|formatAmount }}</td>
<td>{{ incomes.getTotal|formatAmount }}</td> </tr>
</tr> <tr>
<tr> <td>{{ 'difference'|_ }}</td>
<td>{{ 'out'|_ }}</td> <td>{{ (incomes.getTotal + expenses.getTotal)|formatAmount }}</td>
<td>{{ (expenses.getTotal)|formatAmount }}</td> </tr>
</tr> </table>
<tr>
<td>{{ 'difference'|_ }}</td>
<td>{{ (incomes.getTotal + expenses.getTotal)|formatAmount }}</td>
</tr>
</table>
</div>
</div>