Some code cleanup for #1272

This commit is contained in:
James Cole
2018-04-22 17:10:11 +02:00
parent f7d3d4a010
commit 8032684ad0
24 changed files with 339 additions and 269 deletions

View File

@@ -325,25 +325,25 @@ class ReportController extends Controller
if (0 === $request->getAccountList()->count()) {
Log::debug('Account count is zero');
Session::flash('error', trans('firefly.select_more_than_one_account'));
session()->flash('error', trans('firefly.select_more_than_one_account'));
return redirect(route('reports.index'));
}
if (0 === $request->getCategoryList()->count() && 'category' === $reportType) {
Session::flash('error', trans('firefly.select_more_than_one_category'));
session()->flash('error', trans('firefly.select_more_than_one_category'));
return redirect(route('reports.index'));
}
if (0 === $request->getBudgetList()->count() && 'budget' === $reportType) {
Session::flash('error', trans('firefly.select_more_than_one_budget'));
session()->flash('error', trans('firefly.select_more_than_one_budget'));
return redirect(route('reports.index'));
}
if (0 === $request->getTagList()->count() && 'tag' === $reportType) {
Session::flash('error', trans('firefly.select_more_than_one_tag'));
session()->flash('error', trans('firefly.select_more_than_one_tag'));
return redirect(route('reports.index'));
}