Edição de Lançamento de Recebimento

<%= error_messages_for :lancamento_recebimento %> <% form_for(@lancamento_recebimento) do |f| %>
<% unless @lancamento_recebimento.colaborador.nil? %>
Representante *
<%= f.collection_select :colaborador_id, Colaborador.find(:all, :order => "nome"), :id, :nome, :prompt => 'Selecione um representante' %>
<% end %> <% unless @lancamento_recebimento.cliente.nil? %>
Cliente *
<%= f.collection_select :cliente_id, Cliente.find(:all, :order => "razao_social"), :id, :razao_social, :prompt => 'Selecione um cliente' %>
<% end %> <% unless @lancamento_recebimento.fornecedor.nil? %>
Fornecedor *
<%= f.collection_select :fornecedor_id, Fornecedor.find(:all, :order => "razao_social"), :id, :razao_social, :prompt => 'Selecione um fornecedor' %>
<% end %>
Vencimento *
<% if @lancamento_recebimento.vencimento.nil? %> <% vencimento = '' %> <% else %> <% vencimento = @lancamento_recebimento.vencimento.strftime("%d/%m/%Y") %> <% end %> <%= text_field_with_js_mask :lancamento_recebimento, :vencimento, :value => vencimento, :size => 10, :maxlength => 10, :class => 'mask_date_br' %>
Data de Recebimento
<% if @lancamento_recebimento.recebimento.nil? %> <% recebimento = '' %> <% else %> <% recebimento = @lancamento_recebimento.recebimento.strftime("%d/%m/%Y") %> <% end %> <%= text_field_with_js_mask :lancamento_recebimento, :recebimento, :value => recebimento, :size => 10, :maxlength => 10, :class => 'mask_date_br' %>
Juros
<%= f.text_field :juros, :size => 5, :maxlength => 5, :onKeyUp => "formataPercentual(this)" %> %
Valor PF
<%= f.text_field :valor_pf, :size => 14, :maxlength => 14, :onKeyUp => "formataValor(this)" %> reais
Valor NF
<%= f.text_field :valor_nf, :size => 14, :maxlength => 14, :onKeyUp => "formataValor(this)" %> reais
Tipo Pagto.
<%= f.collection_select :tipo_pagamento_id, TipoPagamento.find(:all, :order => "descricao"), :id, :descricao, :prompt => 'Selecione um Tipo de Pagto.' %>
Número
<%= f.text_field :numero_tipo_pagamento, :size => 12, :maxlength => 100 %>
<%= f.check_box :quitado %> Quitado?
Recebimento Parcial
<%= f.text_field :valor_recebimento_parcial, :size => 14, :maxlength => 14, :onKeyUp => "formataValor(this)" %> reais
Observação
<%= f.text_field :obs_contas_receber, :size => 30, :maxlength => 50 %>
<%= f.submit "Salvar" %>
* Campo obrigatório
<% end %> <%= link_to 'Visualizar', @lancamento_recebimento %> | <%= link_to 'Voltar', lancamento_recebimentos_path %>