Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
New setting called 'budgetMaximum', see issue #36
James Colecb2b44fef35b
diff --git a/app/controllers/PreferencesController.php b/app/controllers/PreferencesController.phpindex 852059497c..1330af52ef 100644--- a/app/controllers/PreferencesController.php+++ b/app/controllers/PreferencesController.php@@ -33,9 +33,12 @@ class PreferencesController extends BaseController$viewRange = $preferences->get('viewRange', '1M');$viewRangeValue = $viewRange->data;$frontPage = $preferences->get('frontpageAccounts', []);+ $budgetMax = $preferences->get('budgetMaximum', 1000);+ $budgetMaximum = $budgetMax->data;-- return View::make('preferences.index')->with('accounts', $accounts)->with('frontpageAccounts', $frontPage)->with('viewRange', $viewRangeValue);+ return View::make('preferences.index', compact('budgetMaximum'))->with('accounts', $accounts)->with('frontpageAccounts', $frontPage)->with(+ 'viewRange', $viewRangeValue+ );}/**@@ -43,7 +46,6 @@ class PreferencesController extends BaseController*/public function postIndex(){-/** @var \FireflyIII\Shared\Preferences\Preferences $preferences */$preferences = App::make('FireflyIII\Shared\Preferences\Preferences');@@ -61,6 +63,11 @@ class PreferencesController extends BaseControllerSession::forget('end');Session::forget('range');+ // budget maximum:+ $budgetMaximum = intval(Input::get('budgetMaximum'));+ $preferences->set('budgetMaximum', $budgetMaximum);++Session::flash('success', 'Preferences saved!');return Redirect::route('preferences');