mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix #3251
This commit is contained in:
parent
19d24b3e2a
commit
c7c875e95f
@ -86,7 +86,6 @@ class IndexController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO the "budgeted" progress bar doesn't update.
|
||||
* Show all budgets.
|
||||
*
|
||||
* @param Request $request
|
||||
@ -106,7 +105,6 @@ class IndexController extends Controller
|
||||
$budgeted = '0';
|
||||
$spent = '0';
|
||||
|
||||
|
||||
// new period stuff:
|
||||
$periodTitle = app('navigation')->periodShow($start, $range);
|
||||
$prevLoop = $this->getPreviousPeriods($start, $range);
|
||||
|
@ -35,6 +35,7 @@ use FireflyIII\Models\RuleTrigger;
|
||||
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
||||
use FireflyIII\Services\Internal\Destroy\BudgetDestroyService;
|
||||
use FireflyIII\User;
|
||||
use http\Exception\RuntimeException;
|
||||
use Illuminate\Database\QueryException;
|
||||
use Illuminate\Support\Collection;
|
||||
use Log;
|
||||
@ -187,12 +188,12 @@ class BudgetRepository implements BudgetRepositoryInterface
|
||||
*/
|
||||
public function getActiveBudgets(): Collection
|
||||
{
|
||||
//throw new \RuntimeException;
|
||||
/** @var Collection $set */
|
||||
$set = $this->user->budgets()->where('active', 1)
|
||||
->orderBy('order', 'DESC')
|
||||
->orderBy('order', 'ASC')
|
||||
->orderBy('name', 'ASC')
|
||||
->get();
|
||||
|
||||
return $set;
|
||||
}
|
||||
|
||||
@ -202,7 +203,7 @@ class BudgetRepository implements BudgetRepositoryInterface
|
||||
public function getBudgets(): Collection
|
||||
{
|
||||
/** @var Collection $set */
|
||||
$set = $this->user->budgets()->orderBy('order', 'DESC')
|
||||
$set = $this->user->budgets()->orderBy('order', 'ASC')
|
||||
->orderBy('name', 'ASC')->get();
|
||||
|
||||
return $set;
|
||||
@ -227,7 +228,7 @@ class BudgetRepository implements BudgetRepositoryInterface
|
||||
{
|
||||
/** @var Collection $set */
|
||||
$set = $this->user->budgets()
|
||||
->orderBy('order', 'DESC')
|
||||
->orderBy('order', 'ASC')
|
||||
->orderBy('name', 'ASC')->where('active', 0)->get();
|
||||
|
||||
return $set;
|
||||
|
Loading…
Reference in New Issue
Block a user