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

33 lines
813 B
Plaintext
Raw Normal View History

<% title "Invoices" %>
<table class="list" style="width:70em">
<tr>
<th>Supplier</th>
<th>Number</th>
<th>Date</th>
<th>Paid on</th>
<th>Amount</th>
<th>Delivery</th>
<th>Note</th>
</tr>
<% for invoice in @invoices %>
<tr>
<td><%=h invoice.supplier.name %></td>
<td><%=h invoice.number %></td>
<td><%= invoice.date %></td>
<td><%= invoice.paid_on %></td>
<td><%= invoice.amount %></td>
<td><%=h invoice.delivery_id %></td>
<td><%=h truncate(invoice.note) %></td>
<td><%= link_to 'Show', invoice %></td>
<td><%= link_to 'Edit', edit_invoice_path(invoice) %></td>
<td><%= link_to 'Destroy', invoice, :confirm => 'Are you sure?', :method => :delete %></td>
</tr>
<% end %>
</table>
<br />
<%= link_to 'New invoice', new_invoice_path %>