mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 16:57:09 +00:00
Fix for #1811
This commit is contained in:
@@ -329,25 +329,31 @@ class ReportController extends Controller
|
||||
|
||||
if (0 === $request->getAccountList()->count()) {
|
||||
Log::debug('Account count is zero');
|
||||
session()->flash('error', (string)trans('firefly.select_more_than_one_account'));
|
||||
session()->flash('error', (string)trans('firefly.select_at_least_one_account'));
|
||||
|
||||
return redirect(route('reports.index'));
|
||||
}
|
||||
|
||||
if ('category' === $reportType && 0 === $request->getCategoryList()->count()) {
|
||||
session()->flash('error', (string)trans('firefly.select_more_than_one_category'));
|
||||
session()->flash('error', (string)trans('firefly.select_at_least_one_category'));
|
||||
|
||||
return redirect(route('reports.index'));
|
||||
}
|
||||
|
||||
if ('budget' === $reportType && 0 === $request->getBudgetList()->count()) {
|
||||
session()->flash('error', (string)trans('firefly.select_more_than_one_budget'));
|
||||
session()->flash('error', (string)trans('firefly.select_at_least_one_budget'));
|
||||
|
||||
return redirect(route('reports.index'));
|
||||
}
|
||||
|
||||
if ('tag' === $reportType && 0 === $request->getTagList()->count()) {
|
||||
session()->flash('error', (string)trans('firefly.select_more_than_one_tag'));
|
||||
session()->flash('error', (string)trans('firefly.select_at_least_one_tag'));
|
||||
|
||||
return redirect(route('reports.index'));
|
||||
}
|
||||
|
||||
if ('account' === $reportType && 0 === $request->getExpenseList()->count()) {
|
||||
session()->flash('error', (string)trans('firefly.select_at_least_one_expense'));
|
||||
|
||||
return redirect(route('reports.index'));
|
||||
}
|
||||
|
Reference in New Issue
Block a user