mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
New revenue accounts chart.
This commit is contained in:
parent
0b526c0168
commit
e4ea234707
@ -138,9 +138,10 @@ class HomeController extends Controller
|
|||||||
/** @var Carbon $start */
|
/** @var Carbon $start */
|
||||||
$start = session('start', Carbon::now()->startOfMonth());
|
$start = session('start', Carbon::now()->startOfMonth());
|
||||||
/** @var Carbon $end */
|
/** @var Carbon $end */
|
||||||
$end = session('end', Carbon::now()->endOfMonth());
|
$end = session('end', Carbon::now()->endOfMonth());
|
||||||
$showTour = Preferences::get('tour', true)->data;
|
$showTour = Preferences::get('tour', true)->data;
|
||||||
$accounts = $repository->getAccountsById($frontPage->data);
|
$accounts = $repository->getAccountsById($frontPage->data);
|
||||||
|
$showDepositsFrontpage = Preferences::get('showDepositsFrontpage', false)->data;
|
||||||
|
|
||||||
foreach ($accounts as $account) {
|
foreach ($accounts as $account) {
|
||||||
$set = $tasker->getJournalsInPeriod(new Collection([$account]), [], $start, $end);
|
$set = $tasker->getJournalsInPeriod(new Collection([$account]), [], $start, $end);
|
||||||
@ -152,7 +153,7 @@ class HomeController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
return view(
|
return view(
|
||||||
'index', compact('count', 'showTour', 'title', 'subTitle', 'mainTitleIcon', 'transactions')
|
'index', compact('count', 'showTour', 'title', 'subTitle', 'mainTitleIcon', 'transactions','showDepositsFrontpage')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@ function drawChart() {
|
|||||||
stackedColumnChart('chart/budget/frontpage', 'budgets-chart', {beforeDraw: beforeDrawIsEmpty});
|
stackedColumnChart('chart/budget/frontpage', 'budgets-chart', {beforeDraw: beforeDrawIsEmpty});
|
||||||
columnChart('chart/category/frontpage', 'categories-chart', {beforeDraw: beforeDrawIsEmpty});
|
columnChart('chart/category/frontpage', 'categories-chart', {beforeDraw: beforeDrawIsEmpty});
|
||||||
columnChart('chart/account/expense', 'expense-accounts-chart', {beforeDraw: beforeDrawIsEmpty});
|
columnChart('chart/account/expense', 'expense-accounts-chart', {beforeDraw: beforeDrawIsEmpty});
|
||||||
|
columnChart('chart/account/revenue', 'revenue-accounts-chart', {beforeDraw: beforeDrawIsEmpty});
|
||||||
|
|
||||||
|
|
||||||
getBoxAmounts();
|
getBoxAmounts();
|
||||||
|
@ -101,6 +101,18 @@
|
|||||||
<canvas id="expense-accounts-chart" style="width:100%;" height="400"></canvas>
|
<canvas id="expense-accounts-chart" style="width:100%;" height="400"></canvas>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- OPTIONAL REVENUE ACCOUNTS -->
|
||||||
|
{% if showDepositsFrontpage %}
|
||||||
|
<div class="box">
|
||||||
|
<div class="box-header with-border">
|
||||||
|
<h3 class="box-title">{{ 'revenue_accounts'|_ }}</h3>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="box-body">
|
||||||
|
<canvas id="revenue-accounts-chart" style="width:100%;" height="400"></canvas>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user