This commit is contained in:
James Cole 2018-11-23 08:40:08 +01:00
parent 7a8f6d8660
commit c3fa1612d6
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E
2 changed files with 15 additions and 8 deletions

View File

@ -329,25 +329,31 @@ class ReportController extends Controller
if (0 === $request->getAccountList()->count()) { if (0 === $request->getAccountList()->count()) {
Log::debug('Account count is zero'); 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')); return redirect(route('reports.index'));
} }
if ('category' === $reportType && 0 === $request->getCategoryList()->count()) { 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')); return redirect(route('reports.index'));
} }
if ('budget' === $reportType && 0 === $request->getBudgetList()->count()) { 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')); return redirect(route('reports.index'));
} }
if ('tag' === $reportType && 0 === $request->getTagList()->count()) { 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')); return redirect(route('reports.index'));
} }

View File

@ -760,10 +760,11 @@ return [
'credit_card_options' => 'Credit card options', 'credit_card_options' => 'Credit card options',
'no_transactions_account' => 'There are no transactions (in this period) for asset account ":name".', 'no_transactions_account' => 'There are no transactions (in this period) for asset account ":name".',
'no_data_for_chart' => 'There is not enough information (yet) to generate this chart.', 'no_data_for_chart' => 'There is not enough information (yet) to generate this chart.',
'select_more_than_one_account' => 'Please select more than one account', 'select_at_least_one_account' => 'Please select at least one asset account',
'select_more_than_one_category' => 'Please select more than one category', 'select_at_least_one_category' => 'Please select at least one category',
'select_more_than_one_budget' => 'Please select more than one budget', 'select_at_least_one_budget' => 'Please select at least one budget',
'select_more_than_one_tag' => 'Please select more than one tag', 'select_at_least_one_tag' => 'Please select at least one tag',
'select_at_least_one_expense' => 'Please select at least one combination of expense/revenue accounts. If you have none (the list is empty) this report is not available.',
'account_default_currency' => 'This will be the default currency associated with this account.', 'account_default_currency' => 'This will be the default currency associated with this account.',
'reconcile_has_more' => 'Your Firefly III ledger has more money in it than your bank claims you should have. There are several options. Please choose what to do. Then, press "Confirm reconciliation".', 'reconcile_has_more' => 'Your Firefly III ledger has more money in it than your bank claims you should have. There are several options. Please choose what to do. Then, press "Confirm reconciliation".',
'reconcile_has_less' => 'Your Firefly III ledger has less money in it than your bank claims you should have. There are several options. Please choose what to do. Then, press "Confirm reconciliation".', 'reconcile_has_less' => 'Your Firefly III ledger has less money in it than your bank claims you should have. There are several options. Please choose what to do. Then, press "Confirm reconciliation".',