mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Added sum for the current period, see issue #99
This commit is contained in:
parent
51e30aed66
commit
deefef83bd
@ -152,10 +152,11 @@ class CategoryController extends Controller
|
||||
$set = $repository->getJournals($category, $page);
|
||||
$count = $repository->countJournals($category);
|
||||
$totalSum = $repository->journalsSum($category);
|
||||
$periodSum = $repository->journalsSum($category, Session::get('start'), Session::get('end'));
|
||||
$journals = new LengthAwarePaginator($set, $count, 50, $page);
|
||||
$journals->setPath('categories/show/' . $category->id);
|
||||
|
||||
return view('categories.show', compact('category', 'journals', 'hideCategory', 'totalSum'));
|
||||
return view('categories.show', compact('category', 'journals', 'hideCategory', 'totalSum', 'periodSum'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -16,6 +16,7 @@ return [
|
||||
'from' => 'From',
|
||||
'to' => 'To',
|
||||
'total_sum' => 'Total sum',
|
||||
'period_sum' => 'Sum for period',
|
||||
'showEverything' => 'Show everything',
|
||||
'never' => 'Never',
|
||||
'search_results_for' => 'Search results for ":query"',
|
||||
|
@ -16,6 +16,7 @@ return [
|
||||
'from' => 'Van',
|
||||
'to' => 'Tot',
|
||||
'total_sum' => 'Totale som',
|
||||
'period_sum' => 'Som van periode',
|
||||
'showEverything' => 'Laat alles zien',
|
||||
'never' => 'Nooit',
|
||||
'search_results_for' => 'Zoekresultaten voor ":query"',
|
||||
|
@ -45,7 +45,7 @@
|
||||
<h3 class="box-title">{{ 'transactions'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
{% include 'list/journals' with {showPageSum: true,showTotalSum: true} %}
|
||||
{% include 'list/journals' with {showPageSum: true, showTotalSum: true, showPeriodSum: true} %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -125,13 +125,18 @@
|
||||
<td colspan="2">{{ _sum|formatAmount }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if showPeriodSum %}
|
||||
<tr>
|
||||
<td colspan="3" style="text-align: right;"><em>{{ 'period_sum'|_ }}</em></td>
|
||||
<td colspan="2">{{ periodSum|formatAmount }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if showTotalSum %}
|
||||
<tr>
|
||||
<td colspan="3" style="text-align: right;"><em>{{ 'total_sum'|_ }}</em></td>
|
||||
<td colspan="2">{{ totalSum|formatAmount }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user