2009-02-11 18:09:04 +01:00
|
|
|
<% title "Rechnungen" %>
|
2009-01-10 19:36:58 +01:00
|
|
|
|
|
|
|
<table class="list" style="width:70em">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2009-02-11 18:09:04 +01:00
|
|
|
<th>Nummer</th>
|
|
|
|
<th>Lieferant</th>
|
|
|
|
<th>Datum</th>
|
|
|
|
<th>Bezahlt am</th>
|
|
|
|
<th>Betrag</th>
|
|
|
|
<th>Lieferung</th>
|
|
|
|
<th>Bestellung</th>
|
2009-01-10 19:36:58 +01:00
|
|
|
<th>Note</th>
|
|
|
|
<th></th>
|
|
|
|
<th></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<% for invoice in @invoices %>
|
|
|
|
<tr>
|
2009-02-11 18:09:04 +01:00
|
|
|
<td><%= link_to h(invoice.number), finance_invoice_path(invoice)%></td>
|
2009-01-10 19:36:58 +01:00
|
|
|
<td><%=h invoice.supplier.name %></td>
|
2009-02-11 18:09:04 +01:00
|
|
|
<td><%= format_date invoice.date %></td>
|
|
|
|
<td><%= format_date invoice.paid_on %></td>
|
|
|
|
<td><%= number_to_currency invoice.amount %></td>
|
2009-01-18 17:42:51 +01:00
|
|
|
<td><%= link_to "Lieferung", [invoice.supplier,invoice.delivery] if invoice.delivery %></td>
|
2009-02-11 18:09:04 +01:00
|
|
|
<td><%= link_to format_date(invoice.order.ends), :controller => 'balancing', :action => 'new', :id => invoice.order if invoice.order %></td>
|
2009-01-10 19:36:58 +01:00
|
|
|
<td><%=h truncate(invoice.note) %></td>
|
2009-02-11 18:09:04 +01:00
|
|
|
<td><%= link_to icon(:edit), edit_finance_invoice_path(invoice) %></td>
|
|
|
|
<td><%= link_to icon(:delete), finance_invoice_path(invoice), :confirm => 'Are you sure?', :method => :delete %></td>
|
2009-01-10 19:36:58 +01:00
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<br />
|
|
|
|
|
2009-02-11 18:09:04 +01:00
|
|
|
<%= link_to 'Neue Rechnung anlegen', new_finance_invoice_path %>
|