Editing invoice

<% form_for(@invoice) do |f| %> <%= f.error_messages %>

<%= f.label :supplier_id %>
<%= f.select :supplier_id, Supplier.all.collect { |s| [s.name, s.id] } %>

<%= f.label :number %>
<%= f.text_field :number %>

<%= f.label :date %>
<%= f.date_select :date %>

<%= f.label :paid_on %>
<%= f.date_select :paid_on, :include_blank => true %>

<%= f.label :amount %>
<%= f.text_field :amount %>

<%= f.label :note %>
<%= f.text_area :note %>

<%= f.submit "Update" %>

<% end %> <%= link_to 'Show', @invoice %> | <%= link_to 'Back', invoices_path %>