Removed unused "budget maximum" preference

This commit is contained in:
James Cole 2016-09-03 21:13:08 +02:00
parent 8c7ef49eb6
commit ce003f217b
4 changed files with 3 additions and 21 deletions

View File

@ -221,12 +221,11 @@ class BudgetController extends Controller
}
$budgetMaximum = Preferences::get('budgetMaximum', 1000)->data;
$defaultCurrency = Amount::getDefaultCurrency();
return view(
'budgets.index', compact(
'budgetMaximum', 'periodStart', 'periodEnd',
'periodStart', 'periodEnd',
'period', 'range', 'budgetIncomeTotal',
'defaultCurrency', 'inactive', 'budgets',
'spent', 'budgeted'

View File

@ -79,9 +79,7 @@ class PreferencesController extends Controller
$viewRangePref = Preferences::get('viewRange', '1M');
$viewRange = $viewRangePref->data;
$frontPageAccounts = Preferences::get('frontPageAccounts', []);
$budgetMax = Preferences::get('budgetMaximum', 1000);
$language = Preferences::get('language', env('DEFAULT_LANGUAGE', 'en_US'))->data;
$budgetMaximum = $budgetMax->data;
$transactionPageSize = Preferences::get('transactionPageSize', 50)->data;
$customFiscalYear = Preferences::get('customFiscalYear', 0)->data;
$fiscalYearStartStr = Preferences::get('fiscalYearStart', '01-01')->data;
@ -93,7 +91,7 @@ class PreferencesController extends Controller
return view(
'preferences.index',
compact(
'budgetMaximum', 'language', 'accounts', 'frontPageAccounts',
'language', 'accounts', 'frontPageAccounts',
'viewRange', 'customFiscalYear', 'transactionPageSize', 'fiscalYearStart', 'is2faEnabled',
'has2faSecret', 'showIncomplete'
)
@ -137,10 +135,6 @@ class PreferencesController extends Controller
Session::forget('end');
Session::forget('range');
// budget maximum:
$budgetMaximum = intval(Input::get('budgetMaximum'));
Preferences::set('budgetMaximum', $budgetMaximum);
// custom fiscal year
$customFiscalYear = intval(Input::get('customFiscalYear')) === 1;
$fiscalYearStart = date('m-d', strtotime(Input::get('fiscalYearStart')));

View File

@ -125,7 +125,7 @@
<input type="hidden" name="balance_currency_id" value="1"/>
<input class="form-control budgetAmount" data-original="{{ budget.currentRep.amount|number_format(0,'','') }}"
data-id="{{ budget.id }}" value="{{ budget.currentRep.amount|number_format(0,'','') }}" autocomplete="off"
step="1" min="0" max="{{ budgetMaximum }}" name="amount" type="number">
step="1" min="0" name="amount" type="number">
</div>
<!--
<div class="small">

View File

@ -34,17 +34,6 @@
{% endfor %}
</div>
</div>
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'pref_budget_settings'|_ }}</h3>
</div>
<div class="box-body">
<p class="text-info">
{{ 'pref_budget_settings_help'|_ }}
</p>
{{ ExpandedForm.amount('budgetMaximum',budgetMaximum,{'label' : 'budget_maximum'|_}) }}
</div>
</div>
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'pref_custom_fiscal_year'|_ }}</h3>