tr.nested-fields = f.hidden_field :conta_bancaria_id, value: f.object.conta_bancaria_id td - if f.object.persisted? p.form-control-static = f.object.fonte_de_recurso.try(:codigo_completo_e_descricao_e_exercicio) - else = f.select :fonte_de_recurso_id, options_from_collection_for_select(@fontes_de_recursos, :id, :codigo_completo_e_descricao_e_exercicio, f.object.try(:fonte_de_recurso_id)), { include_blank: "Selecione" }, class: "form-control s2", id: "fonte_de_recurso_id" = error_for f.object, :fonte_de_recurso_id, :fonte_de_recurso td = f.text_field :saldo_inicial, placeholder: 'R$ 0,00', data: { autonumeric: true, 'a-sep'=> '.', 'a-dec'=>',', 'a-sign'=> 'R$ ', 'v-min'=> '0.00', 'v-max'=> '9999999999.99' }, class: 'saldo_inicial_fonte form-control' = error_for f.object, :saldo_inicial, :fonte_de_recurso td / - if @conta_bancaria.movimentacoes_da_conta_bancaria.exceto_movimentacao_inicial.empty? || f.object.new_record? = link_to_remove_association " Remover", f, class: "btn btn-sm btn-danger icone-anular"