mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-09 22:26:04 +00:00
Some extensions to budgets.
This commit is contained in:
@@ -257,6 +257,7 @@ return [
|
||||
'pref_1M' => 'One month',
|
||||
'pref_3M' => 'Three months (quarter)',
|
||||
'pref_6M' => 'Six months',
|
||||
'pref_1Y' => 'One year',
|
||||
'pref_languages' => 'Languages',
|
||||
'pref_languages_help' => 'Firefly III supports several languages. Which one do you prefer?',
|
||||
'pref_custom_fiscal_year' => 'Fiscal year settings',
|
||||
@@ -476,6 +477,12 @@ return [
|
||||
'update_amount' => 'Update amount',
|
||||
'update_budget' => 'Update budget',
|
||||
'update_budget_amount_range' => 'Update (expected) available amount between :start and :end',
|
||||
'warn_range_weekly' => 'You have selected a custom date range using the top right date range selection tool. Your preferences indicate you prefer a "weekly" view. Changes to the budgets below will be valid for exactly one week from now.',
|
||||
'warn_range_monthly' => 'You have selected a custom date range using the top right date range selection tool. Your preferences indicate you prefer a "monthly" view. Changes to the budgets below will be valid for exactly one month from now.',
|
||||
'warn_range_quarterly' => 'You have selected a custom date range using the top right date range selection tool. Your preferences indicate you prefer a "quarter" view. Changes to the budgets below will be valid for exactly three months from now.',
|
||||
'warn_range_half-year' => 'You have selected a custom date range using the top right date range selection tool. Your preferences indicate you prefer the "six months" overview. Changes to the budgets below will be valid for exactly six months from now.',
|
||||
'warn_range_custom' => 'You have selected a custom date range using the top right date range selection tool. Your preferences indicate you prefer a custom range. Changes to the budgets below will be valid for your custom range.',
|
||||
'warn_range_yearly' => 'You have selected a custom date range using the top right date range selection tool. Your preferences indicate you prefer the "yearly" overview. Changes to the budgets below will be valid for exactly one year from now.',
|
||||
|
||||
// bills:
|
||||
'matching_on' => 'Matching on',
|
||||
|
@@ -99,52 +99,65 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
{% for budget in budgets %}
|
||||
<div class="col-lg-4 col-sm-6 col-md-6">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">
|
||||
<!-- link in header -->
|
||||
{% if budget.currentRep.id %}
|
||||
<a href="{{ route('budgets.show', [budget.id, budget.currentRep.id]) }}" class="budget-link"
|
||||
data-id="{{ budget.id }}">{{ budget.name }}</a>
|
||||
{% else %}
|
||||
<a href="{{ route('budgets.show',budget.id) }}" class="budget-link" data-id="{{ budget.id }}">{{ budget.name }}</a>
|
||||
{% endif %}
|
||||
</h3>
|
||||
{% if userWarning != "" %}
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<p class="well">
|
||||
<span class="text-danger">
|
||||
<i class="fa fa-exclamation-circle" aria-hidden="true"></i>
|
||||
{{ userWarning }}
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- ACTIONS MENU -->
|
||||
<div class="box-tools pull-right">
|
||||
<button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-box-tool dropdown-toggle" data-toggle="dropdown"><i class="fa fa-ellipsis-v"></i></button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="{{ route('budgets.edit',budget.id) }}"><i class="fa fa-pencil fa-fw"></i> {{ 'edit'|_ }}</a></li>
|
||||
<li><a href="{{ route('budgets.delete',budget.id) }}"><i class="fa fa-trash fa-fw"></i> {{ 'delete'|_ }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="row">
|
||||
{% for budget in budgets %}
|
||||
<div class="col-lg-4 col-sm-6 col-md-6">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">
|
||||
<!-- link in header -->
|
||||
{% if budget.currentRep.id %}
|
||||
<a href="{{ route('budgets.show', [budget.id, budget.currentRep.id]) }}" class="budget-link"
|
||||
data-id="{{ budget.id }}">{{ budget.name }}</a>
|
||||
{% else %}
|
||||
<a href="{{ route('budgets.show',budget.id) }}" class="budget-link" data-id="{{ budget.id }}">{{ budget.name }}</a>
|
||||
{% endif %}
|
||||
</h3>
|
||||
|
||||
<!-- ACTIONS MENU -->
|
||||
<div class="box-tools pull-right">
|
||||
<button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-box-tool dropdown-toggle" data-toggle="dropdown"><i class="fa fa-ellipsis-v"></i></button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="{{ route('budgets.edit',budget.id) }}"><i class="fa fa-pencil fa-fw"></i> {{ 'edit'|_ }}</a></li>
|
||||
<li><a href="{{ route('budgets.delete',budget.id) }}"><i class="fa fa-trash fa-fw"></i> {{ 'delete'|_ }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td style="width:40%;">
|
||||
{{ 'budgeted'|_ }}
|
||||
<span class="small"><br/>
|
||||
{{ session('start').formatLocalized(monthAndDayFormat) }} -
|
||||
{{ session('end').formatLocalized(monthAndDayFormat) }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<div class="form-group" style="margin-bottom:0;">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">{{ defaultCurrency.symbol|raw }}</div>
|
||||
<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">
|
||||
</div>
|
||||
<!--
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td style="width:40%;">
|
||||
{{ 'budgeted'|_ }}
|
||||
<span class="small"><br/>
|
||||
{{ session('start').formatLocalized(monthAndDayFormat) }} -
|
||||
{{ session('end').formatLocalized(monthAndDayFormat) }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<div class="form-group" style="margin-bottom:0;">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">{{ defaultCurrency.symbol|raw }}</div>
|
||||
<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">
|
||||
</div>
|
||||
<!--
|
||||
<div class="small">
|
||||
<ul class="list-inline">
|
||||
<li>Previously budgeted:</li>
|
||||
@@ -153,45 +166,45 @@
|
||||
</ul>
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:40%;">
|
||||
{{ 'spent'|_ }}
|
||||
<span class="small"><br/>
|
||||
{{ session('start').formatLocalized(monthAndDayFormat) }} -
|
||||
{{ session('end').formatLocalized(monthAndDayFormat) }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:40%;">
|
||||
{{ 'spent'|_ }}
|
||||
<span class="small"><br/>
|
||||
{{ session('start').formatLocalized(monthAndDayFormat) }} -
|
||||
{{ session('end').formatLocalized(monthAndDayFormat) }}
|
||||
</span>
|
||||
</td>
|
||||
<td>{{ budget.spent|formatAmount }}</a></td>
|
||||
</tr>
|
||||
{% if budget.otherRepetitions.count > 0 %}
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<ul class="list-unstyled">
|
||||
{% for other in budget.otherRepetitions %}
|
||||
{% if other.id != budget.currentRep.id %}
|
||||
<li>Budgeted
|
||||
<a href="{{ route('budgets.show', [budget.id, other.id]) }}">{{ other.amount|formatAmountPlain }}</a>
|
||||
between
|
||||
{{ other.startdate.formatLocalized(monthAndDayFormat) }}
|
||||
and {{ other.enddate.formatLocalized(monthAndDayFormat) }}.
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</td>
|
||||
<td>{{ budget.spent|formatAmount }}</a></td>
|
||||
</tr>
|
||||
{% if budget.otherRepetitions.count > 0 %}
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<ul class="list-unstyled">
|
||||
{% for other in budget.otherRepetitions %}
|
||||
{% if other.id != budget.currentRep.id %}
|
||||
<li>Budgeted
|
||||
<a href="{{ route('budgets.show', [budget.id, other.id]) }}">{{ other.amount|formatAmountPlain }}</a>
|
||||
between
|
||||
{{ other.startdate.formatLocalized(monthAndDayFormat) }}
|
||||
and {{ other.enddate.formatLocalized(monthAndDayFormat) }}.
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% if loop.index % 3 == 0 %}
|
||||
</div>
|
||||
{% if loop.index % 3 == 0 %}
|
||||
</div><div class="row">
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% if inactive|length > 0 %}
|
||||
|
@@ -107,6 +107,13 @@
|
||||
{{ 'pref_6M'|_ }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="viewRange"
|
||||
value="1Y" {% if viewRange == '1Y' %} checked {% endif %}>
|
||||
{{ 'pref_1Y'|_ }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user