foodsoft/app/views/invoices/new.html.erb

36 lines
709 B
Plaintext
Raw Normal View History

<h1>New invoice</h1>
<% form_for(@invoice) do |f| %>
<%= f.error_messages %>
<p>
<%= f.label :supplier_id %><br />
<%= f.select :supplier_id, Supplier.all.collect { |s| [s.name, s.id] } %>
</p>
<p>
<%= f.label :number %><br />
<%= f.text_field :number %>
</p>
<p>
<%= f.label :date %><br />
<%= f.date_select :date %>
</p>
<p>
<%= f.label :paid_on %><br />
<%= f.date_select :paid_on, :include_blank => true %>
</p>
<p>
<%= f.label :amount %><br />
<%= f.text_field :amount %>
</p>
<p>
<%= f.label :note %><br />
<%= f.text_area :note %>
</p>
<p>
<%= f.submit "Create" %>
</p>
<% end %>
<%= link_to 'Back', invoices_path %>