mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Make sure that accounts and their opening balance values are the same currency.
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
{{ ExpandedForm.text('name') }}
|
||||
{% if account.accounttype.type == 'Default account' or account.accounttype.type == 'Asset account' %}
|
||||
{# Not really mandatory but OK #}
|
||||
{{ ExpandedForm.select('currency_id', currencies) }}
|
||||
{{ ExpandedForm.select('currency_id', currencySelectList) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -36,10 +36,12 @@
|
||||
{{ ExpandedForm.text('accountNumber') }}
|
||||
|
||||
{% if account.accounttype.type == 'Default account' or account.accounttype.type == 'Asset account' %}
|
||||
{{ ExpandedForm.balance('openingBalance',null, {'currency' : openingBalance ? openingBalance.transactionCurrency : null}) }}
|
||||
|
||||
{# get opening balance entry for this thing! #}
|
||||
{{ ExpandedForm.nonSelectableBalance('openingBalance',null, {'currency' : currency }) }}
|
||||
{{ ExpandedForm.date('openingBalanceDate') }}
|
||||
{{ ExpandedForm.select('accountRole', roles) }}
|
||||
{{ ExpandedForm.balance('virtualBalance',null) }}
|
||||
{{ ExpandedForm.nonSelectableBalance('virtualBalance',null, {'currency' : currency }) }}
|
||||
|
||||
{% endif %}
|
||||
{{ ExpandedForm.checkbox('active','1') }}
|
||||
@@ -80,6 +82,15 @@
|
||||
{% block scripts %}
|
||||
<script type="text/javascript" src="js/lib/modernizr-custom.js"></script>
|
||||
<script type="text/javascript" src="js/lib/jquery-ui.min.js"></script>
|
||||
|
||||
{# JS currency list for update thing #}
|
||||
<script type="text/javascript">
|
||||
var currencies = [];
|
||||
{% for currency in allCurrencies %}
|
||||
currencies[{{ currency.id }}] = "{{ currency.symbol }}";
|
||||
{% endfor %}
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="js/ff/accounts/edit.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
11
resources/views/form/non-selectable-balance.twig
Normal file
11
resources/views/form/non-selectable-balance.twig
Normal file
@@ -0,0 +1,11 @@
|
||||
<div class="{{ classes }}" id="{{ name }}_holder">
|
||||
<label for="{{ options.id }}" class="col-sm-4 control-label">{{ label }}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon non-selectable-currency-symbol">{{ selectedCurrency.symbol }}</span>
|
||||
{{ Form.input('number', name, value, options) }}
|
||||
</div>
|
||||
{% include 'form/feedback' %}
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user