Improve edit routine for split transactions.

This commit is contained in:
James Cole
2018-04-06 12:44:43 +02:00
parent 7cd51a7747
commit 91fe1493a7
5 changed files with 23 additions and 10 deletions

View File

@@ -33,6 +33,7 @@
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
</div>
<div class="box-body">
{# ALWAYS AVAILABLE #}
{{ ExpandedForm.text('description',journal.description) }}
@@ -81,7 +82,11 @@
</div>
<div class="box-body">
{% if what == 'withdrawal' %}
{{ ExpandedForm.select('budget_id',budgetList,data['budget_id']) }}
{% if budgetList|length > 1 %}
{{ ExpandedForm.select('budget_id', budgetList, data['budget_id']) }}
{% else %}
{{ ExpandedForm.select('budget_id', budgetList, data['budget_id'], {helpText: trans('firefly.no_budget_pointer')}) }}
{% endif %}
{% endif %}
{{ ExpandedForm.text('category',data['category']) }}
{{ ExpandedForm.text('tags') }}
@@ -209,8 +214,8 @@
</div>
</div>
</div>
<input type="hidden" name="source_account_currency" value="0" />
<input type="hidden" name="destination_account_currency" value="0" />
<input type="hidden" name="source_account_currency" value="0"/>
<input type="hidden" name="destination_account_currency" value="0"/>
</form>

View File

@@ -228,7 +228,7 @@
{% if preFilled.what == 'withdrawal' %}
<div class="col-lg-2 col-md-5 col-sm-12 col-xs-12">
<input autocomplete="off" type="text" name="transactions[{{ loop.index0 }}][destination_name]"
value="{{ transaction.destination_name }}" class="form-control"/>
value="{% if transaction.destination_type != 'Cash account' %}{{ transaction.destination_name }}{% endif %}" class="form-control"/>
</div>
{% endif %}