mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 23:45:10 +00:00
Cleanup.
This commit is contained in:
@@ -47,17 +47,16 @@ class ReportController extends Controller
|
||||
|
||||
// does the user have shared accounts?
|
||||
$accounts = $repository->getAccounts(['Default account', 'Asset account']);
|
||||
$hasShared = false;
|
||||
|
||||
// get id's for quick links:
|
||||
$accountIds = [];
|
||||
/** @var Account $account */
|
||||
foreach ($accounts as $account) {
|
||||
if ($account->getMeta('accountRole') == 'sharedAsset') {
|
||||
$hasShared = true;
|
||||
}
|
||||
foreach($accounts as $account) {
|
||||
$accountIds [] = $account->id;
|
||||
}
|
||||
$accountList = join(',',$accountIds);
|
||||
|
||||
|
||||
return view('reports.index', compact('months', 'accounts', 'hasShared', 'start'));
|
||||
return view('reports.index', compact('months', 'accounts', 'start','accountList'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -182,7 +181,7 @@ class ReportController extends Controller
|
||||
}
|
||||
|
||||
// lower threshold
|
||||
if($start < Session::get('first')) {
|
||||
if ($start < Session::get('first')) {
|
||||
$start = Session::get('first');
|
||||
}
|
||||
|
||||
|
@@ -369,20 +369,12 @@ return [
|
||||
'profile' => 'Profile',
|
||||
|
||||
// reports:
|
||||
// 'reportForYear' => 'Yearly report for :year',
|
||||
// 'reportForYearShared' => 'Yearly report for :year (including shared accounts)',
|
||||
// 'reportForMonth' => 'Montly report for :month',
|
||||
// 'reportForMonthShared' => 'Montly report for :month (including shared accounts)',
|
||||
|
||||
'report_default' => 'Default financial report for :start until :end',
|
||||
'quick_link_reports' => 'Quick links',
|
||||
'quick_link_default_report' => 'Default financial report',
|
||||
'report_this_month_shared' => 'Current month, all shared accounts',
|
||||
'report_this_month_non_shared' => 'Current month, all not-shared accounts',
|
||||
'report_this_year_shared' => 'Current year, all shared accounts',
|
||||
'report_this_year_non_shared' => 'Current year, all not-shared accounts',
|
||||
'report_all_time_shared' => 'All-time, all shared accounts',
|
||||
'report_all_time_non_shared' => 'All-time, all not-shared accounts',
|
||||
'report_this_month_quick' => 'Current month, all accounts',
|
||||
'report_this_year_quick' => 'Current year, all accounts',
|
||||
'report_all_time_quick' => 'All-time, all accounts',
|
||||
'reports_can_bookmark' => 'Remember that reports can be bookmarked.',
|
||||
'incomeVsExpenses' => 'Income vs. expenses',
|
||||
'accountBalances' => 'Account balances',
|
||||
|
@@ -392,13 +392,13 @@ return [
|
||||
'average_of_years' => 'Gemiddelde in jaren',
|
||||
|
||||
// reports:
|
||||
// 'reportForYear' => 'Jaaroverzicht :year',
|
||||
// 'reportForYearShared' => 'Jaaroverzicht :year (inclusief gedeelde rekeningen)',
|
||||
// 'reportForMonth' => 'Maandoverzicht voor :month',
|
||||
// 'reportForMonthShared' => 'Maandoverzicht voor :month (inclusief gedeelde rekeningen)',
|
||||
|
||||
'report_default' => 'Standard financieel rapport (:start tot :end)',
|
||||
|
||||
'report_default' => 'Standaard financieel rapport (:start tot :end)',
|
||||
'quick_link_reports' => 'Snelle links',
|
||||
'quick_link_default_report' => 'Standaard financieel rapport',
|
||||
'report_this_month_quick' => 'Deze maand, alle rekeningen',
|
||||
'report_this_year_quick' => 'Dit jaar, alle rekeningen',
|
||||
'report_all_time_quick' => 'Gehele periode, alle rekeningen',
|
||||
'reports_can_bookmark' => 'Je kan rapporten aan je favorieten toevoegen.',
|
||||
'incomeVsExpenses' => 'Inkomsten tegenover uitgaven',
|
||||
'accountBalances' => 'Rekeningsaldi',
|
||||
'balanceStartOfYear' => 'Saldo aan het begin van het jaar',
|
||||
|
@@ -82,6 +82,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
@@ -91,26 +92,28 @@
|
||||
<h4>{{ 'quick_link_default_report'|_ }}</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="#">{{ 'report_this_month_shared'|_ }}</a>
|
||||
<a href="{{ route('reports.report',
|
||||
['default',
|
||||
Session.get('start').startOfMonth.format('Ymd'),
|
||||
Session.get('start').endOfMonth.format('Ymd'),
|
||||
accountList
|
||||
]) }}">{{ 'report_this_month_quick'|_ }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">{{ 'report_this_month_non_shared'|_ }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="#">{{ 'report_this_year_shared'|_ }}</a>
|
||||
<a href="{{ route('reports.report',
|
||||
['default',
|
||||
Session.get('start').startOfYear.format('Ymd'),
|
||||
Session.get('start').endOfYear.format('Ymd'),
|
||||
accountList
|
||||
]) }}">{{ 'report_this_year_quick'|_ }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">{{ 'report_this_year_non_shared'|_ }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="#">{{ 'report_all_time_shared'|_ }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">{{ 'report_all_time_non_shared'|_ }}</a>
|
||||
<a href="{{ route('reports.report',
|
||||
['default',
|
||||
start.format('Ymd'),
|
||||
Session.get('end').endOfMonth.format('Ymd'),
|
||||
accountList
|
||||
]) }}">{{ 'report_all_time_quick'|_ }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
@@ -118,6 +121,7 @@
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -125,6 +129,7 @@
|
||||
|
||||
{% block scripts %}
|
||||
<script type="text/javascript">
|
||||
|
||||
var reportURL = "{{ route('reports.report', ['']) }}";
|
||||
var minDate = "{{ start.format('m/d/Y') }}";
|
||||
var picker;
|
||||
|
Reference in New Issue
Block a user