mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-22 11:11:25 +00:00
Some code cleanup [skip ci]
This commit is contained in:
@@ -103,6 +103,7 @@ class AccountController extends Controller
|
|||||||
$chartProperties->addProperty($start);
|
$chartProperties->addProperty($start);
|
||||||
$chartProperties->addProperty($end);
|
$chartProperties->addProperty($end);
|
||||||
$chartProperties->addProperty('frontpage');
|
$chartProperties->addProperty('frontpage');
|
||||||
|
$chartProperties->addProperty('accounts');
|
||||||
|
|
||||||
/** @var Account $account */
|
/** @var Account $account */
|
||||||
foreach($accounts as $account) {
|
foreach($accounts as $account) {
|
||||||
|
|||||||
@@ -2,11 +2,13 @@
|
|||||||
|
|
||||||
namespace FireflyIII\Http\Controllers\Chart;
|
namespace FireflyIII\Http\Controllers\Chart;
|
||||||
|
|
||||||
|
use Auth;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use FireflyIII\Http\Controllers\Controller;
|
use FireflyIII\Http\Controllers\Controller;
|
||||||
use FireflyIII\Models\Budget;
|
use FireflyIII\Models\Budget;
|
||||||
use FireflyIII\Models\LimitRepetition;
|
use FireflyIII\Models\LimitRepetition;
|
||||||
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||||
|
use FireflyIII\Support\ChartProperties;
|
||||||
use Grumpydictator\Gchart\GChart;
|
use Grumpydictator\Gchart\GChart;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Navigation;
|
use Navigation;
|
||||||
@@ -112,6 +114,8 @@ class BudgetController extends Controller
|
|||||||
$end = Session::get('end', Carbon::now()->endOfMonth());
|
$end = Session::get('end', Carbon::now()->endOfMonth());
|
||||||
$allEntries = new Collection;
|
$allEntries = new Collection;
|
||||||
|
|
||||||
|
|
||||||
|
/** @var Budget $budget */
|
||||||
foreach ($budgets as $budget) {
|
foreach ($budgets as $budget) {
|
||||||
$repetitions = $repository->getBudgetLimitRepetitions($budget, $start, $end);
|
$repetitions = $repository->getBudgetLimitRepetitions($budget, $start, $end);
|
||||||
if ($repetitions->count() == 0) {
|
if ($repetitions->count() == 0) {
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class HomeController extends Controller
|
|||||||
/**
|
/**
|
||||||
* @param AccountRepositoryInterface $repository
|
* @param AccountRepositoryInterface $repository
|
||||||
*
|
*
|
||||||
* @return \Illuminate\View\View
|
* @return \Illuminate\Http\RedirectResponse|\Illuminate\View\View
|
||||||
*/
|
*/
|
||||||
public function index(AccountRepositoryInterface $repository)
|
public function index(AccountRepositoryInterface $repository)
|
||||||
{
|
{
|
||||||
@@ -54,7 +54,7 @@ class HomeController extends Controller
|
|||||||
$types = Config::get('firefly.accountTypesByIdentifier.asset');
|
$types = Config::get('firefly.accountTypesByIdentifier.asset');
|
||||||
$count = $repository->countAccounts($types);
|
$count = $repository->countAccounts($types);
|
||||||
|
|
||||||
if($count == 0) {
|
if ($count == 0) {
|
||||||
return Redirect::route('new-user.index');
|
return Redirect::route('new-user.index');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user