<%= f.label :title %>
<%= f.text_field :title %>
<%= f.label :amount %>
<%= f.text_field :amount %>
<%= f.label :type %>
<%= f.select :type, %w(Expense Income Move).map{|x| [x, x]} %>
<%= f.label :category_id %>
<%= f.select :category_id, @categories.map{|c| [c.name, c.id]} %>
<%= f.label :date %>
<%= f.text_field :date %>
<%= f.label :position %>
<%= f.text_field :position %>
<%= f.label :account_id %>
<%= f.select :account_id, @accounts.map{|a| [a.name, a.id]} %>
<%= f.label :account_id_from %>
<%= f.select :account_id_from, @accounts.map{|a| [a.name, a.id]} %>
→ <%= f.select :account_id_to, @accounts.map{|a| [a.name, a.id]} %>
<%= f.submit 'Update' %>
<% end %> <%= link_to 'Show', @item %> | <%= link_to 'Back', items_path %>