Working but fairly useless budget report

This commit is contained in:
James Cole
2016-12-10 06:50:13 +01:00
parent 1b7546f3f9
commit bc11c3fab2
6 changed files with 105 additions and 119 deletions

View File

@@ -17,7 +17,6 @@
<thead>
<tr>
<th data-defaultsign="az">{{ 'name'|_ }}</th>
<th data-defaultsign="_19">{{ 'earned'|_ }}</th>
<th data-defaultsign="_19">{{ 'spent'|_ }}</th>
</tr>
</thead>
@@ -28,12 +27,7 @@
<a href="{{ route('accounts.show', account.id) }}" title="{{ account.name }}">{{ account.name }}</a>
</td>
{% if accountSummary[account.id] %}
<td data-value="{{ accountSummary[account.id].earned }}">{{ accountSummary[account.id].earned|formatAmount }}</td>
{% else %}
<td data-value="0">{{ 0|formatAmount }}</td>
{% endif %}
{% if accountSummary[account.id] %}
<td data-value="{{ accountSummary[account.id].spent }}">{{ accountSummary[account.id].spent|formatAmount }}</td>
<td data-value="{{ accountSummary[account.id] }}">{{ accountSummary[account.id]|formatAmount }}</td>
{% else %}
<td data-value="0">{{ 0|formatAmount }}</td>
{% endif %}
@@ -63,12 +57,7 @@
<a href="{{ route('budgets.show', budget.id) }}" title="{{ budget.name }}">{{ budget.name }}</a>
</td>
{% if budgetSummary[budget.id] %}
<td data-value="{{ budgetSummary[budget.id].earned }}">{{ budgetSummary[budget.id].earned|formatAmount }}</td>
{% else %}
<td data-value="0">{{ 0|formatAmount }}</td>
{% endif %}
{% if budgetSummary[budget.id] %}
<td data-value="{{ budgetSummary[budget.id].spent }}">{{ budgetSummary[budget.id].spent|formatAmount }}</td>
<td data-value="{{ budgetSummary[budget.id] }}">{{ budgetSummary[budget.id]|formatAmount }}</td>
{% else %}
<td data-value="0">{{ 0|formatAmount }}</td>
{% endif %}
@@ -120,6 +109,10 @@
<h3 class="box-title">{{ 'income_and_expenses'|_ }}</h3>
</div>
<div class="box-body">
Here be a chart with the budget limits as well if relevant.<br>
amount spent vs budget limit reps<br>
over the entire period the amount spent would rise and the budget limit rep would be like a heart beat jumping up and down<br>
needs to be two axes to work<br>
<canvas id="in-out-chart" style="margin:0 auto;" height="300"></canvas>
</div>
</div>
@@ -244,11 +237,11 @@
var budgetIds = '{{ budgetIds }}';
// chart uri's
var categoryIncomeUri = '{{ route('chart.category.category-income', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd'),'OTHERS']) }}';
var categoryExpenseUri = '{{ route('chart.category.category-expense', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd'),'OTHERS']) }}';
var accountIncomeUri = '{{ route('chart.category.account-income', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd'),'OTHERS']) }}';
var accountExpenseUri = '{{ route('chart.category.account-expense', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd'),'OTHERS']) }}';
var mainUri = '{{ route('chart.category.main', [accountIds, categoryIds, start.format('Ymd'), end.format('Ymd')]) }}';
var budgetIncomeUri = '{{ route('chart.budget.budget-income', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd'),'OTHERS']) }}';
var budgetExpenseUri = '{{ route('chart.budget.budget-expense', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd'),'OTHERS']) }}';
var accountIncomeUri = '{{ route('chart.budget.account-income', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd'),'OTHERS']) }}';
var accountExpenseUri = '{{ route('chart.budget.account-expense', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd'),'OTHERS']) }}';
var mainUri = '{{ route('chart.budget.main', [accountIds, budgetIds, start.format('Ymd'), end.format('Ymd')]) }}';
</script>