mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Retrieve the new setting called 'budgetMaximum' which allows you to set the maximum budget.
This commit is contained in:
parent
f0babb4be7
commit
01c5e15bcd
@ -115,12 +115,14 @@ class BudgetController extends BaseController
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
$spent = $budgets->sum('spent');
|
$spent = $budgets->sum('spent');
|
||||||
$amount = $this->_preferences->get('budgetIncomeTotal' . \Session::get('start', Carbon::now()->startOfMonth())->format('FY'), 1000)->data;
|
$amount = $this->_preferences->get('budgetIncomeTotal' . \Session::get('start', Carbon::now()->startOfMonth())->format('FY'), 1000)->data;
|
||||||
$overspent = $spent > $amount;
|
$overspent = $spent > $amount;
|
||||||
$spentPCT = $overspent ? ceil($amount / $spent * 100) : ceil($spent / $amount * 100);
|
$spentPCT = $overspent ? ceil($amount / $spent * 100) : ceil($spent / $amount * 100);
|
||||||
|
$budgetMax = $this->_preferences->get('budgetMaximum', 1000);
|
||||||
|
$budgetMaximum = $budgetMax->data;
|
||||||
|
|
||||||
return View::make('budgets.index', compact('budgets', 'spent', 'spentPCT', 'overspent', 'amount'));
|
return View::make('budgets.index', compact('budgetMaximum', 'budgets', 'spent', 'spentPCT', 'overspent', 'amount'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user