diff --git a/resources/views/split/journals/from-store.twig b/resources/views/split/journals/from-store.twig index 8de8d22426..6f41cde1be 100644 --- a/resources/views/split/journals/from-store.twig +++ b/resources/views/split/journals/from-store.twig @@ -5,7 +5,7 @@ {% endblock %} {% block content %} {{ Form.open({'class' : 'form-horizontal','id' : 'store','url' : route('split.journal.from-store.post')}) }} - +
@@ -30,25 +30,32 @@ {{ trans(('firefly.split_intro_three_'~data.what), {total: 20|formatAmount, split_one: 15|formatAmount, split_two: 5|formatAmount})|raw }} {% endif %}

- +

This feature is experimental.

+ {% if errors.all()|length > 0 %} +
+
+
+
+

{{ 'errors'|_ }}

+
+ +
+
+
+
    + {% for key, err in errors.all() %} +
  • {{ err }}
  • + {% endfor %} +
+
+
+
+
+ {% endif %}
@@ -60,23 +67,24 @@
- {{ ExpandedForm.text('journal_description', data.description) }} - {{ ExpandedForm.select('currency', currencies, data.amount_currency_id_amount) }} - {{ ExpandedForm.staticText('amount', data.amount|formatAmount) }} + {{ ExpandedForm.text('journal_description') }} + {{ ExpandedForm.select('journal_currency_id', currencies, data.journal_currency_id) }} + {{ ExpandedForm.staticText('journal_amount', data.journal_amount|formatAmount) }} + {% if data.what == 'withdrawal' or data.what == 'transfer' %} - {{ ExpandedForm.staticText('asset_source_account', assetAccounts[data.source_account_id]) }} - + {{ ExpandedForm.staticText('asset_source_account', assetAccounts[data.journal_source_account_id]) }} + {% endif %} {% if data.what == 'deposit' %} - {{ ExpandedForm.staticText('revenue_account', data.source_account_name) }} - + {{ ExpandedForm.staticText('revenue_account', data.journal_source_account_name) }} + {% endif %} {% if data.what == 'transfer' %} - {{ ExpandedForm.staticText('asset_destination_account', assetAccounts[data.destination_account_id]) }} - + {{ ExpandedForm.staticText('asset_destination_account', assetAccounts[data.journal_destination_account_id]) }} + {% endif %}
@@ -143,43 +151,48 @@ - - #1 - {{ Form.input('text', 'description[]', data.description, {class: 'form-control'}) }} - - - {% if data.what == 'withdrawal' %} + {% for index, descr in data.description %} + + #{{ loop.index }} - {{ Form.input('text', 'destination_account_name[]', data.destination_account_name, {class: 'form-control'}) }} + - {% endif %} - - {% if data.what == 'deposit' %} + + {% if data.what == 'withdrawal' %} + + + + {% endif %} + + + {% if data.what == 'deposit' %} + + {{ Form.select('destination_account_id[]', assetAccounts, data.destination_account_id[index], {class: 'form-control'}) }} + + {% endif %} + + + + + + {% if data.what == 'withdrawal' %} + + {{ Form.select('budget_id[]', budgets, data.budget_id[index], {class: 'form-control'}) }} + + {% endif %} - {{ Form.select('destination_account_id[]', assetAccounts, data.destination_account_id, {class: 'form-control'}) }} + - {% endif %} - - - - - {{ Form.input('number', 'amount[]', data.amount, {class: 'form-control', autocomplete: 'off', step: 'any', min:'0.01'}) }} - - {% if data.what == 'withdrawal' %} - - {{ Form.select('budget[]', budgets, data.budget_id, {class: 'form-control'}) }} - - {% endif %} - - {{ Form.input('text', 'category[]', data.category, {class: 'form-control'}) }} - - {% if data.what == 'transfer' %} - - {{ Form.select('piggy_bank_id[]', piggyBanks, data.piggy_bank_id, {class: 'form-control'}) }} - - {% endif %} - + {% if data.what == 'transfer' %} + + {{ Form.select('piggy_bank_id[]', piggyBanks, data.piggy_bank_id[index], {class: 'form-control'}) }} + + {% endif %} + + {% endfor %}

@@ -200,7 +213,7 @@ {% endblock %} {% block scripts %}