mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-11 12:18:08 +00:00
Don't throw error, report it.
This commit is contained in:
@@ -82,7 +82,7 @@ class ReportController extends Controller
|
||||
public function auditReport(Collection $accounts, Carbon $start, Carbon $end)
|
||||
{
|
||||
if ($end < $start) {
|
||||
return view('error')->with('message', (string) trans('firefly.end_after_start_date'));
|
||||
return view('errors.error')->with('message', (string) trans('firefly.end_after_start_date'));
|
||||
}
|
||||
$this->repository->cleanupBudgets();
|
||||
$start->endOfDay(); // end of day so the final balance is at the end of that day.
|
||||
@@ -115,7 +115,7 @@ class ReportController extends Controller
|
||||
public function budgetReport(Collection $accounts, Collection $budgets, Carbon $start, Carbon $end)
|
||||
{
|
||||
if ($end < $start) {
|
||||
return view('error')->with('message', (string) trans('firefly.end_after_start_date'));
|
||||
return view('errors.error')->with('message', (string) trans('firefly.end_after_start_date'));
|
||||
}
|
||||
$this->repository->cleanupBudgets();
|
||||
$start->endOfDay(); // end of day so the final balance is at the end of that day.
|
||||
@@ -149,7 +149,7 @@ class ReportController extends Controller
|
||||
public function categoryReport(Collection $accounts, Collection $categories, Carbon $start, Carbon $end)
|
||||
{
|
||||
if ($end < $start) {
|
||||
return view('error')->with('message', (string) trans('firefly.end_after_start_date'));
|
||||
return view('errors.error')->with('message', (string) trans('firefly.end_after_start_date'));
|
||||
}
|
||||
$this->repository->cleanupBudgets();
|
||||
$start->endOfDay(); // end of day so the final balance is at the end of that day.
|
||||
@@ -183,7 +183,7 @@ class ReportController extends Controller
|
||||
public function defaultReport(Collection $accounts, Carbon $start, Carbon $end)
|
||||
{
|
||||
if ($end < $start) {
|
||||
return view('error')->with('message', (string) trans('firefly.end_after_start_date'));
|
||||
return view('errors.error')->with('message', (string) trans('firefly.end_after_start_date'));
|
||||
}
|
||||
|
||||
$this->repository->cleanupBudgets();
|
||||
@@ -336,7 +336,7 @@ class ReportController extends Controller
|
||||
}
|
||||
|
||||
if ($request->getEndDate() < $request->getStartDate()) {
|
||||
return view('error')->with('message', (string) trans('firefly.end_after_start_date'));
|
||||
return view('errors.error')->with('message', (string) trans('firefly.end_after_start_date'));
|
||||
}
|
||||
|
||||
$url = match ($reportType) {
|
||||
@@ -361,7 +361,7 @@ class ReportController extends Controller
|
||||
public function tagReport(Collection $accounts, Collection $tags, Carbon $start, Carbon $end)
|
||||
{
|
||||
if ($end < $start) {
|
||||
return view('error')->with('message', (string) trans('firefly.end_after_start_date'));
|
||||
return view('errors.error')->with('message', (string) trans('firefly.end_after_start_date'));
|
||||
}
|
||||
$this->repository->cleanupBudgets();
|
||||
$start->endOfDay(); // end of day so the final balance is at the end of that day.
|
||||
|
||||
Reference in New Issue
Block a user