mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-30 02:26:58 +00:00
Merge branch 'develop' of https://github.com/JC5/firefly-iii into develop
* 'develop' of https://github.com/JC5/firefly-iii: Fix a bug where the frontpage would not honor transaction order. Fix a bug where the report page would mess up the session dates.
This commit is contained in:
@@ -42,8 +42,16 @@ class ReportController extends Controller
|
||||
*/
|
||||
public function index(AccountRepositoryInterface $repository)
|
||||
{
|
||||
$start = Session::get('first');
|
||||
$months = $this->helper->listOfMonths($start);
|
||||
$start = Session::get('first');
|
||||
$months = $this->helper->listOfMonths($start);
|
||||
$startOfMonth = clone Session::get('start');
|
||||
$endOfMonth = clone Session::get('start');
|
||||
$startOfYear = clone Session::get('start');
|
||||
$endOfYear = clone Session::get('start');
|
||||
$startOfMonth->startOfMonth();
|
||||
$endOfMonth->endOfMonth();
|
||||
$startOfYear->startOfYear();
|
||||
$endOfYear->endOfYear();
|
||||
|
||||
// does the user have shared accounts?
|
||||
$accounts = $repository->getAccounts(['Default account', 'Asset account']);
|
||||
@@ -56,7 +64,9 @@ class ReportController extends Controller
|
||||
$accountList = join(',', $accountIds);
|
||||
|
||||
|
||||
return view('reports.index', compact('months', 'accounts', 'start', 'accountList'));
|
||||
return view('reports.index', compact('months', 'accounts', 'start', 'accountList',
|
||||
'startOfMonth', 'endOfMonth', 'startOfYear', 'endOfYear'
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -194,7 +204,7 @@ class ReportController extends Controller
|
||||
'firefly.report_default',
|
||||
[
|
||||
'start' => $start->formatLocalized($this->monthFormat),
|
||||
'end' => $end->formatLocalized($this->monthFormat)
|
||||
'end' => $end->formatLocalized($this->monthFormat),
|
||||
]
|
||||
)
|
||||
);
|
||||
|
@@ -172,6 +172,7 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
->before($end)
|
||||
->after($start)
|
||||
->orderBy('transaction_journals.date', 'DESC')
|
||||
->orderBy('transaction_journals.order', 'ASC')
|
||||
->orderBy('transaction_journals.id', 'DESC')
|
||||
->take(10)
|
||||
->get(['transaction_journals.*', 'transaction_currencies.symbol', 'transaction_types.type']);
|
||||
|
@@ -95,16 +95,16 @@
|
||||
<li>
|
||||
<a href="{{ route('reports.report',
|
||||
['default',
|
||||
Session.get('start').startOfMonth.format('Ymd'),
|
||||
Session.get('start').endOfMonth.format('Ymd'),
|
||||
startOfMonth.format('Ymd'),
|
||||
endOfMonth.format('Ymd'),
|
||||
accountList
|
||||
]) }}">{{ 'report_this_month_quick'|_ }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('reports.report',
|
||||
['default',
|
||||
Session.get('start').startOfYear.format('Ymd'),
|
||||
Session.get('start').endOfYear.format('Ymd'),
|
||||
startOfYear.format('Ymd'),
|
||||
endOfYear.format('Ymd'),
|
||||
accountList
|
||||
]) }}">{{ 'report_this_year_quick'|_ }}</a>
|
||||
</li>
|
||||
@@ -112,7 +112,7 @@
|
||||
<a href="{{ route('reports.report',
|
||||
['default',
|
||||
start.format('Ymd'),
|
||||
Session.get('end').endOfMonth.format('Ymd'),
|
||||
endOfMonth.format('Ymd'),
|
||||
accountList
|
||||
]) }}">{{ 'report_all_time_quick'|_ }}</a>
|
||||
</li>
|
||||
|
Reference in New Issue
Block a user