<%= error_messages_for 'transfer' %> <% include_blank = false if include_blank.nil? no_zero_default = false if no_zero_default.nil? options = {} options[:include_blank] = include_blank %>
<%=t ['transakce','transfer'] %>
  1. <%= text_field_with_label 'transfer', 'popis', ['Účel','Purpose'] %>
  2. <%= date_select_with_label 'transfer', 'datum', ['Datum','Date'], options %>
  3. <%= date_select_with_label 'transfer', 'datum2', ['Dat. propl.','Reimbursement date'], options %>
  4. <%= lang_label 'transfer', 'amount', ['Částka', 'Amount'] %>
  5. <%= label 'transfer', 'vendor', t(['Protistrana','Vendor']) %> <%= autocomplete_field_tag 'transfer[vendor]', @transfer.vendor, autocomplete_partner_nazev_transfers_path # :frequency=>0.1 %>
  6. <% if @split_from %>
  7. <%= lang_label 'transfer', 'id_pow_account', ['Z účtu', 'From'] %> <%= collection_select 'pow_account', 'id', Account.all, :id, :popis %>
  8. <%= hidden_field 'pow_account', 'oldid', :value => @pow_account.id.to_s %>
  9. <%= collection_select 'transfer', 'id_account_from', @subselection_accounts, :id, :popis %>
  10. <% else %>
  11. <%= lang_label 'transfer', 'id_account_from', ['Z účtu', 'From'] %> <%= collection_select 'transfer', 'id_account_from', [Account.new]+Account.all_assets+Account.all_liabilities, :id, :popis %>
  12. <% end %> <% if @all_owners.length <= 1 %> <%= hidden_field 'transfer', 'id_account_owner' ,:value=> @all_owners.first.id %> <% else %>
  13. <%= lang_label 'transfer', 'id_account_owner', ['Majitel', 'Owner'] %> <%= collection_select 'transfer', 'id_account_owner', @all_owners, :id, :popis, include_blank ? options : {:prompt => "(select owner)"} %>
  14. <% end %>
  15. <%= lang_label 'transfer', 'id_account_to', ['Na účet', 'To'] %> <%= collection_select 'transfer', 'id_account_to', @accounts_to || Account.to_accounts_for_owner_id(@id_account_owner || @transfer.id_account_owner), :id, :popis, options %>
  16. <%= text_field_with_label 'transfer', 'seq', ['Č. dokladu', 'Seq'] %> <%= text_field_with_label 'transfer', 'tag_list', ['Štítky', 'Tags'] %>
<% if $user == 'gorn' %><%= check_box 'transfer', 'michailed' ,:value=> @transfer.michailed %> M<% end %>
<% if (!(defined? show_attachement_form)) || (show_attachement_form!=false) %>
<%=t ['dokumenty','documents'] %>
  1. <%= lang_label 'attachement', :file, ['Přilož', 'Attach'] %> <%= file_field 'attachement', :file %>
<% end %>