mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-06 12:45:30 +00:00
Revamp multi-account report.
This commit is contained in:
@@ -80,18 +80,18 @@ class ReportController extends Controller
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View|string
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
*/
|
||||
public function accountReport(Collection $accounts, Collection $expense, Carbon $start, Carbon $end)
|
||||
public function doubleReport(Collection $accounts, Collection $expense, Carbon $start, Carbon $end)
|
||||
{
|
||||
if ($end < $start) {
|
||||
return view('error')->with('message', (string)trans('firefly.end_after_start_date')); // @codeCoverageIgnore
|
||||
[$start, $end] = [$end, $start];
|
||||
}
|
||||
|
||||
$this->repository->cleanupBudgets();
|
||||
|
||||
app('view')->share(
|
||||
'subTitle', trans(
|
||||
'firefly.report_account',
|
||||
['start' => $start->formatLocalized($this->monthFormat), 'end' => $end->formatLocalized($this->monthFormat)]
|
||||
'firefly.report_double',
|
||||
['start' => $start->formatLocalized($this->monthAndDayFormat), 'end' => $end->formatLocalized($this->monthAndDayFormat)]
|
||||
)
|
||||
);
|
||||
|
||||
@@ -292,8 +292,8 @@ class ReportController extends Controller
|
||||
case 'tag':
|
||||
$result = $this->tagReportOptions();
|
||||
break;
|
||||
case 'account':
|
||||
$result = $this->accountReportOptions();
|
||||
case 'double':
|
||||
$result = $this->doubleReportOptions();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -348,7 +348,7 @@ class ReportController extends Controller
|
||||
return redirect(route('reports.index'));
|
||||
}
|
||||
|
||||
if ('account' === $reportType && 0 === $request->getDoubleList()->count()) {
|
||||
if ('double' === $reportType && 0 === $request->getDoubleList()->count()) {
|
||||
session()->flash('error', (string)trans('firefly.select_at_least_one_expense'));
|
||||
|
||||
return redirect(route('reports.index'));
|
||||
@@ -374,8 +374,8 @@ class ReportController extends Controller
|
||||
case 'tag':
|
||||
$uri = route('reports.report.tag', [$accounts, $tags, $start, $end]);
|
||||
break;
|
||||
case 'account':
|
||||
$uri = route('reports.report.account', [$accounts, $double, $start, $end]);
|
||||
case 'double':
|
||||
$uri = route('reports.report.double', [$accounts, $double, $start, $end]);
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user