mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Enable inactive budgets.
This commit is contained in:
@@ -98,7 +98,8 @@ class BudgetController extends Controller
|
||||
*/
|
||||
public function index(BudgetRepositoryInterface $repository)
|
||||
{
|
||||
$budgets = Auth::user()->budgets()->get();
|
||||
$budgets = Auth::user()->budgets()->where('active',1)->get();
|
||||
$inactive = Auth::user()->budgets()->where('active',0)->get();
|
||||
|
||||
// loop the budgets:
|
||||
$budgets->each(
|
||||
@@ -117,7 +118,7 @@ class BudgetController extends Controller
|
||||
$budgetMax = Preferences::get('budgetMaximum', 1000);
|
||||
$budgetMaximum = $budgetMax->data;
|
||||
|
||||
return view('budgets.index', compact('budgetMaximum', 'budgets', 'spent', 'spentPCT', 'overspent', 'amount'));
|
||||
return view('budgets.index', compact('budgetMaximum','inactive', 'budgets', 'spent', 'spentPCT', 'overspent', 'amount'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user